Merge from Chromium at DEPS revision r215573

This commit was generated by merge_to_master.py.

Change-Id: I07a9d4f856da71a9fb8fcd4d688596ef141bf5a3
diff --git a/Source/core/ConvertFileToHeaderWithCharacterArray.gypi b/Source/core/ConvertFileToHeaderWithCharacterArray.gypi
index bd6f110..e41a20a 100644
--- a/Source/core/ConvertFileToHeaderWithCharacterArray.gypi
+++ b/Source/core/ConvertFileToHeaderWithCharacterArray.gypi
@@ -33,7 +33,7 @@
 #   'type': 'none',
 #   'variables': {
 #     'input_file_path': 'inspector/InjectedScriptSource.js'',
-#     'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/WebCore/InjectedScriptSource.h',
+#     'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptSource.h',
 #     'character_array_name': 'InjectedScriptSource_js',
 #   },
 #   'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ],
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 3854fb5..46538b8 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -740,20 +740,6 @@
     nodeTextChangePlatformNotification(obj, textChange, offset, text);
 }
 
-void AXObjectCache::frameLoadingEventNotification(Frame* frame, AXLoadingEvent loadingEvent)
-{
-    if (!frame)
-        return;
-
-    // Delegate on the right platform
-    RenderView* contentRenderer = frame->contentRenderer();
-    if (!contentRenderer)
-        return;
-
-    AccessibilityObject* obj = getOrCreate(contentRenderer);
-    frameLoadingEventPlatformNotification(obj, loadingEvent);
-}
-
 void AXObjectCache::handleScrollbarUpdate(ScrollView* view)
 {
     if (!view)
@@ -999,10 +985,6 @@
 {
 }
 
-void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent)
-{
-}
-
 void AXObjectCache::handleFocusedUIElementChanged(Node*, Node* newFocusedNode)
 {
     if (!newFocusedNode)
diff --git a/Source/core/accessibility/AXObjectCache.h b/Source/core/accessibility/AXObjectCache.h
index 9a13a55..c4c7b81 100644
--- a/Source/core/accessibility/AXObjectCache.h
+++ b/Source/core/accessibility/AXObjectCache.h
@@ -181,16 +181,6 @@
     };
 
     void nodeTextChangeNotification(Node*, AXTextChange, unsigned offset, const String&);
-
-    enum AXLoadingEvent {
-        AXLoadingStarted,
-        AXLoadingReloaded,
-        AXLoadingFailed,
-        AXLoadingFinished
-    };
-
-    void frameLoadingEventNotification(Frame*, AXLoadingEvent);
-
     bool nodeHasRole(Node*, const AtomicString& role);
 
     void startCachingComputedObjectAttributesUntilTreeMutates();
@@ -201,7 +191,6 @@
 protected:
     void postPlatformNotification(AccessibilityObject*, AXNotification);
     void nodeTextChangePlatformNotification(AccessibilityObject*, AXTextChange, unsigned offset, const String&);
-    void frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent);
     void textChanged(AccessibilityObject*);
     void labelChanged(Element*);
 
@@ -265,8 +254,6 @@
 inline void AXObjectCache::textChanged(AccessibilityObject*) { }
 inline void AXObjectCache::updateCacheAfterNodeIsAttached(Node*) { }
 inline void AXObjectCache::detachWrapper(AccessibilityObject*) { }
-inline void AXObjectCache::frameLoadingEventNotification(Frame*, AXLoadingEvent) { }
-inline void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent) { }
 inline void AXObjectCache::handleActiveDescendantChanged(Node*) { }
 inline void AXObjectCache::handleAriaExpandedChange(Node*) { }
 inline void AXObjectCache::handleAriaRoleChanged(Node*) { }
diff --git a/Source/core/accessibility/AccessibilityNodeObject.cpp b/Source/core/accessibility/AccessibilityNodeObject.cpp
index 4eaa667..b25e68b 100644
--- a/Source/core/accessibility/AccessibilityNodeObject.cpp
+++ b/Source/core/accessibility/AccessibilityNodeObject.cpp
@@ -1184,6 +1184,10 @@
 
 LayoutRect AccessibilityNodeObject::elementRect() const
 {
+    // First check if it has a custom rect, for example if this element is tied to a canvas path.
+    if (!m_explicitElementRect.isEmpty())
+        return m_explicitElementRect;
+
     // AccessibilityNodeObjects have no mechanism yet to return a size or position.
     // For now, let's return the position of the ancestor that does have a position,
     // and make it the width of that parent, and about the height of a line of text, so that it's clear the object is a child of the parent.
diff --git a/Source/core/accessibility/AccessibilityObject.h b/Source/core/accessibility/AccessibilityObject.h
index 83287ca..2f74dd6 100644
--- a/Source/core/accessibility/AccessibilityObject.h
+++ b/Source/core/accessibility/AccessibilityObject.h
@@ -438,7 +438,8 @@
     virtual String helpText() const { return String(); }
 
     // Location and click point in frame-relative coordinates.
-    virtual LayoutRect elementRect() const { return LayoutRect(); }
+    virtual LayoutRect elementRect() const { return m_explicitElementRect; }
+    void setElementRect(LayoutRect r) { m_explicitElementRect = r; }
     virtual void markCachedElementRectDirty() const;
     virtual IntPoint clickPoint();
 
@@ -539,6 +540,7 @@
     mutable bool m_haveChildren;
     AccessibilityRole m_role;
     AccessibilityObjectInclusion m_lastKnownIsIgnoredValue;
+    LayoutRect m_explicitElementRect;
 
     virtual bool computeAccessibilityIsIgnored() const { return true; }
 
diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
index 22e5779..24ac75a 100644
--- a/Source/core/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
@@ -214,6 +214,8 @@
 
 LayoutRect AccessibilityRenderObject::elementRect() const
 {
+    if (!m_explicitElementRect.isEmpty())
+        return m_explicitElementRect;
     if (!m_renderer)
         return LayoutRect();
     if (!m_renderer->isBox())
diff --git a/Source/core/animation/ActiveAnimations.h b/Source/core/animation/ActiveAnimations.h
index e4c748c..824ca95 100644
--- a/Source/core/animation/ActiveAnimations.h
+++ b/Source/core/animation/ActiveAnimations.h
@@ -32,22 +32,29 @@
 #define ActiveAnimations_h
 
 #include "core/animation/AnimationStack.h"
+#include "core/animation/css/CSSAnimations.h"
 #include "wtf/HashMap.h"
 #include "wtf/RefPtr.h"
 #include "wtf/Vector.h"
 
 namespace WebCore {
 
-class AnimationStack;
-
 class ActiveAnimations {
 public:
+    // Animations that are currently active for this element, their effects will be applied
+    // during a style recalc.
     AnimationStack* defaultStack() { return &m_defaultStack; }
-    bool isEmpty() const { return !m_defaultStack.hasActiveAnimations(); }
+    // Tracks the state of active CSS Animations. When active the individual animations will
+    // also be part of the default stack, but the mapping betwen animation name and player
+    // is kept here.
+    CSSAnimations* cssAnimations() { return &m_cssAnimations; }
+    // FIXME: Add AnimationStack for CSS Transitions
+    // CSS Transitions form a separate animation stack as they apply at a different level of
+    // the style cascade. Active transitions will not be present in the default stack.
+    bool isEmpty() const { return m_defaultStack.isEmpty() && m_cssAnimations.isEmpty(); }
 private:
     AnimationStack m_defaultStack;
-    // FIXME: Add AnimationStack for CSS Transitions
-    // FIXME: Add tracking data for CSS Animations
+    CSSAnimations m_cssAnimations;
 };
 
 } // namespace WebCore
diff --git a/Source/core/animation/AnimatableNumber.cpp b/Source/core/animation/AnimatableNumber.cpp
index e0929f2..7b90249 100644
--- a/Source/core/animation/AnimatableNumber.cpp
+++ b/Source/core/animation/AnimatableNumber.cpp
@@ -139,7 +139,7 @@
 {
     switch (primitiveUnit) {
     case CSSPrimitiveValue::CSS_NUMBER:
-        return UnitTypeNone;
+        return UnitTypeNumber;
     case CSSPrimitiveValue::CSS_PX:
     case CSSPrimitiveValue::CSS_CM:
     case CSSPrimitiveValue::CSS_MM:
@@ -186,7 +186,7 @@
 unsigned short AnimatableNumber::numberTypeToPrimitiveUnit(NumberUnitType numberType)
 {
     switch (numberType) {
-    case UnitTypeNone:
+    case UnitTypeNumber:
         return CSSPrimitiveValue::CSS_NUMBER;
     case UnitTypeLength:
         return CSSPrimitiveValue::CSS_PX;
diff --git a/Source/core/animation/AnimatableNumber.h b/Source/core/animation/AnimatableNumber.h
index 42a6d68..39e774a 100644
--- a/Source/core/animation/AnimatableNumber.h
+++ b/Source/core/animation/AnimatableNumber.h
@@ -42,18 +42,8 @@
 // If created from a CSSPrimitiveValue this class will cache it to be returned in toCSSValue().
 class AnimatableNumber : public AnimatableValue {
 public:
-    virtual ~AnimatableNumber() { }
-    static bool canCreateFrom(const CSSValue*);
-    static PassRefPtr<AnimatableNumber> create(CSSValue*);
-    virtual PassRefPtr<CSSValue> toCSSValue() const OVERRIDE;
-
-protected:
-    virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
-    virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
-
-private:
     enum NumberUnitType {
-        UnitTypeNone,
+        UnitTypeNumber,
         UnitTypeLength,
         UnitTypeFontSize,
         UnitTypeFontXSize,
@@ -70,6 +60,20 @@
         UnitTypeInvalid,
     };
 
+    virtual ~AnimatableNumber() { }
+    static bool canCreateFrom(const CSSValue*);
+    static PassRefPtr<AnimatableNumber> create(CSSValue*);
+    static PassRefPtr<AnimatableNumber> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
+    {
+        return adoptRef(new AnimatableNumber(number, unitType, cssPrimitiveValue));
+    }
+    virtual PassRefPtr<CSSValue> toCSSValue() const OVERRIDE;
+
+protected:
+    virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
+    virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
+
+private:
     AnimatableNumber(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue)
         : AnimatableValue(TypeNumber)
         , m_number(number)
@@ -88,10 +92,6 @@
         ASSERT(m_calcExpression);
     }
 
-    static PassRefPtr<AnimatableNumber> create(double number, NumberUnitType unitType, CSSPrimitiveValue* cssPrimitiveValue = 0)
-    {
-        return adoptRef(new AnimatableNumber(number, unitType, cssPrimitiveValue));
-    }
     static PassRefPtr<AnimatableNumber> create(PassRefPtr<CSSCalcExpressionNode> calcExpression, CSSPrimitiveValue* cssPrimitiveValue = 0)
     {
         return adoptRef(new AnimatableNumber(calcExpression, cssPrimitiveValue));
diff --git a/Source/core/animation/AnimatableValue.cpp b/Source/core/animation/AnimatableValue.cpp
index 63af8cb..25cce2d 100644
--- a/Source/core/animation/AnimatableValue.cpp
+++ b/Source/core/animation/AnimatableValue.cpp
@@ -30,25 +30,12 @@
 
 #include "config.h"
 #include "core/animation/AnimatableValue.h"
-
 #include "core/animation/AnimatableNeutral.h"
-#include "core/animation/AnimatableNumber.h"
-#include "core/animation/AnimatableUnknown.h"
 #include "core/animation/DeferredAnimatableValue.h"
-
 #include <algorithm>
 
 namespace WebCore {
 
-PassRefPtr<AnimatableValue> AnimatableValue::create(CSSValue* value)
-{
-    // FIXME: Move this logic to a separate factory class.
-    // FIXME: Handle all animatable CSSValue types.
-    if (AnimatableNumber::canCreateFrom(value))
-        return AnimatableNumber::create(value);
-    return AnimatableUnknown::create(value);
-}
-
 const AnimatableValue* AnimatableValue::neutralValue()
 {
     static AnimatableNeutral* neutralSentinelValue = AnimatableNeutral::create().leakRef();
diff --git a/Source/core/animation/AnimatableValue.h b/Source/core/animation/AnimatableValue.h
index 00cef47..76a2d5c 100644
--- a/Source/core/animation/AnimatableValue.h
+++ b/Source/core/animation/AnimatableValue.h
@@ -41,7 +41,6 @@
 class AnimatableValue : public RefCounted<AnimatableValue> {
 public:
     virtual ~AnimatableValue() { }
-    static PassRefPtr<AnimatableValue> create(CSSValue*);
     virtual PassRefPtr<CSSValue> toCSSValue() const = 0;
 
     static const AnimatableValue* neutralValue();
diff --git a/Source/core/animation/AnimationStack.h b/Source/core/animation/AnimationStack.h
index 3bbf488..e6e28f6 100644
--- a/Source/core/animation/AnimationStack.h
+++ b/Source/core/animation/AnimationStack.h
@@ -50,7 +50,7 @@
         ASSERT(position != notFound);
         m_activeAnimations.remove(position);
     }
-    bool hasActiveAnimations() const { return !m_activeAnimations.isEmpty(); }
+    bool isEmpty() const { return m_activeAnimations.isEmpty(); }
     // FIXME: This should be PassRefPtr<CompositableValue> composite(Element*, CSSPropertyId)
     const Vector<Animation*>& activeAnimations(const Element* element) const { return m_activeAnimations; }
 
diff --git a/Source/core/animation/KeyframeAnimationEffectTest.cpp b/Source/core/animation/KeyframeAnimationEffectTest.cpp
index 4d336b4..0ea68cc 100644
--- a/Source/core/animation/KeyframeAnimationEffectTest.cpp
+++ b/Source/core/animation/KeyframeAnimationEffectTest.cpp
@@ -31,6 +31,8 @@
 #include "config.h"
 #include "core/animation/KeyframeAnimationEffect.h"
 
+#include "core/animation/AnimatableNumber.h"
+#include "core/animation/AnimatableUnknown.h"
 #include "core/css/CSSPrimitiveValue.h"
 #include <gtest/gtest.h>
 
@@ -40,12 +42,12 @@
 
 AnimatableValue* unknownAnimatableValue(double n)
 {
-    return AnimatableValue::create(CSSPrimitiveValue::create(n, CSSPrimitiveValue::CSS_UNKNOWN).get()).leakRef();
+    return AnimatableUnknown::create(CSSPrimitiveValue::create(n, CSSPrimitiveValue::CSS_UNKNOWN).get()).leakRef();
 }
 
 AnimatableValue* pixelAnimatableValue(double n)
 {
-    return AnimatableValue::create(CSSPrimitiveValue::create(n, CSSPrimitiveValue::CSS_PX).get()).leakRef();
+    return AnimatableNumber::create(CSSPrimitiveValue::create(n, CSSPrimitiveValue::CSS_PX).get()).leakRef();
 }
 
 KeyframeAnimationEffect::KeyframeVector keyframesAtZeroAndOne(AnimatableValue* zeroValue, AnimatableValue* oneValue)
diff --git a/Source/core/animation/Player.cpp b/Source/core/animation/Player.cpp
index abb23f9..7af07e2 100644
--- a/Source/core/animation/Player.cpp
+++ b/Source/core/animation/Player.cpp
@@ -94,6 +94,15 @@
     return m_content->isCurrent() || m_content->isInEffect();
 }
 
+void Player::cancel()
+{
+    if (!m_content)
+        return;
+
+    m_content->detach();
+    m_content = 0;
+}
+
 void Player::setCurrentTime(double seekTime)
 {
     if (paused())
diff --git a/Source/core/animation/Player.h b/Source/core/animation/Player.h
index 3b4e480..985fb45 100644
--- a/Source/core/animation/Player.h
+++ b/Source/core/animation/Player.h
@@ -46,6 +46,7 @@
 
     // Returns whether this player is still current or in effect.
     bool update();
+    void cancel();
     double currentTime() const;
     void setCurrentTime(double);
     bool paused() const { return !isNull(m_pauseStartTime); }
diff --git a/Source/core/animation/TimedItem.cpp b/Source/core/animation/TimedItem.cpp
index 98121b8..852123f 100644
--- a/Source/core/animation/TimedItem.cpp
+++ b/Source/core/animation/TimedItem.cpp
@@ -34,12 +34,13 @@
 
 namespace WebCore {
 
-TimedItem::TimedItem(const Timing& timing)
+TimedItem::TimedItem(const Timing& timing, PassOwnPtr<TimedItemEventDelegate> eventDelegate)
     : m_parent(0)
     , m_player(0)
     , m_startTime(0)
     , m_specified(timing)
     , m_calculated()
+    , m_eventDelegate(eventDelegate)
 {
     timing.assertValid();
 }
@@ -86,15 +87,20 @@
         timeFraction = calculateTransformedTime(currentIteration, iterationDuration, iterationTime, m_specified);
     }
 
+    const double lastIteration = m_calculated.currentIteration;
     m_calculated.currentIteration = currentIteration;
     m_calculated.activeDuration = activeDuration;
     m_calculated.timeFraction = timeFraction;
 
-    const bool wasInEffect = isInEffect();
+    const bool wasInEffect = m_calculated.isInEffect;
+    const bool wasInPlay = m_calculated.isInPlay;
     m_calculated.isInEffect = !isNull(activeTime);
     m_calculated.isInPlay = phase == PhaseActive && (!m_parent || m_parent->isInPlay());
     m_calculated.isCurrent = phase == PhaseBefore || isInPlay() || (m_parent && m_parent->isCurrent());
 
+    if (m_eventDelegate && (isInPlay() != wasInPlay || (isInPlay() && lastIteration != currentIteration)))
+        m_eventDelegate->onEventCondition(wasInPlay, isInPlay(), lastIteration, currentIteration);
+
     // FIXME: This probably shouldn't be recursive.
     updateChildrenAndEffects(wasInEffect);
 }
diff --git a/Source/core/animation/TimedItem.h b/Source/core/animation/TimedItem.h
index 58ca314..93b79a7 100644
--- a/Source/core/animation/TimedItem.h
+++ b/Source/core/animation/TimedItem.h
@@ -32,6 +32,7 @@
 #define TimedItem_h
 
 #include "core/animation/Timing.h"
+#include "wtf/PassOwnPtr.h"
 #include "wtf/RefCounted.h"
 
 namespace WebCore {
@@ -48,6 +49,12 @@
     return std::numeric_limits<double>::quiet_NaN();
 }
 
+class TimedItemEventDelegate {
+public:
+    virtual ~TimedItemEventDelegate() { };
+    virtual void onEventCondition(bool wasInPlay, bool isInPlay, double previousIteration, double currentIteration) = 0;
+};
+
 class TimedItem : public RefCounted<TimedItem> {
     friend class Player; // Calls attach/detach, updateInheritedTime.
 public:
@@ -72,7 +79,7 @@
     };
 
 protected:
-    TimedItem(const Timing&);
+    TimedItem(const Timing&, PassOwnPtr<TimedItemEventDelegate> = nullptr);
 
     // When TimedItem receives a new inherited time via updateInheritedTime
     // it will (if necessary) recalculate timings and (if necessary) call
@@ -96,6 +103,7 @@
     const double m_startTime;
     Player* m_player;
     Timing m_specified;
+    OwnPtr<TimedItemEventDelegate> m_eventDelegate;
 
     // FIXME: Should be versioned by monotonic value on player.
     mutable struct CalculatedTiming {
diff --git a/Source/core/animation/TimedItemTest.cpp b/Source/core/animation/TimedItemTest.cpp
index 2fccfff..22c10a4 100644
--- a/Source/core/animation/TimedItemTest.cpp
+++ b/Source/core/animation/TimedItemTest.cpp
@@ -37,15 +37,43 @@
 
 namespace {
 
+class TestTimedItemEventDelegate : public TimedItemEventDelegate {
+public:
+    void onEventCondition(bool wasInPlay, bool isInPlay, double previousIteration, double currentIteration) OVERRIDE
+    {
+        m_eventTriggered = true;
+        m_playStateChanged = wasInPlay != isInPlay;
+        m_iterationChanged = isInPlay && previousIteration != currentIteration;
+        if (isInPlay)
+            ASSERT(!isNull(currentIteration));
+
+    }
+    void reset()
+    {
+        m_eventTriggered = false;
+        m_playStateChanged = false;
+        m_iterationChanged = false;
+    }
+    bool eventTriggered() { return m_eventTriggered; }
+    bool playStateChanged() { return m_playStateChanged; }
+    bool iterationChanged() { return m_iterationChanged; }
+
+private:
+    bool m_eventTriggered;
+    bool m_playStateChanged;
+    bool m_iterationChanged;
+};
+
 class TestTimedItem : public TimedItem {
 public:
     static PassRefPtr<TestTimedItem> create(const Timing& specified)
     {
-        return adoptRef(new TestTimedItem(specified));
+        return adoptRef(new TestTimedItem(specified, new TestTimedItemEventDelegate()));
     }
 
     void updateInheritedTime(double time)
     {
+        m_eventDelegate->reset();
         TimedItem::updateInheritedTime(time);
     }
 
@@ -54,11 +82,16 @@
 
     void willDetach() { }
 
+    TestTimedItemEventDelegate* eventDelegate() { return m_eventDelegate; }
+
 private:
-    TestTimedItem(const Timing& specified)
-        : TimedItem(specified)
+    TestTimedItem(const Timing& specified, TestTimedItemEventDelegate* eventDelegate)
+        : TimedItem(specified, adoptPtr(eventDelegate))
+        , m_eventDelegate(eventDelegate)
     {
     }
+
+    TestTimedItemEventDelegate* m_eventDelegate;
 };
 
 TEST(TimedItem, Sanity)
@@ -506,4 +539,39 @@
     ASSERT_EQ(1, timedItem->currentIteration());
     ASSERT_EQ(1, timedItem->timeFraction());
 }
+
+TEST(TimedItem, Events)
+{
+    Timing timing;
+    timing.hasIterationDuration = true;
+    timing.iterationDuration = 1;
+    timing.iterationCount = 2;
+    RefPtr<TestTimedItem> timedItem = TestTimedItem::create(timing);
+
+    timedItem->updateInheritedTime(0.3);
+    ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
+    EXPECT_TRUE(timedItem->eventDelegate()->playStateChanged());
+    EXPECT_TRUE(timedItem->eventDelegate()->iterationChanged());
+
+    timedItem->updateInheritedTime(0.6);
+    ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered());
+
+    timedItem->updateInheritedTime(1.5);
+    ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
+    EXPECT_TRUE(timedItem->eventDelegate()->iterationChanged());
+    EXPECT_FALSE(timedItem->eventDelegate()->playStateChanged());
+
+    timedItem->updateInheritedTime(2.5);
+    ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
+    EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged());
+    EXPECT_TRUE(timedItem->eventDelegate()->playStateChanged());
+
+    timedItem->updateInheritedTime(3);
+    ASSERT_FALSE(timedItem->eventDelegate()->eventTriggered());
+
+    timedItem->updateInheritedTime(1.5);
+    ASSERT_TRUE(timedItem->eventDelegate()->eventTriggered());
+    EXPECT_FALSE(timedItem->eventDelegate()->iterationChanged());
+    EXPECT_TRUE(timedItem->eventDelegate()->playStateChanged());
+}
 }
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
new file mode 100644
index 0000000..e6c27dd
--- /dev/null
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -0,0 +1,222 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/animation/css/CSSAnimatableValueFactory.h"
+
+#include "CSSValueKeywords.h"
+#include "core/animation/AnimatableNumber.h"
+#include "core/animation/AnimatableUnknown.h"
+#include "core/platform/Length.h"
+#include "core/rendering/style/RenderStyle.h"
+
+
+namespace WebCore {
+
+// FIXME: Handle remaining animatable properties (pulled from CSSPropertyAnimation):
+// CSSPropertyBackgroundColor
+// CSSPropertyBackgroundImage
+// CSSPropertyBackgroundPositionX
+// CSSPropertyBackgroundPositionY
+// CSSPropertyBackgroundSize
+// CSSPropertyBaselineShift
+// CSSPropertyBorderBottomColor
+// CSSPropertyBorderBottomLeftRadius
+// CSSPropertyBorderBottomRightRadius
+// CSSPropertyBorderBottomWidth
+// CSSPropertyBorderImageOutset
+// CSSPropertyBorderImageSlice
+// CSSPropertyBorderImageSource
+// CSSPropertyBorderImageWidth
+// CSSPropertyBorderLeftColor
+// CSSPropertyBorderLeftWidth
+// CSSPropertyBorderRightColor
+// CSSPropertyBorderRightWidth
+// CSSPropertyBorderTopColor
+// CSSPropertyBorderTopLeftRadius
+// CSSPropertyBorderTopRightRadius
+// CSSPropertyBorderTopWidth
+// CSSPropertyBoxShadow
+// CSSPropertyClip
+// CSSPropertyColor
+// CSSPropertyFill
+// CSSPropertyFillOpacity
+// CSSPropertyFloodColor
+// CSSPropertyFloodOpacity
+// CSSPropertyFontSize
+// CSSPropertyKerning
+// CSSPropertyLetterSpacing
+// CSSPropertyLightingColor
+// CSSPropertyLineHeight
+// CSSPropertyListStyleImage
+// CSSPropertyOpacity
+// CSSPropertyOrphans
+// CSSPropertyOutlineColor
+// CSSPropertyOutlineOffset
+// CSSPropertyOutlineWidth
+// CSSPropertyStopColor
+// CSSPropertyStopOpacity
+// CSSPropertyStroke
+// CSSPropertyStrokeDashoffset
+// CSSPropertyStrokeMiterlimit
+// CSSPropertyStrokeOpacity
+// CSSPropertyStrokeWidth
+// CSSPropertyTextIndent
+// CSSPropertyTextShadow
+// CSSPropertyVisibility
+// CSSPropertyWebkitBackgroundSize
+// CSSPropertyWebkitBorderHorizontalSpacing
+// CSSPropertyWebkitBorderVerticalSpacing
+// CSSPropertyWebkitBoxShadow
+// CSSPropertyWebkitClipPath
+// CSSPropertyWebkitColumnCount
+// CSSPropertyWebkitColumnGap
+// CSSPropertyWebkitColumnRuleColor
+// CSSPropertyWebkitColumnRuleWidth
+// CSSPropertyWebkitColumnWidth
+// CSSPropertyWebkitFilter
+// CSSPropertyWebkitMaskBoxImage
+// CSSPropertyWebkitMaskBoxImageSource
+// CSSPropertyWebkitMaskImage
+// CSSPropertyWebkitMaskPositionX
+// CSSPropertyWebkitMaskPositionY
+// CSSPropertyWebkitMaskSize
+// CSSPropertyWebkitPerspective
+// CSSPropertyWebkitShapeInside
+// CSSPropertyWebkitTextFillColor
+// CSSPropertyWebkitTextStrokeColor
+// CSSPropertyWebkitTransform
+// CSSPropertyWebkitTransformOriginZ
+// CSSPropertyWidows
+// CSSPropertyWordSpacing
+// CSSPropertyZIndex
+// CSSPropertyZoom
+
+static PassRefPtr<AnimatableValue> createFromLength(const Length& length, const RenderStyle* style)
+{
+    switch (length.type()) {
+    case Relative:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeNumber);
+    case Fixed:
+        return AnimatableNumber::create(adjustFloatForAbsoluteZoom(length.value(), style), AnimatableNumber::UnitTypeLength);
+    case Percent:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypePercentage);
+    case ViewportPercentageWidth:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportWidth);
+    case ViewportPercentageHeight:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportHeight);
+    case ViewportPercentageMin:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportMin);
+    case ViewportPercentageMax:
+        return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportMax);
+    case Calculated:
+        // FIXME: Convert platform calcs to CSS calcs.
+        ASSERT_WITH_MESSAGE(false, "Unable to convert platform CalculationValue to AnimatableValue, not yet implemented!");
+        return 0;
+    case Auto:
+    case Intrinsic:
+    case MinIntrinsic:
+    case MinContent:
+    case MaxContent:
+    case FillAvailable:
+    case FitContent:
+        return AnimatableUnknown::create(CSSPrimitiveValue::create(length));
+    case Undefined:
+        return AnimatableUnknown::create(CSSPrimitiveValue::create(CSSValueNone));
+    case ExtendToZoom: // Does not apply to elements.
+        ASSERT_NOT_REACHED();
+        return 0;
+    }
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
+inline static PassRefPtr<AnimatableValue> createFromDouble(double value)
+{
+    return AnimatableNumber::create(value, AnimatableNumber::UnitTypeNumber);
+}
+
+// FIXME: Generate this function.
+PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID property, const RenderStyle* style)
+{
+    switch (property) {
+    case CSSPropertyBottom:
+        return createFromLength(style->bottom(), style);
+    case CSSPropertyHeight:
+        return createFromLength(style->height(), style);
+    case CSSPropertyLeft:
+        return createFromLength(style->left(), style);
+    case CSSPropertyMarginBottom:
+        return createFromLength(style->marginBottom(), style);
+    case CSSPropertyMarginLeft:
+        return createFromLength(style->marginLeft(), style);
+    case CSSPropertyMarginRight:
+        return createFromLength(style->marginRight(), style);
+    case CSSPropertyMarginTop:
+        return createFromLength(style->marginTop(), style);
+    case CSSPropertyMaxHeight:
+        return createFromLength(style->maxHeight(), style);
+    case CSSPropertyMaxWidth:
+        return createFromLength(style->maxWidth(), style);
+    case CSSPropertyMinHeight:
+        return createFromLength(style->minHeight(), style);
+    case CSSPropertyMinWidth:
+        return createFromLength(style->minWidth(), style);
+    case CSSPropertyOpacity:
+        return createFromDouble(style->opacity());
+    case CSSPropertyPaddingBottom:
+        return createFromLength(style->paddingBottom(), style);
+    case CSSPropertyPaddingLeft:
+        return createFromLength(style->paddingLeft(), style);
+    case CSSPropertyPaddingRight:
+        return createFromLength(style->paddingRight(), style);
+    case CSSPropertyPaddingTop:
+        return createFromLength(style->paddingTop(), style);
+    case CSSPropertyRight:
+        return createFromLength(style->right(), style);
+    case CSSPropertyTop:
+        return createFromLength(style->top(), style);
+    case CSSPropertyWebkitPerspectiveOriginX:
+        return createFromLength(style->perspectiveOriginX(), style);
+    case CSSPropertyWebkitPerspectiveOriginY:
+        return createFromLength(style->perspectiveOriginY(), style);
+    case CSSPropertyWebkitTransformOriginX:
+        return createFromLength(style->transformOriginX(), style);
+    case CSSPropertyWebkitTransformOriginY:
+        return createFromLength(style->transformOriginY(), style);
+    case CSSPropertyWidth:
+        return createFromLength(style->width(), style);
+    default:
+        ASSERT_WITH_MESSAGE(false, "Unable to create AnimatableValue from render style, not yet implemented!");
+        return 0;
+    }
+}
+
+} // namespace WebCore
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.h
similarity index 69%
copy from Source/core/platform/graphics/chromium/ImageChromium.cpp
copy to Source/core/animation/css/CSSAnimatableValueFactory.h
index 0466042..509de23 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,27 +28,22 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
+#ifndef CSSAnimatableValueFactory_h
+#define CSSAnimatableValueFactory_h
 
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
+#include "CSSPropertyNames.h"
+#include "core/animation/AnimatableValue.h"
+#include "wtf/PassRefPtr.h"
 
 namespace WebCore {
 
-// Other Image methods are implemented in ImageSkia.cpp
+class RenderStyle;
 
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
-{
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
-
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
-}
+class CSSAnimatableValueFactory {
+public:
+    static PassRefPtr<AnimatableValue> create(CSSPropertyID, const RenderStyle*);
+};
 
 } // namespace WebCore
+
+#endif // CSSAnimatableValueFactory_h
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
new file mode 100644
index 0000000..281fea9
--- /dev/null
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/animation/css/CSSAnimations.h"
+
+#include "core/animation/DocumentTimeline.h"
+#include "core/animation/KeyframeAnimationEffect.h"
+#include "core/css/CSSKeyframeRule.h"
+#include "core/css/resolver/StyleResolver.h"
+#include "core/dom/AnimationEvent.h"
+#include "core/dom/Element.h"
+#include "core/dom/EventNames.h"
+#include "core/platform/animation/CSSAnimationDataList.h"
+#include "core/platform/animation/TimingFunction.h"
+#include "wtf/HashSet.h"
+
+namespace WebCore {
+
+void timingFromAnimationData(const CSSAnimationData* animationData, Timing& timing)
+{
+    if (animationData->isDelaySet())
+        timing.startDelay = animationData->delay();
+    if (animationData->isDurationSet()) {
+        timing.iterationDuration = animationData->duration();
+        timing.hasIterationDuration = true;
+    }
+    if (animationData->isIterationCountSet()) {
+        if (animationData->iterationCount() == CSSAnimationData::IterationCountInfinite)
+            timing.iterationCount = std::numeric_limits<double>::infinity();
+        else
+            timing.iterationCount = animationData->iterationCount();
+    }
+    if (animationData->isTimingFunctionSet()) {
+        if (!animationData->timingFunction()->isLinearTimingFunction())
+            timing.timingFunction = animationData->timingFunction();
+    } else {
+        // CSS default is ease, default in model is linear.
+        timing.timingFunction = CubicBezierTimingFunction::preset(CubicBezierTimingFunction::Ease);
+    }
+    if (animationData->isFillModeSet()) {
+        switch (animationData->fillMode()) {
+        case AnimationFillModeForwards:
+            timing.fillMode = Timing::FillModeForwards;
+            break;
+        case AnimationFillModeBackwards:
+            timing.fillMode = Timing::FillModeBackwards;
+            break;
+        case AnimationFillModeBoth:
+            timing.fillMode = Timing::FillModeBoth;
+            break;
+        case AnimationFillModeNone:
+            timing.fillMode = Timing::FillModeNone;
+            break;
+        default:
+            ASSERT_NOT_REACHED();
+        }
+    }
+    if (animationData->isDirectionSet()) {
+        switch (animationData->direction()) {
+        case CSSAnimationData::AnimationDirectionNormal:
+            timing.direction = Timing::PlaybackDirectionNormal;
+            break;
+        case CSSAnimationData::AnimationDirectionAlternate:
+            timing.direction = Timing::PlaybackDirectionAlternate;
+            break;
+        case CSSAnimationData::AnimationDirectionReverse:
+            timing.direction = Timing::PlaybackDirectionReverse;
+            break;
+        case CSSAnimationData::AnimationDirectionAlternateReverse:
+            timing.direction = Timing::PlaybackDirectionAlternateReverse;
+            break;
+        default:
+            ASSERT_NOT_REACHED();
+        }
+    }
+}
+
+bool CSSAnimations::needsUpdate(const Element* element, const RenderStyle* style)
+{
+    ActiveAnimations* activeAnimations = element->activeAnimations();
+    const CSSAnimationDataList* animations = style->animations();
+    const CSSAnimations* cssAnimations = activeAnimations ? activeAnimations->cssAnimations() : 0;
+    EDisplay display = style->display();
+    return (display != NONE && animations && animations->size()) || (cssAnimations && !cssAnimations->isEmpty());
+}
+
+PassOwnPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* element, EDisplay display, const CSSAnimations* cssAnimations, const CSSAnimationDataList* animationDataList, StyleResolver* resolver)
+{
+    OwnPtr<CSSAnimationUpdate> update;
+    HashSet<StringImpl*> inactive;
+    if (cssAnimations)
+        for (AnimationMap::const_iterator iter = cssAnimations->m_animations.begin(); iter != cssAnimations->m_animations.end(); ++iter)
+            inactive.add(iter->key);
+
+    RefPtr<MutableStylePropertySet> newStyles;
+    if (display != NONE) {
+        for (size_t i = 0; animationDataList && i < animationDataList->size(); ++i) {
+            const CSSAnimationData* animationData = animationDataList->animation(i);
+            ASSERT(animationData->isValidAnimation());
+            AtomicString animationName(animationData->name());
+
+            if (cssAnimations) {
+                AnimationMap::const_iterator existing(cssAnimations->m_animations.find(animationName.impl()));
+                if (existing != cssAnimations->m_animations.end()) {
+                    inactive.remove(animationName.impl());
+                    continue;
+                }
+            }
+
+            // If there's a delay, no styles will apply yet.
+            if (animationData->isDelaySet() && animationData->delay())
+                continue;
+
+            const StylePropertySet* keyframeStyles = resolver->firstKeyframeStyles(element, animationName.impl());
+            if (keyframeStyles) {
+                if (!update)
+                    update = adoptPtr(new CSSAnimationUpdate());
+                update->addStyles(keyframeStyles);
+            }
+        }
+    }
+
+    if (!inactive.isEmpty() && !update)
+        update = adoptPtr(new CSSAnimationUpdate());
+    for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != inactive.end(); ++iter)
+        update->cancel(cssAnimations->m_animations.get(*iter));
+
+    return update.release();
+}
+
+void CSSAnimations::update(Element* element, const RenderStyle* style)
+{
+    const CSSAnimationDataList* animationDataList = style->animations();
+    HashSet<StringImpl*> inactive;
+    for (AnimationMap::const_iterator iter = m_animations.begin(); iter != m_animations.end(); ++iter)
+        inactive.add(iter->key);
+
+    if (style->display() != NONE) {
+        for (size_t i = 0; animationDataList && i < animationDataList->size(); ++i) {
+            const CSSAnimationData* animationData = animationDataList->animation(i);
+            ASSERT(animationData->isValidAnimation());
+            AtomicString animationName(animationData->name());
+
+            AnimationMap::const_iterator existing(m_animations.find(animationName.impl()));
+            if (existing != m_animations.end()) {
+                bool paused = animationData->playState() == AnimPlayStatePaused;
+                existing->value->setPaused(paused);
+                inactive.remove(animationName.impl());
+                continue;
+            }
+
+            KeyframeAnimationEffect::KeyframeVector keyframes;
+            element->document()->styleResolver()->resolveKeyframes(element, style, animationName.impl(), keyframes);
+            if (!keyframes.isEmpty()) {
+                Timing timing;
+                timingFromAnimationData(animationData, timing);
+                m_animations.set(animationName.impl(), element->document()->timeline()->play(
+                    Animation::create(element, KeyframeAnimationEffect::create(keyframes), timing).get()).get());
+            }
+        }
+    }
+
+    for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != inactive.end(); ++iter)
+        m_animations.take(*iter)->cancel();
+}
+
+void CSSAnimations::cancel()
+{
+    for (AnimationMap::iterator iter = m_animations.begin(); iter != m_animations.end(); ++iter)
+        iter->value->cancel();
+
+    m_animations.clear();
+}
+
+} // namespace WebCore
diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h
new file mode 100644
index 0000000..e228dce
--- /dev/null
+++ b/Source/core/animation/css/CSSAnimations.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CSSAnimations_h
+#define CSSAnimations_h
+
+#include "core/animation/Animation.h"
+
+#include "core/animation/Player.h"
+#include "core/css/StylePropertySet.h"
+#include "core/platform/animation/CSSAnimationData.h"
+#include "core/rendering/style/RenderStyleConstants.h"
+#include "wtf/HashMap.h"
+#include "wtf/HashSet.h"
+#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
+
+namespace WebCore {
+
+class CSSAnimationDataList;
+class Element;
+class RenderObject;
+class StyleResolver;
+
+class CSSAnimationUpdate FINAL {
+public:
+    const StylePropertySet* styles() const { return m_styles.get(); }
+    bool isFiltered(const Player* player) const { return m_filtered.contains(player); }
+    void cancel(const Player* player)
+    {
+        m_filtered.add(player);
+    }
+    void addStyles(const StylePropertySet* styles)
+    {
+        if (!m_styles)
+            m_styles = MutableStylePropertySet::create();
+        m_styles->mergeAndOverrideOnConflict(styles);
+    }
+private:
+    HashSet<const Player*> m_filtered;
+    RefPtr<MutableStylePropertySet> m_styles;
+};
+
+class CSSAnimations FINAL {
+public:
+    static bool needsUpdate(const Element*, const RenderStyle*);
+    static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(const Element*, EDisplay, const CSSAnimations*, const CSSAnimationDataList*, StyleResolver*);
+    void update(Element*, const RenderStyle*);
+    bool isEmpty() const { return m_animations.isEmpty(); }
+    void cancel();
+private:
+    typedef HashMap<StringImpl*, Player*> AnimationMap;
+    AnimationMap m_animations;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/core/core.gyp b/Source/core/core.gyp
index bc04222..fe62d41 100644
--- a/Source/core/core.gyp
+++ b/Source/core/core.gyp
@@ -30,7 +30,7 @@
 
 {
   'includes': [
-    '../WebKit/chromium/WinPrecompile.gypi',
+    '../build/win/precompile.gypi',
     'features.gypi',
     '../modules/modules.gypi',
     '../bindings/bindings.gypi',
@@ -40,14 +40,11 @@
   'variables': {
     'enable_wexit_time_destructors': 1,
 
-    # TODO: temporary variable until we've switched from v8-i18n to v8's i18n support.
-    'v8_enable_i18n_support%': 0,
-
     'webcore_include_dirs': [
       '../..',
       '..',
-      '<(SHARED_INTERMEDIATE_DIR)/webkit',
-      '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
+      '<(SHARED_INTERMEDIATE_DIR)/blink',
+      '<(SHARED_INTERMEDIATE_DIR)/blink/bindings',
     ],
 
     'conditions': [
@@ -84,12 +81,12 @@
             '../devtools/protocol.json',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorTypeBuilder.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorTypeBuilder.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.h',
           ],
           'variables': {
             'generator_include_dirs': [
@@ -99,7 +96,7 @@
             'python',
             'inspector/CodeGeneratorInspector.py',
             '../devtools/protocol.json',
-            '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/webkit',
+            '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
           'message': 'Generating Inspector protocol backend sources from protocol.json',
           'msvs_cygwin_shell': 1,
@@ -120,19 +117,19 @@
             'inspector/InspectorInstrumentation.idl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorCanvasInstrumentationInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorConsoleInstrumentationInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorDatabaseInstrumentationInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorInstrumentationInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorOverridesInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InstrumentingAgentsInl.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorInstrumentationImpl.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorCanvasInstrumentationInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorConsoleInstrumentationInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorDatabaseInstrumentationInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverridesInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InstrumentingAgentsInl.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationImpl.cpp',
           ],
           'action': [
             'python',
             'inspector/CodeGeneratorInstrumentation.py',
             'inspector/InspectorInstrumentation.idl',
-            '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/webkit',
+            '--output_dir', '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
           'message': 'Generating Inspector instrumentation code from InspectorInstrumentation.idl',
           'msvs_cygwin_shell': 1,
@@ -150,7 +147,7 @@
             '../devtools/protocol.json',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorProtocolVersion.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorProtocolVersion.h',
           ],
           'variables': {
             'generator_include_dirs': [
@@ -172,7 +169,7 @@
       'type': 'none',
       'variables': {
         'input_file_path': 'inspector/InspectorOverlayPage.html',
-        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorOverlayPage.h',
+        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverlayPage.h',
         'character_array_name': 'InspectorOverlayPage_html',
       },
       'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ],
@@ -182,7 +179,7 @@
       'type': 'none',
       'variables': {
         'input_file_path': 'inspector/InjectedScriptCanvasModuleSource.js',
-        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptCanvasModuleSource.h',
+        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptCanvasModuleSource.h',
         'character_array_name': 'InjectedScriptCanvasModuleSource_js',
       },
       'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ],
@@ -192,7 +189,7 @@
       'type': 'none',
       'variables': {
         'input_file_path': 'inspector/InjectedScriptSource.js',
-        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptSource.h',
+        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/InjectedScriptSource.h',
         'character_array_name': 'InjectedScriptSource_js',
       },
       'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ],
@@ -202,7 +199,7 @@
       'type': 'none',
       'variables': {
         'input_file_path': '<(bindings_dir)/v8/DebuggerScript.js',
-        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/webkit/DebuggerScriptSource.h',
+        'output_file_path': '<(SHARED_INTERMEDIATE_DIR)/blink/DebuggerScriptSource.h',
         'character_array_name': 'DebuggerScriptSource_js',
       },
       'includes': [ 'ConvertFileToHeaderWithCharacterArray.gypi' ],
@@ -236,8 +233,8 @@
         '<(libjpeg_gyp_path):libjpeg',
       ],
       'include_dirs': [
-        '<(SHARED_INTERMEDIATE_DIR)/webkit',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
+        '<(SHARED_INTERMEDIATE_DIR)/blink',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings',
         '<@(webcore_include_dirs)',
 
         # FIXME: Remove these once the bindings script generates qualified
@@ -259,78 +256,70 @@
         '<@(bindings_files)',
 
         # Additional .cpp files for HashTools.h
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/ColorData.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CSSPropertyNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CSSValueKeywords.cpp',
 
         # Additional .cpp files from make_derived_sources actions.
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/FetchInitiatorTypeNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/Event.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/FontFamilyNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLElementFactory.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/FetchInitiatorTypeNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/Event.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/EventHeaders.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetHeaders.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetInterfaces.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/UserAgentStyleSheetsData.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/V8HTMLElementWrapperFactory.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/XLinkNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNSNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/SVGNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/MathMLNames.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/FontFamilyNames.cpp',
 
         # Generated from HTMLEntityNames.in
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLEntityTable.cpp',
 
         # Generated from RuntimeEnabledFeatures.in
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/RuntimeEnabledFeatures.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/RuntimeEnabledFeatures.cpp',
 
         # Generated from CSSParser-in.cpp
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSParser.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CSSParser.cpp',
 
         # Additional .cpp files from the make_derived_sources rules.
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CSSGrammar.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/XPathGrammar.cpp',
 
         # Additional .cpp files from the inspector_protocol_sources list.
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorTypeBuilder.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorFrontend.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorBackendDispatcher.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorTypeBuilder.cpp',
 
         # Additional .cpp files from the inspector_instrumentation_sources list.
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorCanvasInstrumentationInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorConsoleInstrumentationInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorDatabaseInstrumentationInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorInstrumentationInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorOverridesInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InstrumentingAgentsInl.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorInstrumentationImpl.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorCanvasInstrumentationInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorConsoleInstrumentationInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorDatabaseInstrumentationInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorOverridesInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InstrumentingAgentsInl.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/InspectorInstrumentationImpl.cpp',
 
         # Additional .cpp files for SVG.
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/SVGElementFactory.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/V8SVGElementWrapperFactory.cpp',
 
         # Generated from make_style_shorthands.py
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/StylePropertyShorthand.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/StylePropertyShorthand.cpp',
 
         # Generated from make_style_builder.py
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/StyleBuilder.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/StyleBuilderFunctions.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilder.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilderFunctions.cpp',
       ],
       'conditions': [
-        ['v8_enable_i18n_support==0', {
-          'dependencies': [
-            '<(DEPTH)/third_party/v8-i18n/build/all.gyp:v8-i18n',
-          ],
-          'defines': [
-            'USE_I18N_EXTENSION',
-          ],
-        }],
         ['OS=="win" and component=="shared_library"', {
           'defines': [
             'USING_V8_SHARED',
@@ -578,11 +567,6 @@
         'dom/default/PlatformMessagePortChannel.cpp',
         'dom/default/PlatformMessagePortChannel.h',
       ],
-      'sources/': [
-        # FIXME: Figure out how to store these patterns in a variable.
-        ['exclude', '(cf|cg|mac|opentype|svg|win)/'],
-        ['exclude', '(?<!Chromium)(CF|CG|Mac|OpenType|Win)\\.(cpp|mm?)$'],
-      ],
       # Disable c4267 warnings until we fix size_t to int truncations.
       'msvs_disabled_warnings': [ 4267, ],
     },
@@ -727,6 +711,8 @@
             ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
             ['include', 'platform/mac/NSScrollerImpDetails\\.mm$'],
             ['include', 'platform/mac/ScrollbarThemeMac\\.mm$'],
+            ['include', 'platform/mac/ScrollbarThemeMacNonOverlayAPI\\.mm$'],
+            ['include', 'platform/mac/ScrollbarThemeMacOverlayAPI\\.mm$'],
             ['include', 'platform/mac/ScrollAnimatorMac\\.mm$'],
             ['include', 'platform/mac/ScrollElasticityController\\.mm$'],
             ['include', 'platform/mac/ThemeMac\\.h$'],
@@ -748,9 +734,9 @@
             # implementation.
             ['exclude', 'platform/KillRingNone\\.cpp$'],
 
-            # The Mac currently uses FontCustomPlatformData.cpp from
-            # platform/graphics/mac, included by regex above, instead.
-            ['exclude', 'platform/graphics/skia/FontCustomPlatformData\\.cpp$'],
+            # The Mac currently uses FontCustomPlatformDataMac.cpp,
+            # included by regex above, instead.
+            ['exclude', 'platform/graphics/skia/FontCustomPlatformDataSkia\\.cpp$'],
 
             # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
             # related to ScrollbarThemeChromium.cpp.
@@ -800,6 +786,10 @@
 
             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
 
+            # Windows currently uses FontCustomPlatformDataWin.cpp instead.
+            ['exclude', 'platform/graphics/skia/FontCustomPlatformDataSkia\\.cpp$'],
+            ['include', 'platform/graphics/win/FontCustomPlatformDataWin\\.cpp$'],
+
             # SystemInfo.cpp is useful and we don't want to copy it.
             ['include', 'platform/win/SystemInfo\\.cpp$'],
 
@@ -832,7 +822,7 @@
         }],
         ['OS=="win" and chromium_win_pch==1', {
           'sources/': [
-            ['include', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WinPrecompile.cpp'],
+            ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
           ],
         }],
         ['OS=="android"', {
@@ -936,7 +926,7 @@
         }],
         ['OS=="win" and chromium_win_pch==1', {
           'sources/': [
-            ['include', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WinPrecompile.cpp'],
+            ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
           ],
         }],
         ['OS=="mac"', {
@@ -994,11 +984,6 @@
         ['exclude', '(?<!Chromium)(CF|CG|Mac|OpenType|Win)\\.(cpp|mm?)$'],
       ],
       'conditions': [
-        ['v8_enable_i18n_support==0', {
-          'dependencies': [
-            '<(DEPTH)/third_party/v8-i18n/build/all.gyp:v8-i18n',
-          ],
-        }],
         # Shard this taret into parts to work around linker limitations.
         # on link time code generation builds.
         ['OS=="win" and buildtype=="Official"', {
@@ -1026,6 +1011,11 @@
         ['OS!="mac"', {
           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
         }],
+        ['OS=="win" and chromium_win_pch==1', {
+          'sources/': [
+            ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
+          ],
+        }],
       ],
       # Disable c4267 warnings until we fix size_t to int truncations.
       'msvs_disabled_warnings': [ 4267, 4334, ],
@@ -1116,24 +1106,26 @@
       ],
       'sources': [
         '<@(webcore_test_support_files)',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8MallocStatistics.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8MallocStatistics.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8TypeConversions.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8TypeConversions.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalProfilers.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalProfilers.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettings.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettings.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettingsGenerated.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettingsGenerated.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalRuntimeFlags.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalRuntimeFlags.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8LayerRect.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8LayerRect.h',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8LayerRectList.cpp',
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8LayerRectList.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8GCObservation.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8GCObservation.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8MallocStatistics.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8MallocStatistics.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8TypeConversions.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8TypeConversions.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8Internals.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8Internals.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalProfilers.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalProfilers.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalSettings.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalSettings.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalSettingsGenerated.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalSettingsGenerated.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalRuntimeFlags.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8InternalRuntimeFlags.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8LayerRect.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8LayerRect.h',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8LayerRectList.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/V8LayerRectList.h',
       ],
       'sources/': [
         ['exclude', 'testing/js'],
diff --git a/Source/core/core.gypi b/Source/core/core.gypi
index 8bb8d3b..d9e4a12 100644
--- a/Source/core/core.gypi
+++ b/Source/core/core.gypi
@@ -90,10 +90,8 @@
             'dom/Promise.idl',
             'dom/PromiseResolver.idl',
             'dom/Range.idl',
-            'dom/RequestAnimationFrameCallback.idl',
             'dom/ResourceProgressEvent.idl',
             'dom/SecurityPolicyViolationEvent.idl',
-            'dom/StringCallback.idl',
             'dom/Text.idl',
             'dom/TextEvent.idl',
             'dom/Touch.idl',
@@ -270,7 +268,7 @@
             'page/EventSource.idl',
             'page/History.idl',
             'page/ImageBitmap.idl',
-            'page/ImageBitmapCallback.idl',
+            'page/ImageBitmapFactories.idl',
             'page/Location.idl',
             'page/MemoryInfo.idl',
             'page/Navigator.idl',
@@ -321,6 +319,8 @@
             'dom/ChildNode.idl',
             'dom/DocumentFullscreen.idl',
             'dom/ParentNode.idl',
+            'dom/RequestAnimationFrameCallback.idl',
+            'dom/StringCallback.idl',
             'html/VoidCallback.idl',
             'page/WindowPagePopup.idl',
             'workers/AbstractWorker.idl',
@@ -451,7 +451,6 @@
             'svg/SVGStopElement.idl',
             'svg/SVGStringList.idl',
             'svg/SVGStyleElement.idl',
-            'svg/SVGStyledElement.idl',
             'svg/SVGSwitchElement.idl',
             'svg/SVGSymbolElement.idl',
             'svg/SVGTRefElement.idl',
@@ -555,6 +554,10 @@
             'animation/TimedItem.h',
             'animation/TimedItemCalculations.h',
             'animation/Timing.h',
+            'animation/css/CSSAnimatableValueFactory.cpp',
+            'animation/css/CSSAnimatableValueFactory.h',
+            'animation/css/CSSAnimations.cpp',
+            'animation/css/CSSAnimations.h',
             'css/BasicShapeFunctions.cpp',
             'css/CSSArrayFunctionValue.cpp',
             'css/CSSArrayFunctionValue.h',
@@ -597,6 +600,8 @@
             'css/CSSFunctionValue.h',
             'css/CSSGradientValue.cpp',
             'css/CSSGradientValue.h',
+            'css/CSSGridTemplateValue.cpp',
+            'css/CSSGridTemplateValue.h',
             'css/CSSGroupingRule.cpp',
             'css/CSSGroupingRule.h',
             'css/CSSHostRule.cpp',
@@ -1074,7 +1079,6 @@
             'loader/ResourceLoaderOptions.h',
             'loader/SinkDocument.cpp',
             'loader/SinkDocument.h',
-            'loader/SubframeLoader.cpp',
             'loader/SubstituteData.cpp',
             'loader/SubstituteData.h',
             'loader/TextResourceDecoder.cpp',
@@ -1130,6 +1134,7 @@
             'page/Chrome.cpp',
             'page/Console.cpp',
             'page/ContentSecurityPolicy.cpp',
+            'page/ContentSecurityPolicyResponseHeaders.cpp',
             'page/ContextMenuController.cpp',
             'page/ContextMenuProvider.h',
             'page/CreateWindow.cpp',
@@ -1171,8 +1176,8 @@
             'page/History.h',
             'page/ImageBitmap.cpp',
             'page/ImageBitmap.h',
-            'page/ImageBitmapCallback.cpp',
-            'page/ImageBitmapCallback.h',
+            'page/ImageBitmapFactories.cpp',
+            'page/ImageBitmapFactories.h',
             'page/LayoutMilestones.h',
             'page/Location.cpp',
             'page/Location.h',
@@ -1319,8 +1324,6 @@
             'rendering/PointerEventsHitRules.h',
             'rendering/RenderApplet.cpp',
             'rendering/RenderApplet.h',
-            'rendering/RenderArena.cpp',
-            'rendering/RenderArena.h',
             'rendering/RenderBR.cpp',
             'rendering/RenderBlock.cpp',
             'rendering/RenderBlockLineLayout.cpp',
@@ -1480,7 +1483,6 @@
             'rendering/RenderVideo.h',
             'rendering/RenderView.cpp',
             'rendering/RenderWidget.cpp',
-            'rendering/RenderWidgetProtector.h',
             'rendering/RenderWordBreak.cpp',
             'rendering/RenderWordBreak.h',
             'rendering/RootInlineBox.cpp',
@@ -1826,8 +1828,8 @@
             'dom/ExceptionCodePlaceholder.cpp',
             'dom/FocusEvent.cpp',
             'dom/FocusEvent.h',
-            'dom/FullscreenController.cpp',
-            'dom/FullscreenController.h',
+            'dom/FullscreenElementStack.cpp',
+            'dom/FullscreenElementStack.h',
             'dom/GenericEventQueue.cpp',
             'dom/GenericEventQueue.h',
             'dom/GestureEvent.cpp',
@@ -2516,8 +2518,6 @@
             'html/track/WebVTTTokenizer.h',
         ],
         'webcore_platform_files': [
-            'platform/Arena.cpp',
-            'platform/Arena.h',
             'platform/AsyncFileSystem.h',
             'platform/AsyncFileSystemCallbacks.h',
             'platform/CalculationValue.cpp',
@@ -2775,6 +2775,8 @@
             'platform/graphics/FontFastPath.cpp',
             'platform/graphics/FontPlatformData.cpp',
             'platform/graphics/FontPlatformData.h',
+            'platform/graphics/FrameData.cpp',
+            'platform/graphics/FrameData.h',
             'platform/graphics/LayoutBoxExtent.cpp',
             'platform/graphics/GeneratorGeneratedImage.cpp',
             'platform/graphics/GeneratedImage.cpp',
@@ -2845,7 +2847,6 @@
             'platform/graphics/chromium/FontUtilsChromiumWin.cpp',
             'platform/graphics/chromium/FontUtilsChromiumWin.h',
             'platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp',
-            'platform/graphics/chromium/ImageChromium.cpp',
             'platform/graphics/chromium/ImageDecodingStore.cpp',
             'platform/graphics/chromium/ImageDecodingStore.h',
             'platform/graphics/chromium/ImageFrameGenerator.cpp',
@@ -2981,8 +2982,7 @@
             'platform/graphics/mac/FloatSizeMac.mm',
             'platform/graphics/mac/FontCacheMac.mm',
             'platform/graphics/mac/FontComplexTextMac.cpp',
-            'platform/graphics/mac/FontCustomPlatformData.cpp',
-            'platform/graphics/mac/FontCustomPlatformData.h',
+            'platform/graphics/mac/FontCustomPlatformDataMac.cpp',
             'platform/graphics/mac/FontMac.cpp',
             'platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
             'platform/graphics/mac/IntPointMac.mm',
@@ -2998,11 +2998,9 @@
             'platform/graphics/opentype/OpenTypeVerticalData.cpp',
             'platform/graphics/opentype/OpenTypeVerticalData.h',
             'platform/graphics/skia/FontCacheSkia.cpp',
-            'platform/graphics/skia/FontCustomPlatformData.cpp',
-            'platform/graphics/skia/FontCustomPlatformData.h',
+            'platform/graphics/skia/FontCustomPlatformDataSkia.cpp',
             'platform/graphics/skia/FontPlatformDataSkia.cpp',
             'platform/graphics/skia/GlyphPageTreeNodeSkia.cpp',
-            'platform/graphics/skia/ImageSkia.cpp',
             'platform/graphics/skia/NativeImageSkia.cpp',
             'platform/graphics/skia/NativeImageSkia.h',
             'platform/graphics/skia/OpaqueRegionSkia.cpp',
@@ -3032,6 +3030,7 @@
             'platform/graphics/transforms/TransformState.h',
             'platform/graphics/transforms/TranslateTransformOperation.cpp',
             'platform/graphics/transforms/TranslateTransformOperation.h',
+            'platform/graphics/win/FontCustomPlatformDataWin.cpp',
             'platform/image-decoders/ImageDecoder.cpp',
             'platform/image-decoders/ImageDecoder.h',
             'platform/image-decoders/ImageFrame.cpp',
@@ -3069,6 +3068,10 @@
             'platform/mac/ScrollElasticityController.mm',
             'platform/mac/ScrollbarThemeMac.h',
             'platform/mac/ScrollbarThemeMac.mm',
+            'platform/mac/ScrollbarThemeMacNonOverlayAPI.h',
+            'platform/mac/ScrollbarThemeMacNonOverlayAPI.mm',
+            'platform/mac/ScrollbarThemeMacOverlayAPI.h',
+            'platform/mac/ScrollbarThemeMacOverlayAPI.mm',
             'platform/mac/ThemeMac.h',
             'platform/mac/ThemeMac.mm',
             'platform/mac/WebFontCache.mm',
@@ -3146,8 +3149,6 @@
             'platform/text/AtomicStringKeyedMRUCache.h',
             'platform/text/BidiContext.cpp',
             'platform/text/DateTimeFormat.cpp',
-            'platform/text/Hyphenation.cpp',
-            'platform/text/Hyphenation.h',
             'platform/text/LineEnding.cpp',
             'platform/text/LocaleICU.cpp',
             'platform/text/LocaleICU.h',
@@ -3583,8 +3584,6 @@
             'svg/SVGStringList.h',
             'svg/SVGStyleElement.cpp',
             'svg/SVGStyleElement.h',
-            'svg/SVGStyledElement.cpp',
-            'svg/SVGStyledElement.h',
             'svg/SVGSwitchElement.cpp',
             'svg/SVGSwitchElement.h',
             'svg/SVGSymbolElement.cpp',
@@ -3614,6 +3613,8 @@
             'svg/SVGURIReference.cpp',
             'svg/SVGURIReference.h',
             'svg/SVGUnitTypes.h',
+            'svg/SVGUnknownElement.cpp',
+            'svg/SVGUnknownElement.h',
             'svg/SVGUseElement.cpp',
             'svg/SVGUseElement.h',
             'svg/SVGVKernElement.cpp',
@@ -3650,6 +3651,7 @@
             'svg/properties/SVGPathSegListPropertyTearOff.cpp',
         ],
         'deprecated_perl_webcore_test_support_idl_files': [
+          'testing/GCObservation.idl',
           'testing/Internals.idl',
           'testing/InternalProfilers.idl',
           'testing/InternalSettings.idl',
@@ -3657,14 +3659,16 @@
           'testing/LayerRectList.idl',
           'testing/MallocStatistics.idl',
           'testing/TypeConversions.idl',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.idl',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalRuntimeFlags.idl',
+          '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.idl',
+          '<(SHARED_INTERMEDIATE_DIR)/blink/InternalRuntimeFlags.idl',
         ],
         'python_webcore_test_support_idl_files': [
         ],
         'webcore_test_support_files': [
             'testing/v8/WebCoreTestSupport.cpp',
             'testing/v8/WebCoreTestSupport.h',
+            'testing/GCObservation.cpp',
+            'testing/GCObservation.h',
             'testing/InspectorFrontendClientLocal.cpp',
             'testing/InspectorFrontendClientLocal.h',
             'testing/Internals.cpp',
@@ -3680,8 +3684,8 @@
             'testing/MockPagePopupDriver.cpp',
             'testing/MockPagePopupDriver.h',
             'testing/TypeConversions.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.h',
         ],
         'webcore_platform_support_files': [
             'platform/chromium/support/Platform.cpp',
@@ -3769,10 +3773,17 @@
             'platform/image-decoders/gif/GIFImageDecoderTest.cpp',
             'platform/image-decoders/webp/WEBPImageDecoderTest.cpp',
             'platform/text/DateTimeFormatTest.cpp',
+            'tests/ArenaTestHelpers.h',
             'tests/FakeWebGraphicsContext3D.h',
             'tests/HTMLDimension.cpp',
             'tests/LayoutUnit.cpp',
             'tests/LinkRelAttribute.cpp',
+            'tests/PODArenaTest.cpp',
+            'tests/PODFreeListArenaTest.cpp',
+            'tests/PODIntervalTreeTest.cpp',
+            'tests/PODRedBlackTreeTest.cpp',
+            'tests/TreeTestHelpers.cpp',
+            'tests/TreeTestHelpers.h',
         ],
         'scripts_for_in_files': [
             'scripts/in_file.py',
diff --git a/Source/core/core_derived_sources.gyp b/Source/core/core_derived_sources.gyp
index aee61bf..7e09172 100644
--- a/Source/core/core_derived_sources.gyp
+++ b/Source/core/core_derived_sources.gyp
@@ -47,10 +47,10 @@
             'page/Settings.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/SettingsMacros.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.idl',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/SettingsMacros.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.idl',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalSettingsGenerated.h',
           ],
           'action': [
             'python',
@@ -71,15 +71,15 @@
             'scripts/templates/InternalRuntimeFlags.idl.tmpl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalRuntimeFlags.idl',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalRuntimeFlags.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalRuntimeFlags.idl',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/InternalRuntimeFlags.h',
           ],
           'action': [
             'python',
             'scripts/make_internal_runtime_flags.py',
             'page/RuntimeEnabledFeatures.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
       ]
@@ -93,7 +93,7 @@
       ],
       'sources': [
         # bison rule
-        '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',
+        '<(SHARED_INTERMEDIATE_DIR)/blink/CSSGrammar.y',
         'xml/XPathGrammar.y',
 
         # gperf rule
@@ -106,7 +106,7 @@
             '<(bindings_dir)/v8/custom/V8ArrayBufferViewCustomScript.js',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/V8ArrayBufferViewCustomScript.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/V8ArrayBufferViewCustomScript.h',
           ],
           'msvs_cygwin_shell': 0,
           'action': [
@@ -124,7 +124,7 @@
             'xml/XMLViewer.css',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerCSS.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLViewerCSS.h',
           ],
           'msvs_cygwin_shell': 0,
           'action': [
@@ -141,7 +141,7 @@
             'xml/XMLViewer.js',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerJS.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLViewerJS.h',
           ],
           'msvs_cygwin_shell': 0,
           'action': [
@@ -159,7 +159,7 @@
             'html/parser/HTMLEntityNames.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp'
+            '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLEntityTable.cpp'
           ],
           'action': [
             'python',
@@ -179,15 +179,15 @@
             'scripts/templates/RuntimeEnabledFeatures.h.tmpl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/RuntimeEnabledFeatures.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/RuntimeEnabledFeatures.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/RuntimeEnabledFeatures.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/RuntimeEnabledFeatures.h',
           ],
           'action': [
             'python',
             'scripts/make_runtime_features.py',
             'page/RuntimeEnabledFeatures.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
         {
@@ -204,15 +204,15 @@
             '<@(in_files)'
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSPropertyNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSPropertyNames.h',
           ],
           'action': [
             'python',
             'scripts/make_css_property_names.py',
             '<@(in_files)',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
             '--defines', '<(feature_defines)',
           ],
           'msvs_cygwin_shell': 1,
@@ -227,15 +227,15 @@
             'scripts/templates/StylePropertyShorthand.cpp.tmpl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/StylePropertyShorthand.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/StylePropertyShorthand.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/StylePropertyShorthand.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/StylePropertyShorthand.h',
           ],
           'action': [
             'python',
             'scripts/make_style_shorthands.py',
             'css/CSSShorthands.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
         {
@@ -249,16 +249,16 @@
             'scripts/templates/StyleBuilderFunctions.cpp.tmpl',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/StyleBuilder.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/StyleBuilderFunctions.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/StyleBuilderFunctions.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilder.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilderFunctions.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/StyleBuilderFunctions.cpp',
           ],
           'action': [
             'python',
             'scripts/make_style_builder.py',
             'css/CSSProperties.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
         {
@@ -275,14 +275,14 @@
             '<@(in_files)'
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSValueKeywords.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSValueKeywords.h',
           ],
           'action': [
              'scripts/make_css_value_keywords.py',
              '<@(in_files)',
              '--output_dir',
-             '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+             '<(SHARED_INTERMEDIATE_DIR)/blink',
             '--defines', '<(feature_defines)',
           ],
           'msvs_cygwin_shell': 1,
@@ -297,11 +297,11 @@
             'html/HTMLAttributeNames.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/HTMLElementFactory.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/V8HTMLElementWrapperFactory.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/V8HTMLElementWrapperFactory.h',
           ],
           'action': [
             'python',
@@ -324,8 +324,8 @@
             'css/FontFamilyNames.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/FontFamilyNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/FontFamilyNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/FontFamilyNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/FontFamilyNames.h',
           ],
           'action': [
             'python',
@@ -348,12 +348,12 @@
             'svg/svgattrs.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/SVGNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/SVGNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/SVGElementFactory.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/SVGElementFactory.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/V8SVGElementWrapperFactory.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/V8SVGElementWrapperFactory.h',
           ],
           'action': [
             'python',
@@ -372,21 +372,21 @@
           'inputs': [
             '<@(scripts_for_in_files)',
             'scripts/make_event_factory.py',
-            '<(SHARED_INTERMEDIATE_DIR)/EventNames.in',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in',
             'dom/EventAliases.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/Event.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/Event.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventHeaders.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.h',
           ],
           'action': [
             'python',
             'scripts/make_event_factory.py',
-            '<(SHARED_INTERMEDIATE_DIR)/EventNames.in',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in',
             'dom/EventAliases.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
         {
@@ -397,15 +397,15 @@
             'dom/EventTargetFactory.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetHeaders.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/EventTargetInterfaces.h',
           ],
           'action': [
             'python',
             'scripts/make_event_factory.py',
             'dom/EventTargetFactory.in',
             '--output_dir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
           ],
         },
         {
@@ -418,8 +418,8 @@
             'mathml/mathattrs.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/MathMLNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/MathMLNames.h',
           ],
           'action': [
             'python',
@@ -460,8 +460,8 @@
             '<@(stylesheets)'
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/UserAgentStyleSheets.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/UserAgentStyleSheetsData.cpp',
           ],
           'action': [
             'python',
@@ -484,8 +484,8 @@
             'loader/cache/FetchInitiatorTypeNames.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/FetchInitiatorTypeNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/FetchInitiatorTypeNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/FetchInitiatorTypeNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/FetchInitiatorTypeNames.h',
           ],
           'action': [
             'python',
@@ -505,14 +505,14 @@
             'Resources/pagepopups/pickerCommon.js',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.cpp',
           ],
           'action': [
             'python',
             'scripts/make-file-arrays.py',
-            '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.h',
-            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
+            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.h',
+            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/PickerCommon.cpp',
             '<@(_inputs)',
           ],
         },
@@ -527,15 +527,15 @@
             'Resources/pagepopups/suggestionPicker.js',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.cpp',
           ],
           'action': [
             'python',
             'scripts/make-file-arrays.py',
             '--condition=ENABLE(CALENDAR_PICKER)',
-            '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.h',
-            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
+            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.h',
+            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/CalendarPicker.cpp',
             '<@(_inputs)',
           ],
         },
@@ -546,14 +546,14 @@
             'Resources/pagepopups/colorSuggestionPicker.js',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.h',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.cpp',
           ],
           'action': [
             'python',
             'scripts/make-file-arrays.py',
-            '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.h',
-            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
+            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.h',
+            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/ColorSuggestionPicker.cpp',
             '<@(_inputs)',
           ],
         },
@@ -566,8 +566,8 @@
             'svg/xlinkattrs.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XLinkNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XLinkNames.h',
           ],
           'action': [
             'python',
@@ -589,8 +589,8 @@
             'xml/xmlnsattrs.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNSNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNSNames.h',
           ],
           'action': [
             'python',
@@ -612,8 +612,8 @@
             'xml/xmlattrs.in',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNames.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/XMLNames.h',
           ],
           'action': [
             'python',
@@ -633,14 +633,14 @@
             'css/CSSGrammar.y.includes',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSGrammar.y',
           ],
           'action': [
             '<(perl_exe)',
             '-Iscripts',
             'css/makegrammar.pl',
             '--outputDir',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
             '<@(_inputs)',
           ],
         },
@@ -652,13 +652,13 @@
             '../core/css/CSSParser-in.cpp',
           ],
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSParser.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSParser.cpp',
           ],
           'action': [
             'python',
             '../core/scripts/make_token_matcher.py',
             '../core/css/CSSParser-in.cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSParser.cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/CSSParser.cpp',
           ],
         },
       ],
@@ -667,14 +667,14 @@
           'rule_name': 'bison',
           'extension': 'y',
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
+            '<(SHARED_INTERMEDIATE_DIR)/blink/<(RULE_INPUT_ROOT).cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/<(RULE_INPUT_ROOT).h'
           ],
           'action': [
             'python',
             'scripts/rule_bison.py',
             '<(RULE_INPUT_PATH)',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
             '<(bison_exe)',
           ],
           'msvs_cygwin_shell': 1,
@@ -683,7 +683,7 @@
           'rule_name': 'gperf',
           'extension': 'gperf',
           'outputs': [
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
+            '<(SHARED_INTERMEDIATE_DIR)/blink/<(RULE_INPUT_ROOT).cpp',
           ],
           'inputs': [
             'scripts/make-hash-tools.pl',
@@ -692,7 +692,7 @@
           'action': [
             '<(perl_exe)',
             'scripts/make-hash-tools.pl',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit',
+            '<(SHARED_INTERMEDIATE_DIR)/blink',
             '<(RULE_INPUT_PATH)',
             '<(gperf_exe)',
           ],
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 6fdc5a2..ee703d1 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -34,6 +34,7 @@
 #include "core/css/CSSBorderImage.h"
 #include "core/css/CSSFilterValue.h"
 #include "core/css/CSSFunctionValue.h"
+#include "core/css/CSSGridTemplateValue.h"
 #include "core/css/CSSLineBoxContainValue.h"
 #include "core/css/CSSMixFunctionValue.h"
 #include "core/css/CSSParser.h"
@@ -267,10 +268,6 @@
     CSSPropertyGridRowStart,
     CSSPropertyWebkitHighlight,
     CSSPropertyWebkitHyphenateCharacter,
-    CSSPropertyWebkitHyphenateLimitAfter,
-    CSSPropertyWebkitHyphenateLimitBefore,
-    CSSPropertyWebkitHyphenateLimitLines,
-    CSSPropertyWebkitHyphens,
     CSSPropertyWebkitLineAlign,
     CSSPropertyWebkitLineBoxContain,
     CSSPropertyWebkitLineBreak,
@@ -1980,6 +1977,14 @@
         case CSSPropertyGridArea:
             return getCSSPropertyValuesForGridShorthand(gridAreaShorthand());
 
+        case CSSPropertyGridTemplate:
+            if (!style->namedGridAreaRowCount()) {
+                ASSERT(!style->namedGridAreaColumnCount());
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            }
+
+            return CSSGridTemplateValue::create(style->namedGridArea(), style->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
+
         case CSSPropertyHeight:
             if (renderer) {
                 // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property,
@@ -1993,24 +1998,10 @@
             if (style->highlight() == nullAtom)
                 return cssValuePool().createIdentifierValue(CSSValueNone);
             return cssValuePool().createValue(style->highlight(), CSSPrimitiveValue::CSS_STRING);
-        case CSSPropertyWebkitHyphens:
-            return cssValuePool().createValue(style->hyphens());
         case CSSPropertyWebkitHyphenateCharacter:
             if (style->hyphenationString().isNull())
                 return cssValuePool().createIdentifierValue(CSSValueAuto);
             return cssValuePool().createValue(style->hyphenationString(), CSSPrimitiveValue::CSS_STRING);
-        case CSSPropertyWebkitHyphenateLimitAfter:
-            if (style->hyphenationLimitAfter() < 0)
-                return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
-            return CSSPrimitiveValue::create(style->hyphenationLimitAfter(), CSSPrimitiveValue::CSS_NUMBER);
-        case CSSPropertyWebkitHyphenateLimitBefore:
-            if (style->hyphenationLimitBefore() < 0)
-                return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
-            return CSSPrimitiveValue::create(style->hyphenationLimitBefore(), CSSPrimitiveValue::CSS_NUMBER);
-        case CSSPropertyWebkitHyphenateLimitLines:
-            if (style->hyphenationLimitLines() < 0)
-                return CSSPrimitiveValue::createIdentifier(CSSValueNoLimit);
-            return CSSPrimitiveValue::create(style->hyphenationLimitLines(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBorderFit:
             if (style->borderFit() == BorderFitBorder)
                 return cssValuePool().createIdentifierValue(CSSValueBorder);
diff --git a/Source/core/css/CSSDefaultStyleSheets.cpp b/Source/core/css/CSSDefaultStyleSheets.cpp
index 28bc053..e8848b5 100644
--- a/Source/core/css/CSSDefaultStyleSheets.cpp
+++ b/Source/core/css/CSSDefaultStyleSheets.cpp
@@ -33,7 +33,7 @@
 #include "core/css/MediaQueryEvaluator.h"
 #include "core/css/RuleSet.h"
 #include "core/css/StyleSheetContents.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/html/HTMLAnchorElement.h"
 #include "core/html/HTMLHtmlElement.h"
 #include "core/html/HTMLVideoElement.h"
@@ -176,7 +176,7 @@
         changedDefaultStyle = true;
     }
 
-    if (!fullscreenStyleSheet && FullscreenController::isFullScreen(element->document())) {
+    if (!fullscreenStyleSheet && FullscreenElementStack::isFullScreen(element->document())) {
         String fullscreenRules = String(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraFullScreenStyleSheet();
         fullscreenStyleSheet = parseUASheet(fullscreenRules);
         defaultStyle->addRulesFromSheet(fullscreenStyleSheet, screenEval());
diff --git a/Source/core/css/CSSFontSelector.cpp b/Source/core/css/CSSFontSelector.cpp
index b4f9e92..5bdd10c 100644
--- a/Source/core/css/CSSFontSelector.cpp
+++ b/Source/core/css/CSSFontSelector.cpp
@@ -91,8 +91,9 @@
     if (!fontFamily || !src || !fontFamily->isValueList() || !src->isValueList() || (unicodeRange && !unicodeRange->isValueList()))
         return;
 
+    // The font-family descriptor has to have exactly one family name.
     CSSValueList* familyList = toCSSValueList(fontFamily.get());
-    if (!familyList->length())
+    if (familyList->length() != 1)
         return;
 
     CSSValueList* srcList = toCSSValueList(src.get());
@@ -187,8 +188,9 @@
                     break;
             }
         }
-    } else
-        traitsMask |= FontVariantMask;
+    } else {
+        traitsMask |= FontVariantNormalMask;
+    }
 
     // Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace.
     RefPtr<CSSFontFace> fontFace;
@@ -251,69 +253,65 @@
         }
     }
 
-    // Hash under every single family name.
-    int familyLength = familyList->length();
-    for (int i = 0; i < familyLength; i++) {
-        CSSPrimitiveValue* item = toCSSPrimitiveValue(familyList->itemWithoutBoundsCheck(i));
-        String familyName;
-        if (item->isString()) {
-            familyName = item->getStringValue();
-        } else if (item->isValueID()) {
-            // We need to use the raw text for all the generic family types, since @font-face is a way of actually
-            // defining what font to use for those types.
-            switch (item->getValueID()) {
-                case CSSValueSerif:
-                    familyName = serifFamily;
-                    break;
-                case CSSValueSansSerif:
-                    familyName = sansSerifFamily;
-                    break;
-                case CSSValueCursive:
-                    familyName = cursiveFamily;
-                    break;
-                case CSSValueFantasy:
-                    familyName = fantasyFamily;
-                    break;
-                case CSSValueMonospace:
-                    familyName = monospaceFamily;
-                    break;
-                case CSSValueWebkitPictograph:
-                    familyName = pictographFamily;
-                    break;
-                default:
-                    break;
-            }
+    CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->itemWithoutBoundsCheck(0));
+    String familyName;
+    if (familyValue->isString()) {
+        familyName = familyValue->getStringValue();
+    } else if (familyValue->isValueID()) {
+        // We need to use the raw text for all the generic family types, since @font-face is a way of actually
+        // defining what font to use for those types.
+        switch (familyValue->getValueID()) {
+        case CSSValueSerif:
+            familyName =  serifFamily;
+            break;
+        case CSSValueSansSerif:
+            familyName =  sansSerifFamily;
+            break;
+        case CSSValueCursive:
+            familyName =  cursiveFamily;
+            break;
+        case CSSValueFantasy:
+            familyName =  fantasyFamily;
+            break;
+        case CSSValueMonospace:
+            familyName =  monospaceFamily;
+            break;
+        case CSSValueWebkitPictograph:
+            familyName =  pictographFamily;
+            break;
+        default:
+            break;
         }
-
-        if (familyName.isEmpty())
-            continue;
-
-        OwnPtr<Vector<RefPtr<CSSFontFace> > >& familyFontFaces = m_fontFaces.add(familyName, nullptr).iterator->value;
-        if (!familyFontFaces) {
-            familyFontFaces = adoptPtr(new Vector<RefPtr<CSSFontFace> >);
-
-            ASSERT(!m_locallyInstalledFontFaces.contains(familyName));
-
-            Vector<unsigned> locallyInstalledFontsTraitsMasks;
-            fontCache()->getTraitsInFamily(familyName, locallyInstalledFontsTraitsMasks);
-            if (unsigned numLocallyInstalledFaces = locallyInstalledFontsTraitsMasks.size()) {
-                OwnPtr<Vector<RefPtr<CSSFontFace> > > familyLocallyInstalledFaces = adoptPtr(new Vector<RefPtr<CSSFontFace> >);
-
-                for (unsigned i = 0; i < numLocallyInstalledFaces; ++i) {
-                    RefPtr<CSSFontFace> locallyInstalledFontFace = CSSFontFace::create(static_cast<FontTraitsMask>(locallyInstalledFontsTraitsMasks[i]), 0, true);
-                    locallyInstalledFontFace->addSource(adoptPtr(new CSSFontFaceSource(familyName)));
-                    ASSERT(locallyInstalledFontFace->isValid());
-                    familyLocallyInstalledFaces->append(locallyInstalledFontFace);
-                }
-
-                m_locallyInstalledFontFaces.set(familyName, familyLocallyInstalledFaces.release());
-            }
-        }
-
-        familyFontFaces->append(fontFace);
-
-        ++m_version;
     }
+
+    if (familyName.isEmpty())
+        return;
+
+    OwnPtr<Vector<RefPtr<CSSFontFace> > >& familyFontFaces = m_fontFaces.add(familyName, nullptr).iterator->value;
+    if (!familyFontFaces) {
+        familyFontFaces = adoptPtr(new Vector<RefPtr<CSSFontFace> >);
+
+        ASSERT(!m_locallyInstalledFontFaces.contains(familyName));
+
+        Vector<unsigned> locallyInstalledFontsTraitsMasks;
+        fontCache()->getTraitsInFamily(familyName, locallyInstalledFontsTraitsMasks);
+        if (unsigned numLocallyInstalledFaces = locallyInstalledFontsTraitsMasks.size()) {
+            OwnPtr<Vector<RefPtr<CSSFontFace> > > familyLocallyInstalledFaces = adoptPtr(new Vector<RefPtr<CSSFontFace> >);
+
+            for (unsigned i = 0; i < numLocallyInstalledFaces; ++i) {
+                RefPtr<CSSFontFace> locallyInstalledFontFace = CSSFontFace::create(static_cast<FontTraitsMask>(locallyInstalledFontsTraitsMasks[i]), 0, true);
+                locallyInstalledFontFace->addSource(adoptPtr(new CSSFontFaceSource(familyName)));
+                ASSERT(locallyInstalledFontFace->isValid());
+                familyLocallyInstalledFaces->append(locallyInstalledFontFace);
+            }
+
+            m_locallyInstalledFontFaces.set(familyName, familyLocallyInstalledFaces.release());
+        }
+    }
+
+    familyFontFaces->append(fontFace);
+
+    ++m_version;
 }
 
 void CSSFontSelector::registerForInvalidationCallbacks(FontSelectorClient* client)
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in
index b398b89..adcd2ad 100644
--- a/Source/core/css/CSSGrammar.y.in
+++ b/Source/core/css/CSSGrammar.y.in
@@ -216,6 +216,7 @@
 %token <string> MAXFUNCTION
 %token <string> VARFUNCTION
 %token <string> VAR_DEFINITION
+%token <string> PARTFUNCTION
 
 %token <string> UNICODERANGE
 
@@ -1153,12 +1154,10 @@
         $$ = parser->reusableSelectorVector();
         $$->shrink(0);
         $$->append(parser->sinkFloatingSelector($1));
-        parser->updateLastSelectorLineAndPosition();
     }
     | selector_list at_selector_end ',' maybe_space before_selector_group_item selector %prec UNIMPORTANT_TOK {
         $$ = $1;
         $$->append(parser->sinkFloatingSelector($6));
-        parser->updateLastSelectorLineAndPosition();
     }
    ;
 
@@ -1396,7 +1395,7 @@
     // used by ::cue(:past/:future)
     | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space closing_parenthesis {
         $$ = parser->createFloatingSelector();
-        $$->setMatch(CSSSelector::PseudoClass);
+        $$->setMatch(CSSSelector::PseudoElement);
         $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($5));
         $$->setValue($3);
         CSSSelector::PseudoType type = $$->pseudoType();
@@ -1494,6 +1493,21 @@
     | ':' NOTFUNCTION selector_recovery closing_parenthesis {
         YYERROR;
     }
+    | ':' ':' PARTFUNCTION maybe_space IDENT maybe_space closing_parenthesis {
+        $$ = parser->createFloatingSelector();
+        $$->setMatch(CSSSelector::PseudoElement);
+        $$->setArgument($5);
+        if ($5.startsWithIgnoringCase("-webkit"))
+            $$->setMatchUserAgentOnly();
+        parser->tokenToLowerCase($3);
+        $$->setValue($3);
+        CSSSelector::PseudoType type = $$->pseudoType();
+        if (type != CSSSelector::PseudoPart)
+            YYERROR;
+    }
+    | ':' ':' PARTFUNCTION selector_recovery closing_parenthesis {
+        YYERROR;
+    }
   ;
 
 selector_recovery:
diff --git a/Source/core/css/CSSGridTemplateValue.cpp b/Source/core/css/CSSGridTemplateValue.cpp
new file mode 100644
index 0000000..2348305
--- /dev/null
+++ b/Source/core/css/CSSGridTemplateValue.cpp
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/css/CSSGridTemplateValue.h"
+
+#include "core/rendering/style/GridCoordinate.h"
+#include "wtf/text/StringBuilder.h"
+
+namespace WebCore {
+
+CSSGridTemplateValue::CSSGridTemplateValue(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount)
+    : CSSValue(GridTemplateClass)
+    , m_gridAreaMap(gridAreaMap)
+    , m_rowCount(rowCount)
+    , m_columnCount(columnCount)
+{
+    ASSERT(m_rowCount);
+    ASSERT(m_columnCount);
+}
+
+static String stringForPosition(const NamedGridAreaMap& gridAreaMap, size_t row, size_t column)
+{
+    Vector<String> candidates;
+
+    NamedGridAreaMap::const_iterator end = gridAreaMap.end();
+    for (NamedGridAreaMap::const_iterator it = gridAreaMap.begin(); it != end; ++it) {
+        const GridCoordinate& coordinate = it->value;
+        if (row >= coordinate.rows.initialPositionIndex && row <= coordinate.rows.finalPositionIndex)
+            candidates.append(it->key);
+    }
+
+    end = gridAreaMap.end();
+    for (NamedGridAreaMap::const_iterator it = gridAreaMap.begin(); it != end; ++it) {
+        const GridCoordinate& coordinate = it->value;
+        if (column >= coordinate.columns.initialPositionIndex && column <= coordinate.columns.finalPositionIndex && candidates.contains(it->key))
+            return it->key;
+    }
+
+    return ".";
+}
+
+String CSSGridTemplateValue::customCssText() const
+{
+    StringBuilder builder;
+    for (size_t row = 0; row < m_rowCount; ++row) {
+        builder.append('\'');
+        for (size_t column = 0; column < m_columnCount; ++column) {
+            builder.append(stringForPosition(m_gridAreaMap, row, column));
+            if (column != m_columnCount - 1)
+                builder.append(' ');
+        }
+        builder.append('\'');
+        if (row != m_rowCount - 1)
+            builder.append(' ');
+    }
+    return builder.toString();
+}
+
+} // namespace WebCore
diff --git a/Source/core/css/CSSGridTemplateValue.h b/Source/core/css/CSSGridTemplateValue.h
new file mode 100644
index 0000000..f2b796a
--- /dev/null
+++ b/Source/core/css/CSSGridTemplateValue.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CSSGridTemplateValue_h
+#define CSSGridTemplateValue_h
+
+#include "core/css/CSSValue.h"
+#include "core/rendering/style/GridCoordinate.h"
+#include "wtf/text/StringHash.h"
+
+namespace WebCore {
+
+class CSSGridTemplateValue : public CSSValue {
+public:
+    static PassRefPtr<CSSGridTemplateValue> create(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount) { return adoptRef(new CSSGridTemplateValue(gridAreaMap, rowCount, columnCount)); }
+    ~CSSGridTemplateValue() { }
+
+    String customCssText() const;
+
+    const NamedGridAreaMap& gridAreaMap() const { return m_gridAreaMap; }
+    size_t rowCount() const { return m_rowCount; }
+    size_t columnCount() const { return m_columnCount; }
+
+private:
+    CSSGridTemplateValue(const NamedGridAreaMap&, size_t rowCount, size_t columnCount);
+
+    NamedGridAreaMap m_gridAreaMap;
+    size_t m_rowCount;
+    size_t m_columnCount;
+};
+
+inline CSSGridTemplateValue* toCSSGridTemplateValue(CSSValue* value)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(value->isGridTemplateValue());
+    return static_cast<CSSGridTemplateValue*>(value);
+}
+
+inline const CSSGridTemplateValue* toCSSGridTemplateValue(const CSSValue* value)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(value->isGridTemplateValue());
+    return static_cast<const CSSGridTemplateValue*>(value);
+}
+
+// Catch unneeded cast.
+void toCSSGridTemplateValue(const CSSGridTemplateValue*);
+
+} // namespace WebCore
+
+#endif // CSSGridTemplateValue_h
diff --git a/Source/core/css/CSSKeyframesRule.cpp b/Source/core/css/CSSKeyframesRule.cpp
index 747592e..80c6928 100644
--- a/Source/core/css/CSSKeyframesRule.cpp
+++ b/Source/core/css/CSSKeyframesRule.cpp
@@ -35,7 +35,7 @@
 namespace WebCore {
 
 StyleRuleKeyframes::StyleRuleKeyframes()
-    : StyleRuleBase(Keyframes, 0)
+    : StyleRuleBase(Keyframes)
 {
 }
 
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index 71f660d..b38112b 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -39,6 +39,7 @@
 #include "core/css/CSSCursorImageValue.h"
 #include "core/css/CSSFontFaceSrcValue.h"
 #include "core/css/CSSGradientValue.h"
+#include "core/css/CSSGridTemplateValue.h"
 #include "core/css/CSSImageSetValue.h"
 #include "core/css/CSSImageValue.h"
 #include "core/css/CSSInheritedValue.h"
@@ -260,7 +261,6 @@
     , m_token(0)
     , m_lineNumber(0)
     , m_tokenStartLineNumber(0)
-    , m_lastSelectorLineNumber(0)
     , m_ruleHeaderType(CSSRuleSourceData::UNKNOWN_RULE)
     , m_allowImportRules(true)
     , m_allowNamespaceDeclarations(true)
@@ -802,10 +802,6 @@
         if (valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueAntialiased || valueID == CSSValueSubpixelAntialiased)
             return true;
         break;
-    case CSSPropertyWebkitHyphens:
-        if (valueID == CSSValueNone || valueID == CSSValueManual || valueID == CSSValueAuto)
-            return true;
-        break;
     case CSSPropertyGridAutoFlow:
         if (valueID == CSSValueNone || valueID == CSSValueRow || valueID == CSSValueColumn)
             return RuntimeEnabledFeatures::cssGridLayoutEnabled();
@@ -996,7 +992,6 @@
     case CSSPropertyJustifyContent:
     case CSSPropertyWebkitFontKerning:
     case CSSPropertyWebkitFontSmoothing:
-    case CSSPropertyWebkitHyphens:
     case CSSPropertyGridAutoFlow:
     case CSSPropertyWebkitLineAlign:
     case CSSPropertyWebkitLineBreak:
@@ -2461,6 +2456,12 @@
             return false;
         return parseGridItemPositionShorthand(propId, important);
 
+    case CSSPropertyGridTemplate:
+        if (!RuntimeEnabledFeatures::cssGridLayoutEnabled())
+            return false;
+        parsedValue = parseGridTemplate();
+        break;
+
     case CSSPropertyWebkitMarginCollapse: {
         if (num == 1) {
             ShorthandScope scope(this, CSSPropertyWebkitMarginCollapse);
@@ -2537,17 +2538,6 @@
             validPrimitive = true;
         break;
 
-    case CSSPropertyWebkitHyphenateLimitBefore:
-    case CSSPropertyWebkitHyphenateLimitAfter:
-        if (id == CSSValueAuto || validUnit(value, FInteger | FNonNeg, CSSStrictMode))
-            validPrimitive = true;
-        break;
-
-    case CSSPropertyWebkitHyphenateLimitLines:
-        if (id == CSSValueNoLimit || validUnit(value, FInteger | FNonNeg, CSSStrictMode))
-            validPrimitive = true;
-        break;
-
     case CSSPropertyWebkitLineGrid:
         if (id == CSSValueNone)
             validPrimitive = true;
@@ -2802,7 +2792,6 @@
     case CSSPropertyJustifyContent:
     case CSSPropertyWebkitFontKerning:
     case CSSPropertyWebkitFontSmoothing:
-    case CSSPropertyWebkitHyphens:
     case CSSPropertyGridAutoFlow:
     case CSSPropertyWebkitLineAlign:
     case CSSPropertyWebkitLineBreak:
@@ -4804,6 +4793,79 @@
     return createPrimitiveNumericValue(currentValue);
 }
 
+PassRefPtr<CSSValue> CSSParser::parseGridTemplate()
+{
+    NamedGridAreaMap gridAreaMap;
+    size_t rowCount = 0;
+    size_t columnCount = 0;
+
+    while (CSSParserValue* currentValue = m_valueList->current()) {
+        if (currentValue->unit != CSSPrimitiveValue::CSS_STRING)
+            return 0;
+
+        String gridRowNames = currentValue->string;
+        if (!gridRowNames.length())
+            return 0;
+
+        Vector<String> columnNames;
+        gridRowNames.split(' ', columnNames);
+
+        if (!columnCount) {
+            columnCount = columnNames.size();
+            ASSERT(columnCount);
+        } else if (columnCount != columnNames.size()) {
+            // The declaration is invalid is all the rows don't have the number of columns.
+            return 0;
+        }
+
+        for (size_t currentCol = 0; currentCol < columnCount; ++currentCol) {
+            const String& gridAreaName = columnNames[currentCol];
+
+            // Unamed areas are always valid (we consider them to be 1x1).
+            if (gridAreaName == ".")
+                continue;
+
+            // We handle several grid areas with the same name at once to simplify the validation code.
+            size_t lookAheadCol;
+            for (lookAheadCol = currentCol; lookAheadCol < (columnCount - 1); ++lookAheadCol) {
+                if (columnNames[lookAheadCol + 1] != gridAreaName)
+                    break;
+            }
+
+            NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName);
+            if (gridAreaIt == gridAreaMap.end()) {
+                gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount, rowCount), GridSpan(currentCol, lookAheadCol)));
+            } else {
+                GridCoordinate& gridCoordinate = gridAreaIt->value;
+
+                // The following checks test that the grid area is a single filled-in rectangle.
+                // 1. The new row is adjacent to the previously parsed row.
+                if (rowCount != gridCoordinate.rows.initialPositionIndex + 1)
+                    return 0;
+
+                // 2. The new area starts at the same position as the previously parsed area.
+                if (currentCol != gridCoordinate.columns.initialPositionIndex)
+                    return 0;
+
+                // 3. The new area ends at the same position as the previously parsed area.
+                if (lookAheadCol != gridCoordinate.columns.finalPositionIndex)
+                    return 0;
+
+                ++gridCoordinate.rows.finalPositionIndex;
+            }
+            currentCol = lookAheadCol;
+        }
+
+        ++rowCount;
+        m_valueList->next();
+    }
+
+    if (!rowCount || !columnCount)
+        return 0;
+
+    return CSSGridTemplateValue::create(gridAreaMap, rowCount, columnCount);
+}
+
 PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bool counters)
 {
     unsigned numArgs = args->size();
@@ -8183,8 +8245,8 @@
 
     bool hasBlendMode = false;
     bool hasAlphaCompositing = false;
-    CSSParserValue* arg;
-    while ((arg = argsList->current())) {
+
+    for (CSSParserValue* arg = argsList->current(); arg; arg = argsList->next()) {
         RefPtr<CSSValue> value;
 
         unsigned argNumber = argsList->currentIndex();
@@ -8207,8 +8269,6 @@
             return 0;
 
         mixFunction->append(value.release());
-
-        arg = argsList->next();
     }
 
     return mixFunction;
@@ -8363,7 +8423,7 @@
     RefPtr<CSSValueList> shadersList = CSSValueList::createSpaceSeparated();
     bool hadAtLeastOneCustomShader = false;
     CSSParserValue* arg;
-    while ((arg = argsList->current())) {
+    for (arg = argsList->current(); arg; arg = argsList->next()) {
         RefPtr<CSSValue> value;
         if (arg->id == CSSValueNone)
             value = cssValuePool().createIdentifierValue(CSSValueNone);
@@ -8380,7 +8440,6 @@
         if (!value)
             break;
         shadersList->append(value.release());
-        argsList->next();
     }
 
     if (!shadersList->length() || !hadAtLeastOneCustomShader || shadersList->length() > 2 || !acceptCommaOperator(argsList))
@@ -8391,7 +8450,7 @@
     // 2. Parse the mesh size <vertex-mesh>
     RefPtr<CSSValueList> meshSizeList = CSSValueList::createSpaceSeparated();
 
-    while ((arg = argsList->current())) {
+    for (arg = argsList->current(); arg; arg = argsList->next()) {
         if (!validUnit(arg, FInteger | FNonNeg, CSSStrictMode))
             break;
         int integerValue = clampToInteger(arg->fValue);
@@ -8399,7 +8458,6 @@
         if (integerValue < 1)
             return 0;
         meshSizeList->append(cssValuePool().createValue(integerValue, CSSPrimitiveValue::CSS_NUMBER));
-        argsList->next();
     }
 
     if (meshSizeList->length() > 2)
@@ -9914,6 +9972,10 @@
             m_parsingMode = NthChildMode;
             return true;
         }
+        CASE("part") {
+            m_token = PARTFUNCTION;
+            return true;
+        }
     }
     return false;
 }
@@ -11052,7 +11114,7 @@
     StyleRule* result = 0;
     if (selectors) {
         m_allowImportRules = m_allowNamespaceDeclarations = false;
-        RefPtr<StyleRule> rule = StyleRule::create(m_lastSelectorLineNumber);
+        RefPtr<StyleRule> rule = StyleRule::create();
         rule->parserAdoptSelectorVector(*selectors);
         if (m_hasFontFaceOnlyValues)
             deleteFontFaceOnlyValues();
@@ -11127,7 +11189,7 @@
 
 CSSParserSelector* CSSParser::rewriteSpecifiersWithNamespaceIfNeeded(CSSParserSelector* specifiers)
 {
-    if (m_defaultNamespace != starAtom || specifiers->isCustomPseudoElement())
+    if (m_defaultNamespace != starAtom || specifiers->needsCrossingTreeScopeBoundary())
         return rewriteSpecifiersWithElementName(nullAtom, starAtom, specifiers, /*tagIsForNamespaceRule*/true);
     if (CSSParserSelector* distributedPseudoElementSelector = specifiers->findDistributedPseudoElementSelector()) {
         specifiers->prependTagSelector(QualifiedName(nullAtom, starAtom, m_defaultNamespace), /*tagIsForNamespaceRule*/true);
@@ -11146,19 +11208,19 @@
         return rewriteSpecifiersForShadowDistributed(specifiers, distributedPseudoElementSelector);
     }
 
-    if (!specifiers->isCustomPseudoElement()) {
+    if (!specifiers->needsCrossingTreeScopeBoundary()) {
         if (tag == anyQName())
             return specifiers;
-        if (!(specifiers->pseudoType() == CSSSelector::PseudoCue))
-            specifiers->prependTagSelector(tag, tagIsForNamespaceRule);
+        specifiers->prependTagSelector(tag, tagIsForNamespaceRule);
         return specifiers;
     }
 
+    // We should treat ::cue in the same way as custom pseudo element.
     CSSParserSelector* lastShadowPseudo = specifiers;
     CSSParserSelector* history = specifiers;
     while (history->tagHistory()) {
         history = history->tagHistory();
-        if (history->isCustomPseudoElement() || history->hasShadowPseudo())
+        if (history->needsCrossingTreeScopeBoundary() || history->hasShadowPseudo())
             lastShadowPseudo = history;
     }
 
@@ -11204,12 +11266,12 @@
 
 CSSParserSelector* CSSParser::rewriteSpecifiers(CSSParserSelector* specifiers, CSSParserSelector* newSpecifier)
 {
-    if (newSpecifier->isCustomPseudoElement() || newSpecifier->pseudoType() == CSSSelector::PseudoCue) {
+    if (newSpecifier->needsCrossingTreeScopeBoundary()) {
         // Unknown pseudo element always goes at the top of selector chain.
         newSpecifier->appendTagHistory(CSSSelector::ShadowPseudo, sinkFloatingSelector(specifiers));
         return newSpecifier;
     }
-    if (specifiers->isCustomPseudoElement()) {
+    if (specifiers->needsCrossingTreeScopeBoundary()) {
         // Specifiers for unknown pseudo element go right behind it in the chain.
         specifiers->insertTagHistory(CSSSelector::SubSelector, sinkFloatingSelector(newSpecifier), CSSSelector::ShadowPseudo);
         return specifiers;
@@ -11335,11 +11397,6 @@
         m_styleSheet->setHasSyntacticallyValidCSSHeader(false);
 }
 
-void CSSParser::updateLastSelectorLineAndPosition()
-{
-    m_lastSelectorLineNumber = m_lineNumber + m_startPosition.m_line.zeroBasedInt();
-}
-
 void CSSParser::startRuleHeader(CSSRuleSourceData::Type ruleType)
 {
     resumeErrorLogging();
diff --git a/Source/core/css/CSSParser.h b/Source/core/css/CSSParser.h
index 0fc6b31..6c858ed 100644
--- a/Source/core/css/CSSParser.h
+++ b/Source/core/css/CSSParser.h
@@ -180,6 +180,7 @@
     bool parseGridTrackRepeatFunction(CSSValueList&);
     PassRefPtr<CSSPrimitiveValue> parseGridTrackSize(CSSParserValueList& inputList);
     PassRefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*);
+    PassRefPtr<CSSValue> parseGridTemplate();
 
     bool parseClipShape(CSSPropertyID, bool important);
 
@@ -354,8 +355,6 @@
     void setReusableRegionSelectorVector(Vector<OwnPtr<CSSParserSelector> >* selectors);
     Vector<OwnPtr<CSSParserSelector> >* reusableRegionSelectorVector() { return &m_reusableRegionSelectorVector; }
 
-    void updateLastSelectorLineAndPosition();
-
     void clearProperties();
 
     PassRefPtr<ImmutableStylePropertySet> createStylePropertySet();
@@ -595,7 +594,6 @@
     TextPosition m_startPosition;
     int m_lineNumber;
     int m_tokenStartLineNumber;
-    int m_lastSelectorLineNumber;
     CSSRuleSourceData::Type m_ruleHeaderType;
     unsigned m_ruleHeaderStartOffset;
     int m_ruleHeaderStartLineNumber;
diff --git a/Source/core/css/CSSParserValues.h b/Source/core/css/CSSParserValues.h
index d48ad45..0d331c6 100644
--- a/Source/core/css/CSSParserValues.h
+++ b/Source/core/css/CSSParserValues.h
@@ -212,6 +212,7 @@
     void setRelation(CSSSelector::Relation value) { m_selector->m_relation = value; }
     void setForPage() { m_selector->setForPage(); }
     void setRelationIsForShadowDistributed() { m_selector->setRelationIsForShadowDistributed(); }
+    void setMatchUserAgentOnly() { m_selector->setMatchUserAgentOnly(); }
 
     void adoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >& selectorVector);
 
@@ -222,6 +223,7 @@
 
     CSSSelector::PseudoType pseudoType() const { return m_selector->pseudoType(); }
     bool isCustomPseudoElement() const { return m_selector->isCustomPseudoElement(); }
+    bool needsCrossingTreeScopeBoundary() const { return isCustomPseudoElement() || pseudoType() == CSSSelector::PseudoCue; }
 
     bool isSimple() const;
     bool hasShadowPseudo() const;
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
index 5d05e1f..af02ba1 100644
--- a/Source/core/css/CSSPrimitiveValue.cpp
+++ b/Source/core/css/CSSPrimitiveValue.cpp
@@ -1298,7 +1298,7 @@
     case CSS_PAIR:
         return m_value.pair && other.m_value.pair && m_value.pair->equals(*other.m_value.pair);
     case CSS_PARSER_OPERATOR:
-        return m_value.valueID == other.m_value.valueID;
+        return m_value.parserOperator == other.m_value.parserOperator;
     case CSS_CALC:
         return m_value.calc && other.m_value.calc && m_value.calc->equals(*other.m_value.calc);
     case CSS_SHAPE:
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
index d03496d..394702c 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -158,6 +158,7 @@
 
 template<> inline CSSPrimitiveValue::operator CSSReflectionDirection() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAbove:
         return ReflectionAbove;
@@ -195,6 +196,7 @@
     if (m_primitiveUnitType == CSS_NUMBER && m_value.num == 1)
         return ColumnSpanNone;
 
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAll:
         return ColumnSpanAll;
@@ -225,6 +227,7 @@
 
 template<> inline CSSPrimitiveValue::operator PrintColorAdjust() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueEconomy:
         return PrintColorAdjustEconomy;
@@ -279,6 +282,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBorderStyle() const
 {
+    ASSERT(isValueID());
     if (m_value.valueID == CSSValueAuto) // Valid for CSS outline-style
         return DOTTED;
     return (EBorderStyle)(m_value.valueID - CSSValueNone);
@@ -343,6 +347,7 @@
 
 template<> inline CSSPrimitiveValue::operator CompositeOperator() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueClear:
         return CompositeClear;
@@ -558,6 +563,7 @@
 
 template<> inline CSSPrimitiveValue::operator ControlPart() const
 {
+    ASSERT(isValueID());
     if (m_value.valueID == CSSValueNone)
         return NoControlPart;
     return ControlPart(m_value.valueID - CSSValueCheckbox + 1);
@@ -579,6 +585,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBackfaceVisibility() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueVisible:
         return BackfaceVisibilityVisible;
@@ -612,6 +619,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFillAttachment() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueScroll:
         return ScrollBackgroundAttachment;
@@ -649,6 +657,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFillBox() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBorder:
     case CSSValueBorderBox:
@@ -692,6 +701,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFillRepeat() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueRepeat:
         return RepeatFill;
@@ -731,6 +741,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxPack() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueStart:
         return Start;
@@ -773,6 +784,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxAlignment() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueStretch:
         return BSTRETCH;
@@ -808,6 +820,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxDecorationBreak() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSlice:
         return DSLICE;
@@ -843,6 +856,7 @@
 
 template<> inline CSSPrimitiveValue::operator BackgroundEdgeOrigin() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueTop:
         return TopEdge;
@@ -876,6 +890,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxSizing() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBorderBox:
         return BORDER_BOX;
@@ -905,6 +920,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxDirection() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNormal:
         return BNORMAL;
@@ -934,6 +950,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxLines() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSingle:
         return SINGLE;
@@ -963,6 +980,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBoxOrient() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueHorizontal:
     case CSSValueInlineAxis:
@@ -1000,6 +1018,7 @@
 
 template<> inline CSSPrimitiveValue::operator ECaptionSide() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLeft:
         return CAPLEFT;
@@ -1039,6 +1058,7 @@
 
 template<> inline CSSPrimitiveValue::operator EClear() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return CNONE;
@@ -1174,6 +1194,7 @@
 
 template<> inline CSSPrimitiveValue::operator ECursor() const
 {
+    ASSERT(isValueID());
     if (m_value.valueID == CSSValueCopy)
         return CURSOR_COPY;
     if (m_value.valueID == CSSValueNone)
@@ -1263,6 +1284,7 @@
 
 template<> inline CSSPrimitiveValue::operator EDisplay() const
 {
+    ASSERT(isValueID());
     if (m_value.valueID == CSSValueNone)
         return NONE;
 
@@ -1292,6 +1314,7 @@
 
 template<> inline CSSPrimitiveValue::operator EEmptyCell() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueShow:
         return SHOW;
@@ -1333,6 +1356,7 @@
 
 template<> inline CSSPrimitiveValue::operator EAlignItems() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return AlignAuto;
@@ -1379,6 +1403,7 @@
 
 template<> inline CSSPrimitiveValue::operator EJustifyContent() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueFlexStart:
         return JustifyFlexStart;
@@ -1420,6 +1445,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFlexDirection() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueRow:
         return FlowRow;
@@ -1465,6 +1491,7 @@
 
 template<> inline CSSPrimitiveValue::operator EAlignContent() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueFlexStart:
         return AlignContentFlexStart;
@@ -1505,6 +1532,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFlexWrap() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNowrap:
         return FlexNoWrap;
@@ -1539,6 +1567,7 @@
 
 template<> inline CSSPrimitiveValue::operator EFloat() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLeft:
         return LeftFloat;
@@ -1580,6 +1609,7 @@
 
 template<> inline CSSPrimitiveValue::operator LineBreak() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return LineBreakAuto;
@@ -1615,6 +1645,7 @@
 
 template<> inline CSSPrimitiveValue::operator EListStylePosition() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueOutside:
         return OUTSIDE;
@@ -1881,6 +1912,7 @@
 
 template<> inline CSSPrimitiveValue::operator EListStyleType() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return NoneListStyle;
@@ -1908,6 +1940,7 @@
 
 template<> inline CSSPrimitiveValue::operator EMarginCollapse() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueCollapse:
         return MCOLLAPSE;
@@ -1945,6 +1978,7 @@
 
 template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return MNONE;
@@ -1978,6 +2012,7 @@
 
 template<> inline CSSPrimitiveValue::operator RegionFragment() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return AutoRegionFragment;
@@ -2022,6 +2057,7 @@
 
 template<> inline CSSPrimitiveValue::operator EMarqueeDirection() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueForwards:
         return MFORWARD;
@@ -2078,6 +2114,7 @@
 
 template<> inline CSSPrimitiveValue::operator EOverflow() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueVisible:
         return OVISIBLE;
@@ -2120,6 +2157,7 @@
 
 template<> inline CSSPrimitiveValue::operator EPageBreak() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return PBAUTO;
@@ -2162,6 +2200,7 @@
 
 template<> inline CSSPrimitiveValue::operator EPosition() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueStatic:
         return StaticPosition;
@@ -2203,6 +2242,7 @@
 
 template<> inline CSSPrimitiveValue::operator EResize() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBoth:
         return RESIZE_BOTH;
@@ -2239,6 +2279,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETableLayout() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueFixed:
         return TFIXED;
@@ -2289,6 +2330,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETextAlign() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start.
     case CSSValueStart:
@@ -2331,6 +2373,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextAlignLast() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return TextAlignLastAuto;
@@ -2356,6 +2399,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextDecoration() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return TextDecorationNone;
@@ -2377,6 +2421,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextDecorationStyle() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSolid:
         return TextDecorationStyleSolid;
@@ -2418,6 +2463,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextUnderlinePosition() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return TextUnderlinePositionAuto;
@@ -2458,6 +2504,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETextSecurity() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return TSNONE;
@@ -2497,6 +2544,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETextTransform() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueCapitalize:
         return CAPITALIZE;
@@ -2542,6 +2590,7 @@
 
 template<> inline CSSPrimitiveValue::operator EUnicodeBidi() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNormal:
         return UBNormal;
@@ -2584,6 +2633,7 @@
 
 template<> inline CSSPrimitiveValue::operator EUserDrag() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return DRAG_AUTO;
@@ -2618,6 +2668,7 @@
 
 template<> inline CSSPrimitiveValue::operator EUserModify() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueReadOnly:
         return READ_ONLY;
@@ -2652,6 +2703,7 @@
 
 template<> inline CSSPrimitiveValue::operator EUserSelect() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return SELECT_TEXT;
@@ -2708,6 +2760,7 @@
 
 template<> inline CSSPrimitiveValue::operator EVerticalAlign() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueTop:
         return TOP;
@@ -2754,6 +2807,7 @@
 
 template<> inline CSSPrimitiveValue::operator EVisibility() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueHidden:
         return HIDDEN;
@@ -2797,6 +2851,7 @@
 
 template<> inline CSSPrimitiveValue::operator EWhiteSpace() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueWebkitNowrap:
         return KHTML_NOWRAP;
@@ -2837,6 +2892,7 @@
 
 template<> inline CSSPrimitiveValue::operator EWordBreak() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBreakAll:
         return BreakAllWordBreak;
@@ -2868,6 +2924,7 @@
 
 template<> inline CSSPrimitiveValue::operator EOverflowWrap() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBreakWord:
         return BreakOverflowWrap;
@@ -2897,6 +2954,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextDirection() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLtr:
         return LTR;
@@ -2932,6 +2990,7 @@
 
 template<> inline CSSPrimitiveValue::operator WritingMode() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueHorizontalTb:
         return TopToBottomWritingMode;
@@ -2965,6 +3024,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextCombine() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return TextCombineNone;
@@ -2994,6 +3054,7 @@
 
 template<> inline CSSPrimitiveValue::operator RubyPosition() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBefore:
         return RubyPositionBefore;
@@ -3023,6 +3084,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextEmphasisPosition() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueOver:
         return TextEmphasisPositionOver;
@@ -3052,6 +3114,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextOverflow() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueClip:
         return TextOverflowClip;
@@ -3081,6 +3144,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextEmphasisFill() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueFilled:
         return TextEmphasisFillFilled;
@@ -3125,6 +3189,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextEmphasisMark() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return TextEmphasisMarkNone;
@@ -3168,6 +3233,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextOrientation() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSideways:
         return TextOrientationSideways;
@@ -3225,6 +3291,7 @@
 
 template<> inline CSSPrimitiveValue::operator EPointerEvents() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAll:
         return PE_ALL;
@@ -3276,6 +3343,7 @@
 
 template<> inline CSSPrimitiveValue::operator FontDescription::Kerning() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return FontDescription::AutoKerning;
@@ -3316,6 +3384,7 @@
 
 template<> inline CSSPrimitiveValue::operator FontSmoothingMode() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return AutoSmoothing;
@@ -3373,6 +3442,7 @@
 
 template<> inline CSSPrimitiveValue::operator FontWeight() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBold:
         return FontWeightBold;
@@ -3423,6 +3493,7 @@
 
 template<> inline CSSPrimitiveValue::operator FontItalic() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueOblique:
     // FIXME: oblique is the same as italic for the moment...
@@ -3456,6 +3527,7 @@
 
 template<> inline CSSPrimitiveValue::operator FontSmallCaps() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSmallCaps:
         return FontSmallCapsOn;
@@ -3490,6 +3562,7 @@
 
 template<> inline CSSPrimitiveValue::operator TextRenderingMode() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return AutoTextRendering;
@@ -3507,40 +3580,6 @@
     return AutoTextRendering;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Hyphens hyphens)
-    : CSSValue(PrimitiveClass)
-{
-    m_primitiveUnitType = CSS_VALUE_ID;
-    switch (hyphens) {
-    case HyphensNone:
-        m_value.valueID = CSSValueNone;
-        break;
-    case HyphensManual:
-        m_value.valueID = CSSValueManual;
-        break;
-    case HyphensAuto:
-        m_value.valueID = CSSValueAuto;
-        break;
-    }
-}
-
-template<> inline CSSPrimitiveValue::operator Hyphens() const
-{
-    switch (m_value.valueID) {
-    case CSSValueNone:
-        return HyphensNone;
-    case CSSValueManual:
-        return HyphensManual;
-    case CSSValueAuto:
-        return HyphensAuto;
-    default:
-        break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return HyphensAuto;
-}
-
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap)
     : CSSValue(PrimitiveClass)
 {
@@ -3560,6 +3599,7 @@
 
 template<> inline CSSPrimitiveValue::operator LineSnap() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return LineSnapNone;
@@ -3591,6 +3631,7 @@
 
 template<> inline CSSPrimitiveValue::operator LineAlign() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return LineAlignNone;
@@ -3632,6 +3673,7 @@
 
 template<> inline CSSPrimitiveValue::operator Order() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLogical:
         return LogicalOrder;
@@ -3661,6 +3703,7 @@
 
 template<> inline CSSPrimitiveValue::operator ESpeak() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return SpeakNone;
@@ -3740,6 +3783,7 @@
 
 template<> inline CSSPrimitiveValue::operator BlendMode() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNormal:
         return BlendModeNormal;
@@ -3800,6 +3844,7 @@
 
 template<> inline CSSPrimitiveValue::operator LineCap() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueButt:
         return ButtCap;
@@ -3834,6 +3879,7 @@
 
 template<> inline CSSPrimitiveValue::operator LineJoin() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueMiter:
         return MiterJoin;
@@ -3865,6 +3911,7 @@
 
 template<> inline CSSPrimitiveValue::operator WindRule() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNonzero:
         return RULE_NONZERO;
@@ -3925,6 +3972,7 @@
 
 template<> inline CSSPrimitiveValue::operator EAlignmentBaseline() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return AB_AUTO;
@@ -3974,6 +4022,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBorderCollapse() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSeparate:
         return BSEPARATE;
@@ -4003,6 +4052,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBorderFit() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueBorder:
         return BorderFitBorder;
@@ -4038,6 +4088,7 @@
 
 template<> inline CSSPrimitiveValue::operator EImageRendering() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return ImageRenderingAuto;
@@ -4071,6 +4122,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETransformStyle3D() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueFlat:
         return TransformStyle3DFlat;
@@ -4103,6 +4155,7 @@
 
 template<> inline CSSPrimitiveValue::operator ColumnAxis() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueHorizontal:
         return HorizontalColumnAxis;
@@ -4134,6 +4187,7 @@
 
 template<> inline CSSPrimitiveValue::operator ColumnProgression() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNormal:
         return NormalColumnProgression;
@@ -4175,6 +4229,7 @@
 
 template<> inline CSSPrimitiveValue::operator WrapFlow() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return WrapFlowAuto;
@@ -4212,6 +4267,7 @@
 
 template<> inline CSSPrimitiveValue::operator WrapThrough() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueWrap:
         return WrapThroughWrap;
@@ -4227,6 +4283,7 @@
 
 template<> inline CSSPrimitiveValue::operator GridAutoFlow() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return AutoFlowNone;
@@ -4310,6 +4367,7 @@
 
 template<> inline CSSPrimitiveValue::operator EBufferedRendering() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return BR_AUTO;
@@ -4344,6 +4402,7 @@
 
 template<> inline CSSPrimitiveValue::operator EColorInterpolation() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueSrgb:
         return CI_SRGB;
@@ -4378,6 +4437,7 @@
 
 template<> inline CSSPrimitiveValue::operator EColorRendering() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueOptimizespeed:
         return CR_OPTIMIZESPEED;
@@ -4439,6 +4499,7 @@
 
 template<> inline CSSPrimitiveValue::operator EDominantBaseline() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return DB_AUTO;
@@ -4494,6 +4555,7 @@
 
 template<> inline CSSPrimitiveValue::operator EShapeRendering() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueAuto:
         return SR_AUTO;
@@ -4530,6 +4592,7 @@
 
 template<> inline CSSPrimitiveValue::operator ETextAnchor() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueStart:
         return TA_START;
@@ -4573,6 +4636,7 @@
 
 template<> inline CSSPrimitiveValue::operator SVGWritingMode() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLrTb:
         return WM_LRTB;
@@ -4610,6 +4674,7 @@
 
 template<> inline CSSPrimitiveValue::operator EVectorEffect() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return VE_NONE;
@@ -4639,6 +4704,7 @@
 
 template<> inline CSSPrimitiveValue::operator EMaskType() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueLuminance:
         return MT_LUMINANCE;
@@ -4668,6 +4734,7 @@
 
 template<> inline CSSPrimitiveValue::operator TouchAction() const
 {
+    ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueNone:
         return TouchActionNone;
diff --git a/Source/core/css/CSSProperties.in b/Source/core/css/CSSProperties.in
index 5fb8090..b8f4c2c 100644
--- a/Source/core/css/CSSProperties.in
+++ b/Source/core/css/CSSProperties.in
@@ -178,10 +178,6 @@
 -webkit-font-variant-ligatures custom_all
 -webkit-highlight type_name=const AtomicString&, custom_value
 -webkit-hyphenate-character type_name=const AtomicString&, name_for_methods=HyphenationString, custom_value
--webkit-hyphenate-limit-after type_name=short, name_for_methods=HyphenationLimitAfter, custom_value
--webkit-hyphenate-limit-before type_name=short, name_for_methods=HyphenationLimitBefore, custom_value
--webkit-hyphenate-limit-lines type_name=short, name_for_methods=HyphenationLimitLines, custom_value
--webkit-hyphens type_name=Hyphens
 -webkit-line-align type_name=LineAlign
 -webkit-line-break type_name=LineBreak
 -webkit-line-clamp type_name=LineClampValue
@@ -246,3 +242,19 @@
 -webkit-user-select
 -webkit-wrap-flow type_name=WrapFlow
 -webkit-wrap-through type_name=WrapThrough
+
+alignment-baseline svg
+buffered-rendering svg
+clip-rule svg, type_name=WindRule
+color-interpolation svg
+color-interpolation-filters svg, type_name=EColorInterpolation
+color-rendering svg
+dominant-baseline svg
+fill-rule svg, type_name=WindRule
+mask-type svg
+shape-rendering svg
+stroke-linecap svg, type_name=LineCap, name_for_methods=CapStyle
+stroke-linejoin svg, type_name=LineJoin, name_for_methods=JoinStyle
+text-anchor svg
+vector-effect svg
+writing-mode svg, type_name=SVGWritingMode
diff --git a/Source/core/css/CSSProperty.cpp b/Source/core/css/CSSProperty.cpp
index 754abba..414b4ec 100644
--- a/Source/core/css/CSSProperty.cpp
+++ b/Source/core/css/CSSProperty.cpp
@@ -329,10 +329,6 @@
     case CSSPropertyWebkitLocale:
     case CSSPropertyWebkitHighlight:
     case CSSPropertyWebkitHyphenateCharacter:
-    case CSSPropertyWebkitHyphenateLimitAfter:
-    case CSSPropertyWebkitHyphenateLimitBefore:
-    case CSSPropertyWebkitHyphenateLimitLines:
-    case CSSPropertyWebkitHyphens:
     case CSSPropertyWebkitLineAlign:
     case CSSPropertyWebkitLineBoxContain:
     case CSSPropertyWebkitLineBreak:
@@ -583,6 +579,7 @@
     case CSSPropertyGridRow:
     case CSSPropertyGridRowEnd:
     case CSSPropertyGridRowStart:
+    case CSSPropertyGridTemplate:
     case CSSPropertyJustifyContent:
     case CSSPropertyWebkitLineClamp:
     case CSSPropertyWebkitLogicalHeight:
diff --git a/Source/core/css/CSSPropertyNames.in b/Source/core/css/CSSPropertyNames.in
index b88b1a3..11f385b 100644
--- a/Source/core/css/CSSPropertyNames.in
+++ b/Source/core/css/CSSPropertyNames.in
@@ -9,6 +9,7 @@
 //
 
 // properties that generate animations must be listed first
+display
 -webkit-animation
 -webkit-animation-delay
 -webkit-animation-direction
@@ -33,7 +34,6 @@
 // must be listed
 color
 direction
-display
 font
 font-family
 font-size
@@ -308,13 +308,9 @@
 grid-row
 grid-row-end
 grid-row-start
+grid-template
 -webkit-highlight
 -webkit-hyphenate-character
--webkit-hyphenate-limit-after
--webkit-hyphenate-limit-before
--webkit-hyphenate-limit-lines
--webkit-hyphens
--epub-hyphens alias_for=-webkit-hyphens
 -webkit-line-box-contain
 -webkit-line-align
 -webkit-line-break
diff --git a/Source/core/css/CSSSelector.cpp b/Source/core/css/CSSSelector.cpp
index c32ec17..e5d582c 100644
--- a/Source/core/css/CSSSelector.cpp
+++ b/Source/core/css/CSSSelector.cpp
@@ -247,6 +247,7 @@
     case PseudoPastCue:
     case PseudoSeamlessDocument:
     case PseudoDistributed:
+    case PseudoPart:
     case PseudoUnresolved:
         return NOPSEUDO;
     case PseudoNotParsed:
@@ -336,6 +337,7 @@
     DEFINE_STATIC_LOCAL(AtomicString, inRange, ("in-range", AtomicString::ConstructFromLiteral));
     DEFINE_STATIC_LOCAL(AtomicString, outOfRange, ("out-of-range", AtomicString::ConstructFromLiteral));
     DEFINE_STATIC_LOCAL(AtomicString, scope, ("scope", AtomicString::ConstructFromLiteral));
+    DEFINE_STATIC_LOCAL(AtomicString, part, ("part(", AtomicString::ConstructFromLiteral));
     DEFINE_STATIC_LOCAL(AtomicString, unresolved, ("unresolved", AtomicString::ConstructFromLiteral));
 
     static HashMap<StringImpl*, CSSSelector::PseudoType>* nameToPseudoType = 0;
@@ -416,6 +418,8 @@
         nameToPseudoType->set(distributed.impl(), CSSSelector::PseudoDistributed);
         nameToPseudoType->set(inRange.impl(), CSSSelector::PseudoInRange);
         nameToPseudoType->set(outOfRange.impl(), CSSSelector::PseudoOutOfRange);
+        if (RuntimeEnabledFeatures::shadowDOMEnabled())
+            nameToPseudoType->set(part.impl(), CSSSelector::PseudoPart);
         if (RuntimeEnabledFeatures::customDOMElementsEnabled())
             nameToPseudoType->set(unresolved.impl(), CSSSelector::PseudoUnresolved);
     }
@@ -470,6 +474,7 @@
     case PseudoSelection:
     case PseudoUserAgentCustomElement:
     case PseudoWebKitCustomElement:
+    case PseudoPart:
         element = true;
         break;
     case PseudoUnknown:
@@ -637,6 +642,10 @@
         } else if (cs->m_match == CSSSelector::PseudoElement) {
             str.appendLiteral("::");
             str.append(cs->value());
+            if (cs->pseudoType() == PseudoPart) {
+                str.append(cs->argument());
+                str.append(')');
+            }
         } else if (cs->isAttributeSelector()) {
             str.append('[');
             const AtomicString& prefix = cs->attribute().prefix();
@@ -722,6 +731,12 @@
     m_data.m_rareData->m_selectorList = selectorList;
 }
 
+void CSSSelector::setMatchUserAgentOnly()
+{
+    createRareData();
+    m_data.m_rareData->m_matchUserAgentOnly = true;
+}
+
 bool CSSSelector::parseNth() const
 {
     if (!m_hasRareData)
@@ -744,6 +759,7 @@
     , m_b(0)
     , m_attribute(anyQName())
     , m_argument(nullAtom)
+    , m_matchUserAgentOnly(0)
 {
 }
 
diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
index 2e56262..aa80e17 100644
--- a/Source/core/css/CSSSelector.h
+++ b/Source/core/css/CSSSelector.h
@@ -32,9 +32,7 @@
 
     // this class represents a selector for a StyleRule
     class CSSSelector {
-      // This is needed because CSSSelectorList::adoptSelectorVector() expects
-      // to be able to free() this type of object, as a performance tweak.
-      NEW_DELETE_SAME_AS_MALLOC_FREE;
+        WTF_MAKE_FAST_ALLOCATED;
     public:
         CSSSelector();
         CSSSelector(const CSSSelector&);
@@ -162,6 +160,7 @@
             PseudoPastCue,
             PseudoSeamlessDocument,
             PseudoDistributed,
+            PseudoPart,
             PseudoUnresolved
         };
 
@@ -203,11 +202,13 @@
         const QualifiedName& attribute() const;
         const AtomicString& argument() const { return m_hasRareData ? m_data.m_rareData->m_argument : nullAtom; }
         const CSSSelectorList* selectorList() const { return m_hasRareData ? m_data.m_rareData->m_selectorList.get() : 0; }
+        bool isMatchUserAgentOnly() const { return m_hasRareData ? m_data.m_rareData->m_matchUserAgentOnly : false; }
 
         void setValue(const AtomicString&);
         void setAttribute(const QualifiedName&);
         void setArgument(const AtomicString&);
         void setSelectorList(PassOwnPtr<CSSSelectorList>);
+        void setMatchUserAgentOnly();
 
         bool parseNth() const;
         bool matchNth(int count) const;
@@ -265,8 +266,9 @@
             int m_a; // Used for :nth-*
             int m_b; // Used for :nth-*
             QualifiedName m_attribute; // used for attribute selector
-            AtomicString m_argument; // Used for :contains, :lang and :nth-*
+            AtomicString m_argument; // Used for :contains, :lang, :nth-* and ::part
             OwnPtr<CSSSelectorList> m_selectorList; // Used for :-webkit-any and :not
+            unsigned m_matchUserAgentOnly : 1; // Used to make ::part with "-webkit"-prefixed part name match only elements in UA shadow roots.
 
         private:
             RareData(PassRefPtr<StringImpl> value);
@@ -302,7 +304,7 @@
 
 inline bool CSSSelector::isCustomPseudoElement() const
 {
-    return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomElement || m_pseudoType == PseudoWebKitCustomElement);
+    return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomElement || m_pseudoType == PseudoWebKitCustomElement || m_pseudoType == PseudoPart);
 }
 
 inline bool CSSSelector::isSiblingSelector() const
diff --git a/Source/core/css/CSSShorthands.in b/Source/core/css/CSSShorthands.in
index 96caec3..04f9a63 100644
--- a/Source/core/css/CSSShorthands.in
+++ b/Source/core/css/CSSShorthands.in
@@ -20,7 +20,7 @@
 flex longhands=flex-grow;flex-shrink;flex-basis
 flex-flow longhands=flex-direction;flex-wrap
 font longhands=font-family;font-size;font-style;font-variant;font-weight;line-height
-grid-area longhands=grid-column-start;grid-row-start;grid-column-end;grid-row-end
+grid-area longhands=grid-row-start;grid-column-start;grid-row-end;grid-column-end
 grid-column longhands=grid-column-start;grid-column-end
 grid-row longhands=grid-row-start;grid-row-end
 height longhands=min-height;max-height
diff --git a/Source/core/css/CSSValue.cpp b/Source/core/css/CSSValue.cpp
index cdba0f0..0b0ba28 100644
--- a/Source/core/css/CSSValue.cpp
+++ b/Source/core/css/CSSValue.cpp
@@ -38,6 +38,7 @@
 #include "core/css/CSSFontFaceSrcValue.h"
 #include "core/css/CSSFunctionValue.h"
 #include "core/css/CSSGradientValue.h"
+#include "core/css/CSSGridTemplateValue.h"
 #include "core/css/CSSImageSetValue.h"
 #include "core/css/CSSImageValue.h"
 #include "core/css/CSSInheritedValue.h"
@@ -179,6 +180,8 @@
             return compareCSSValues<CSSInheritedValue>(*this, other);
         case InitialClass:
             return compareCSSValues<CSSInitialValue>(*this, other);
+        case GridTemplateClass:
+            return compareCSSValues<CSSGridTemplateValue>(*this, other);
         case PrimitiveClass:
             return compareCSSValues<CSSPrimitiveValue>(*this, other);
         case ReflectClass:
@@ -267,6 +270,8 @@
         return static_cast<const CSSInheritedValue*>(this)->customCssText();
     case InitialClass:
         return static_cast<const CSSInitialValue*>(this)->customCssText();
+    case GridTemplateClass:
+        return static_cast<const CSSGridTemplateValue*>(this)->customCssText();
     case PrimitiveClass:
         return toCSSPrimitiveValue(this)->customCssText();
     case ReflectClass:
@@ -380,6 +385,9 @@
     case InitialClass:
         delete static_cast<CSSInitialValue*>(this);
         return;
+    case GridTemplateClass:
+        delete static_cast<CSSGridTemplateValue*>(this);
+        return;
     case PrimitiveClass:
         delete toCSSPrimitiveValue(this);
         return;
diff --git a/Source/core/css/CSSValue.h b/Source/core/css/CSSValue.h
index 0d94c79..4307838 100644
--- a/Source/core/css/CSSValue.h
+++ b/Source/core/css/CSSValue.h
@@ -93,6 +93,7 @@
     bool isCSSMixFunctionValue() const { return m_classType == CSSMixFunctionValueClass; }
     bool isCSSShaderValue() const { return m_classType == CSSShaderClass; }
     bool isVariableValue() const { return m_classType == VariableClass; }
+    bool isGridTemplateValue() const { return m_classType == GridTemplateClass; }
     bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; }
     bool isSVGPaint() const { return m_classType == SVGPaintClass; }
     bool isCSSSVGDocumentValue() const { return m_classType == CSSSVGDocumentClass; }
@@ -150,6 +151,7 @@
         CalculationClass,
         CSSShaderClass,
         VariableClass,
+        GridTemplateClass,
 
         // SVG classes.
         SVGColorClass,
diff --git a/Source/core/css/ElementRuleCollector.cpp b/Source/core/css/ElementRuleCollector.cpp
index 0e163b7..e06d227 100644
--- a/Source/core/css/ElementRuleCollector.cpp
+++ b/Source/core/css/ElementRuleCollector.cpp
@@ -40,10 +40,9 @@
 namespace WebCore {
 
 ElementRuleCollector::ElementRuleCollector(const ElementResolveContext& context,
-    const SelectorFilter& filter, RenderStyle* style, InspectorCSSOMWrappers& inspectorWrappers)
+    const SelectorFilter& filter, RenderStyle* style)
     : m_context(context)
     , m_selectorFilter(filter)
-    , m_inspectorCSSOMWrappers(inspectorWrappers)
     , m_style(style)
     , m_regionForStyling(0)
     , m_pseudoStyleRequest(NOPSEUDO)
@@ -65,11 +64,11 @@
     return m_ruleList.release();
 }
 
-inline void ElementRuleCollector::addMatchedRule(const RuleData* rule)
+inline void ElementRuleCollector::addMatchedRule(const RuleData* rule, TreePosition treePosition)
 {
     if (!m_matchedRules)
-        m_matchedRules = adoptPtr(new Vector<const RuleData*, 32>);
-    m_matchedRules->append(rule);
+        m_matchedRules = adoptPtr(new Vector<MatchedRule, 32>);
+    m_matchedRules->append(MatchedRule(rule, treePosition));
 }
 
 void ElementRuleCollector::clearMatchedRules()
@@ -98,20 +97,21 @@
         m_result.isCacheable = false;
 }
 
-void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest, RuleRange& ruleRange)
+void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest, RuleRange& ruleRange, TreePosition treePosition)
 {
     ASSERT(matchRequest.ruleSet);
     ASSERT(m_context.element());
 
     Element* element = m_context.element();
-    const AtomicString& pseudoId = element->shadowPseudoId();
+    // FIXME: pseudo should be deprecated after all pseudo is replaced with ::part.
+    const AtomicString& pseudoId = !element->shadowPseudoId().isEmpty() ? element->shadowPseudoId() : element->shadowPartId();
     if (!pseudoId.isEmpty()) {
         ASSERT(element->isStyledElement());
-        collectMatchingRulesForList(matchRequest.ruleSet->shadowPseudoElementRules(pseudoId.impl()), matchRequest, ruleRange);
+        collectMatchingRulesForList(matchRequest.ruleSet->shadowPseudoElementRules(pseudoId.impl()), treePosition, matchRequest, ruleRange);
     }
 
     if (element->isWebVTTElement())
-        collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), matchRequest, ruleRange);
+        collectMatchingRulesForList(matchRequest.ruleSet->cuePseudoRules(), treePosition, matchRequest, ruleRange);
     // Check whether other types of rules are applicable in the current tree scope. Criteria for this:
     // a) it's a UA rule
     // b) the tree scope allows author rules
@@ -126,21 +126,21 @@
     // We need to collect the rules for id, class, tag, and everything else into a buffer and
     // then sort the buffer.
     if (element->hasID())
-        collectMatchingRulesForList(matchRequest.ruleSet->idRules(element->idForStyleResolution().impl()), matchRequest, ruleRange);
+        collectMatchingRulesForList(matchRequest.ruleSet->idRules(element->idForStyleResolution().impl()), treePosition, matchRequest, ruleRange);
     if (element->isStyledElement() && element->hasClass()) {
         for (size_t i = 0; i < element->classNames().size(); ++i)
-            collectMatchingRulesForList(matchRequest.ruleSet->classRules(element->classNames()[i].impl()), matchRequest, ruleRange);
+            collectMatchingRulesForList(matchRequest.ruleSet->classRules(element->classNames()[i].impl()), treePosition, matchRequest, ruleRange);
     }
 
     if (element->isLink())
-        collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules(), matchRequest, ruleRange);
+        collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules(), treePosition, matchRequest, ruleRange);
     if (SelectorChecker::matchesFocusPseudoClass(element))
-        collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules(), matchRequest, ruleRange);
-    collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element->localName().impl()), matchRequest, ruleRange);
-    collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), matchRequest, ruleRange);
+        collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules(), treePosition, matchRequest, ruleRange);
+    collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element->localName().impl()), treePosition, matchRequest, ruleRange);
+    collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), treePosition, matchRequest, ruleRange);
 }
 
-void ElementRuleCollector::collectMatchingRulesForRegion(const MatchRequest& matchRequest, RuleRange& ruleRange)
+void ElementRuleCollector::collectMatchingRulesForRegion(const MatchRequest& matchRequest, RuleRange& ruleRange, TreePosition treePosition)
 {
     if (!m_regionForStyling)
         return;
@@ -151,7 +151,7 @@
         if (checkRegionSelector(regionSelector, toElement(m_regionForStyling->node()))) {
             RuleSet* regionRules = matchRequest.ruleSet->m_regionSelectorsAndRuleSets.at(i).ruleSet.get();
             ASSERT(regionRules);
-            collectMatchingRules(MatchRequest(regionRules, matchRequest.includeEmptyRules, matchRequest.scope), ruleRange);
+            collectMatchingRules(MatchRequest(regionRules, matchRequest.includeEmptyRules, matchRequest.scope), ruleRange, treePosition);
         }
     }
 }
@@ -163,19 +163,20 @@
 
     sortMatchedRules();
 
-    Vector<const RuleData*, 32>& matchedRules = *m_matchedRules;
+    Vector<MatchedRule, 32>& matchedRules = *m_matchedRules;
     if (m_mode == SelectorChecker::CollectingRules) {
         for (unsigned i = 0; i < matchedRules.size(); ++i)
-            ensureRuleList()->rules().append(matchedRules[i]->rule()->createCSSOMWrapper());
+            ensureRuleList()->rules().append(matchedRules[i].ruleData()->rule()->createCSSOMWrapper());
         return;
     }
 
     // Now transfer the set of matched rules over to our list of declarations.
     for (unsigned i = 0; i < matchedRules.size(); i++) {
         // FIXME: Matching should not modify the style directly.
-        if (m_style && matchedRules[i]->containsUncommonAttributeSelector())
+        const RuleData* ruleData = matchedRules[i].ruleData();
+        if (m_style && ruleData->containsUncommonAttributeSelector())
             m_style->setUnique();
-        m_result.addMatchedProperties(matchedRules[i]->rule()->properties(), matchedRules[i]->rule(), matchedRules[i]->linkMatchType(), matchedRules[i]->propertyWhitelistType(m_matchingUARules));
+        m_result.addMatchedProperties(ruleData->rule()->properties(), ruleData->rule(), ruleData->linkMatchType(), ruleData->propertyWhitelistType(m_matchingUARules));
     }
 }
 
@@ -217,33 +218,26 @@
     return true;
 }
 
-void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, const MatchRequest& matchRequest, RuleRange& ruleRange)
+void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, TreePosition treePosition, const MatchRequest& matchRequest, RuleRange& ruleRange)
 {
     if (m_canUseFastReject && m_selectorFilter.fastRejectSelector(ruleData.selector()))
         return;
 
     StyleRule* rule = ruleData.rule();
-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willMatchRule(document(), rule, m_inspectorCSSOMWrappers, document()->styleSheetCollection());
     PseudoId dynamicPseudo = NOPSEUDO;
     if (ruleMatches(ruleData, matchRequest.scope, dynamicPseudo)) {
         // If the rule has no properties to apply, then ignore it in the non-debug mode.
         const StylePropertySet* properties = rule->properties();
-        if (!properties || (properties->isEmpty() && !matchRequest.includeEmptyRules)) {
-            InspectorInstrumentation::didMatchRule(cookie, false);
+        if (!properties || (properties->isEmpty() && !matchRequest.includeEmptyRules))
             return;
-        }
         // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the only reason this is needed.
-        if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin()) {
-            InspectorInstrumentation::didMatchRule(cookie, false);
+        if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin())
             return;
-        }
         // If we're matching normal rules, set a pseudo bit if
         // we really just matched a pseudo-element.
         if (dynamicPseudo != NOPSEUDO && m_pseudoStyleRequest.pseudoId == NOPSEUDO) {
-            if (m_mode == SelectorChecker::CollectingRules) {
-                InspectorInstrumentation::didMatchRule(cookie, false);
+            if (m_mode == SelectorChecker::CollectingRules)
                 return;
-            }
             // FIXME: Matching should not modify the style directly.
             if (dynamicPseudo < FIRST_INTERNAL_PSEUDOID)
                 m_style->setHasPseudoStyle(dynamicPseudo);
@@ -254,37 +248,35 @@
                 ruleRange.firstRuleIndex = ruleRange.lastRuleIndex;
 
             // Add this rule to our list of matched rules.
-            addMatchedRule(&ruleData);
-            InspectorInstrumentation::didMatchRule(cookie, true);
+            addMatchedRule(&ruleData, treePosition);
             return;
         }
     }
-    InspectorInstrumentation::didMatchRule(cookie, false);
 }
 
-void ElementRuleCollector::collectMatchingRulesForList(const RuleData* rules, const MatchRequest& matchRequest, RuleRange& ruleRange)
+void ElementRuleCollector::collectMatchingRulesForList(const RuleData* rules, TreePosition treePosition, const MatchRequest& matchRequest, RuleRange& ruleRange)
 {
     if (!rules)
         return;
     while (!rules->isLastInArray())
-        collectRuleIfMatches(*rules++, matchRequest, ruleRange);
-    collectRuleIfMatches(*rules, matchRequest, ruleRange);
+        collectRuleIfMatches(*rules++, treePosition, matchRequest, ruleRange);
+    collectRuleIfMatches(*rules, treePosition, matchRequest, ruleRange);
 }
 
-void ElementRuleCollector::collectMatchingRulesForList(const Vector<RuleData>* rules, const MatchRequest& matchRequest, RuleRange& ruleRange)
+void ElementRuleCollector::collectMatchingRulesForList(const Vector<RuleData>* rules, TreePosition treePosition, const MatchRequest& matchRequest, RuleRange& ruleRange)
 {
     if (!rules)
         return;
     unsigned size = rules->size();
     for (unsigned i = 0; i < size; ++i)
-        collectRuleIfMatches(rules->at(i), matchRequest, ruleRange);
+        collectRuleIfMatches(rules->at(i), treePosition, matchRequest, ruleRange);
 }
 
-static inline bool compareRules(const RuleData* r1, const RuleData* r2)
+static inline bool compareRules(const MatchedRule& matchedRule1, const MatchedRule& matchedRule2)
 {
-    unsigned specificity1 = r1->specificity();
-    unsigned specificity2 = r2->specificity();
-    return (specificity1 == specificity2) ? r1->position() < r2->position() : specificity1 < specificity2;
+    unsigned specificity1 = matchedRule1.ruleData()->specificity();
+    unsigned specificity2 = matchedRule2.ruleData()->specificity();
+    return (specificity1 == specificity2) ? matchedRule1.globalPosition() < matchedRule2.globalPosition() : specificity1 < specificity2;
 }
 
 void ElementRuleCollector::sortMatchedRules()
@@ -304,6 +296,7 @@
     m_behaviorAtBoundary = SelectorChecker::StaysWithinTreeScope;
     int firstRuleIndex = -1, lastRuleIndex = -1;
     RuleRange ruleRange(firstRuleIndex, lastRuleIndex);
+    // FIXME: Verify whether it's ok to ignore TreePosition here.
     collectMatchingRules(MatchRequest(ruleSet), ruleRange);
 
     return m_matchedRules && !m_matchedRules->isEmpty();
diff --git a/Source/core/css/ElementRuleCollector.h b/Source/core/css/ElementRuleCollector.h
index 65aee85..8f08828 100644
--- a/Source/core/css/ElementRuleCollector.h
+++ b/Source/core/css/ElementRuleCollector.h
@@ -41,6 +41,29 @@
 class SelectorFilter;
 class StaticCSSRuleList;
 
+typedef unsigned TreePosition;
+
+const TreePosition ignoreTreePosition = 0;
+
+class MatchedRule {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    explicit MatchedRule(const RuleData* ruleData, TreePosition treePosition)
+        : m_ruleData(ruleData)
+    {
+        ASSERT(m_ruleData);
+        static const unsigned BitsForPositionInRuleData = 18;
+        m_globalPosition = (treePosition << BitsForPositionInRuleData) + m_ruleData->position();
+    }
+
+    const RuleData* ruleData() const { return m_ruleData; }
+    uint32_t globalPosition() const { return m_globalPosition; }
+
+private:
+    const RuleData* m_ruleData;
+    uint32_t m_globalPosition;
+};
+
 // ElementRuleCollector is designed to be used as a stack object.
 // Create one, ask what rules the ElementResolveContext matches
 // and then let it go out of scope.
@@ -48,8 +71,7 @@
 class ElementRuleCollector {
     WTF_MAKE_NONCOPYABLE(ElementRuleCollector);
 public:
-    // FIXME: This should not need an InspectorCSSOMWrappers parameter.
-    ElementRuleCollector(const ElementResolveContext&, const SelectorFilter&, RenderStyle*, InspectorCSSOMWrappers&);
+    ElementRuleCollector(const ElementResolveContext&, const SelectorFilter&, RenderStyle*);
 
     void setBehaviorAtBoundary(SelectorChecker::BehaviorAtBoundary boundary) { m_behaviorAtBoundary = boundary; }
     SelectorChecker::BehaviorAtBoundary behaviorAtBoundary() const { return m_behaviorAtBoundary; }
@@ -67,8 +89,8 @@
     MatchResult& matchedResult();
     PassRefPtr<CSSRuleList> matchedRuleList();
 
-    void collectMatchingRules(const MatchRequest&, RuleRange&);
-    void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&);
+    void collectMatchingRules(const MatchRequest&, RuleRange&, TreePosition = ignoreTreePosition);
+    void collectMatchingRulesForRegion(const MatchRequest&, RuleRange&, TreePosition = ignoreTreePosition);
     void sortAndTransferMatchedRules();
     void clearMatchedRules();
     void addElementStyleProperties(const StylePropertySet*, bool isCacheable = true);
@@ -76,21 +98,20 @@
 private:
     Document* document() { return m_context.document(); }
 
-    void collectRuleIfMatches(const RuleData&, const MatchRequest&, RuleRange&);
-    void collectMatchingRulesForList(const Vector<RuleData>*, const MatchRequest&, RuleRange&);
-    void collectMatchingRulesForList(const RuleData*, const MatchRequest&, RuleRange&);
+    void collectRuleIfMatches(const RuleData&, TreePosition, const MatchRequest&, RuleRange&);
+    void collectMatchingRulesForList(const Vector<RuleData>*, TreePosition, const MatchRequest&, RuleRange&);
+    void collectMatchingRulesForList(const RuleData*, TreePosition, const MatchRequest&, RuleRange&);
     bool ruleMatches(const RuleData&, const ContainerNode* scope, PseudoId&);
 
     void sortMatchedRules();
 
-    void addMatchedRule(const RuleData*);
+    void addMatchedRule(const RuleData*, TreePosition);
 
     StaticCSSRuleList* ensureRuleList();
 
 private:
     const ElementResolveContext& m_context;
     const SelectorFilter& m_selectorFilter;
-    InspectorCSSOMWrappers& m_inspectorCSSOMWrappers; // This should not be needed.
     RefPtr<RenderStyle> m_style; // FIXME: This can be mutated during matching!
 
     const RenderRegion* m_regionForStyling;
@@ -101,7 +122,7 @@
     bool m_sameOriginOnly;
     bool m_matchingUARules;
 
-    OwnPtr<Vector<const RuleData*, 32> > m_matchedRules;
+    OwnPtr<Vector<MatchedRule, 32> > m_matchedRules;
 
     // Output.
     RefPtr<StaticCSSRuleList> m_ruleList;
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index 927f248..0db8234 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -29,6 +29,7 @@
 #include "config.h"
 #include "core/css/RuleFeature.h"
 
+#include "HTMLNames.h"
 #include "core/css/CSSSelector.h"
 
 namespace WebCore {
@@ -49,6 +50,9 @@
     case CSSSelector::PseudoAfter:
         m_usesBeforeAfterRules = true;
         break;
+    case CSSSelector::PseudoPart:
+        attrsInRules.add(HTMLNames::partAttr.localName().impl());
+        break;
     default:
         break;
     }
diff --git a/Source/core/css/RuleSet.cpp b/Source/core/css/RuleSet.cpp
index f2f2eb2..9b6d24d 100644
--- a/Source/core/css/RuleSet.cpp
+++ b/Source/core/css/RuleSet.cpp
@@ -262,7 +262,8 @@
         return true;
     }
     if (component->isCustomPseudoElement()) {
-        addToRuleSet(component->value().impl(), ensurePendingRules()->shadowPseudoElementRules, ruleData);
+        StringImpl* pseudoValue = component->pseudoType() == CSSSelector::PseudoPart ? component->argument().impl() : component->value().impl();
+        addToRuleSet(pseudoValue, ensurePendingRules()->shadowPseudoElementRules, ruleData);
         return true;
     }
     if (component->pseudoType() == CSSSelector::PseudoCue) {
diff --git a/Source/core/css/RuleSet.h b/Source/core/css/RuleSet.h
index eb10e8d..d3b0339 100644
--- a/Source/core/css/RuleSet.h
+++ b/Source/core/css/RuleSet.h
@@ -51,7 +51,7 @@
 class StyleSheetContents;
 
 class RuleData {
-    NEW_DELETE_SAME_AS_MALLOC_FREE;
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     RuleData(StyleRule*, unsigned selectorIndex, unsigned position, AddRuleFlags);
 
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index fbdace1..1b80f44 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -34,7 +34,7 @@
 #include "core/css/SiblingTraversalStrategies.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/NodeRenderStyle.h"
 #include "core/dom/Text.h"
 #include "core/dom/shadow/InsertionPoint.h"
@@ -70,6 +70,27 @@
 {
 }
 
+static bool matchesCustomPseudoElement(const Element* element, const CSSSelector* selector)
+{
+    ShadowRoot* root = element->containingShadowRoot();
+    if (!root)
+        return false;
+
+    if (selector->pseudoType() != CSSSelector::PseudoPart) {
+        if (element->shadowPseudoId() != selector->value())
+            return false;
+        if (selector->pseudoType() == CSSSelector::PseudoWebKitCustomElement && root->type() != ShadowRoot::UserAgentShadowRoot)
+            return false;
+        return true;
+    }
+
+    if (element->shadowPartId() != selector->argument())
+        return false;
+    if (selector->isMatchUserAgentOnly() && root->type() != ShadowRoot::UserAgentShadowRoot)
+        return false;
+    return true;
+}
+
 // Recursive check of selectors and combinators
 // It can return 4 different values:
 // * SelectorMatches          - the selector matches the element e
@@ -85,13 +106,7 @@
 
     if (context.selector->m_match == CSSSelector::PseudoElement) {
         if (context.selector->isCustomPseudoElement()) {
-            if (ShadowRoot* root = context.element->containingShadowRoot()) {
-                if (context.element->shadowPseudoId() != context.selector->value())
-                    return SelectorFailsLocally;
-
-                if (context.selector->pseudoType() == CSSSelector::PseudoWebKitCustomElement && root->type() != ShadowRoot::UserAgentShadowRoot)
-                    return SelectorFailsLocally;
-            } else
+            if (!matchesCustomPseudoElement(context.element, context.selector))
                 return SelectorFailsLocally;
         } else {
             if ((!context.elementStyle && m_mode == ResolvingStyle) || m_mode == QueryingRules)
@@ -265,7 +280,7 @@
     case CSSSelector::List:
         {
             // Ignore empty selectors or selectors containing HTML spaces
-            if (containsHTMLSpace(selectorValue) || selectorValue.isEmpty())
+            if (selectorValue.isEmpty() || containsHTMLSpace(selectorValue))
                 return false;
 
             unsigned startSearchAt = 0;
@@ -692,7 +707,7 @@
             // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied.
             if (element->isFrameElementBase() && element->containsFullScreenElement())
                 return true;
-            if (FullscreenController* fullscreen = FullscreenController::fromIfExists(element->document())) {
+            if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(element->document())) {
                 if (!fullscreen->webkitIsFullScreen())
                     return false;
                 return element == fullscreen->webkitCurrentFullScreenElement();
@@ -703,7 +718,7 @@
         case CSSSelector::PseudoFullScreenDocument:
             // While a Document is in the fullscreen state, the 'full-screen-document' pseudoclass applies
             // to all elements of that Document.
-            if (!FullscreenController::isFullScreen(element->document()))
+            if (!FullscreenElementStack::isFullScreen(element->document()))
                 return false;
             return true;
         case CSSSelector::PseudoSeamlessDocument:
@@ -761,6 +776,7 @@
     else if (selector->m_match == CSSSelector::PseudoElement && selector->pseudoType() == CSSSelector::PseudoCue) {
         SelectorCheckingContext subContext(context);
         subContext.isSubSelector = true;
+        subContext.behaviorAtBoundary = StaysWithinTreeScope;
 
         PseudoId ignoreDynamicPseudo = NOPSEUDO;
         const CSSSelector* const & selector = context.selector;
diff --git a/Source/core/css/SiblingTraversalStrategies.h b/Source/core/css/SiblingTraversalStrategies.h
index c557cf6..8751e94 100644
--- a/Source/core/css/SiblingTraversalStrategies.h
+++ b/Source/core/css/SiblingTraversalStrategies.h
@@ -122,7 +122,7 @@
 }
 
 struct ShadowDOMSiblingTraversalStrategy {
-    ShadowDOMSiblingTraversalStrategy(const Vector<RefPtr<Node> >& siblings, int nth)
+    ShadowDOMSiblingTraversalStrategy(const Vector<Node*>& siblings, int nth)
         : m_siblings(siblings)
         , m_nth(nth)
     {
@@ -139,7 +139,7 @@
     int countElementsOfTypeAfter(Element*, const QualifiedName&) const;
 
 private:
-    Vector<RefPtr<Node> > m_siblings;
+    Vector<Node*> m_siblings;
     int m_nth;
 };
 
@@ -147,7 +147,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     for (int i = m_nth - 1; i >= 0; --i) {
         if (m_siblings[i]->isElementNode())
@@ -161,7 +161,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     for (size_t i = m_nth + 1; i < m_siblings.size(); ++i) {
         if (m_siblings[i]->isElementNode())
@@ -175,7 +175,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     for (int i = m_nth - 1; i >= 0; --i) {
         if (m_siblings[i]->hasTagName(type))
@@ -189,7 +189,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     for (size_t i = m_nth + 1; i < m_siblings.size(); ++i) {
         if (m_siblings[i]->hasTagName(type))
@@ -203,7 +203,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     int count = 0;
     for (int i = m_nth - 1; i >= 0; --i) {
@@ -218,7 +218,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     int count = 0;
     for (size_t i = m_nth + 1; i < m_siblings.size(); ++i) {
@@ -233,7 +233,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     int count = 0;
     for (int i = m_nth - 1; i >= 0; --i) {
@@ -248,7 +248,7 @@
 {
     UNUSED_PARAM(element);
 
-    ASSERT(element == toElement(m_siblings[m_nth].get()));
+    ASSERT(element == toElement(m_siblings[m_nth]));
 
     int count = 0;
     for (size_t i = m_nth + 1; i < m_siblings.size(); ++i) {
diff --git a/Source/core/css/StylePropertySet.h b/Source/core/css/StylePropertySet.h
index 07d943b..7d8be4f 100644
--- a/Source/core/css/StylePropertySet.h
+++ b/Source/core/css/StylePropertySet.h
@@ -144,10 +144,6 @@
 };
 
 class ImmutableStylePropertySet : public StylePropertySet {
-    // This is needed because we malloc() space for an
-    // ImmutableStylePropertySet plus following properties, as a performance
-    // tweak.
-    NEW_DELETE_SAME_AS_MALLOC_FREE;
 public:
     ~ImmutableStylePropertySet();
     static PassRefPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode);
diff --git a/Source/core/css/StyleRule.cpp b/Source/core/css/StyleRule.cpp
index 2979e18..4e37545 100644
--- a/Source/core/css/StyleRule.cpp
+++ b/Source/core/css/StyleRule.cpp
@@ -191,8 +191,8 @@
     return sizeof(StyleRule) + sizeof(CSSSelector) + StylePropertySet::averageSizeInBytes();
 }
 
-StyleRule::StyleRule(int sourceLine)
-    : StyleRuleBase(Style, sourceLine)
+StyleRule::StyleRule()
+    : StyleRuleBase(Style)
 {
 }
 
@@ -248,7 +248,7 @@
 }
 
 StyleRuleFontFace::StyleRuleFontFace()
-    : StyleRuleBase(FontFace, 0)
+    : StyleRuleBase(FontFace)
 {
 }
 
@@ -275,7 +275,7 @@
 }
 
 StyleRuleGroup::StyleRuleGroup(Type type, Vector<RefPtr<StyleRuleBase> >& adoptRule)
-    : StyleRuleBase(type, 0)
+    : StyleRuleBase(type)
 {
     m_childRules.swap(adoptRule);
 }
@@ -340,7 +340,7 @@
 }
 
 StyleRuleViewport::StyleRuleViewport()
-    : StyleRuleBase(Viewport, 0)
+    : StyleRuleBase(Viewport)
 {
     ASSERT(RuntimeEnabledFeatures::cssViewportEnabled());
 }
@@ -369,7 +369,7 @@
 }
 
 StyleRuleFilter::StyleRuleFilter(const String& filterName)
-    : StyleRuleBase(Filter, 0)
+    : StyleRuleBase(Filter)
     , m_filterName(filterName)
 {
 }
diff --git a/Source/core/css/StyleRule.h b/Source/core/css/StyleRule.h
index 5cb897e..5aeaf86 100644
--- a/Source/core/css/StyleRule.h
+++ b/Source/core/css/StyleRule.h
@@ -71,8 +71,6 @@
 
     PassRefPtr<StyleRuleBase> copy() const;
 
-    int sourceLine() const { return m_sourceLine; }
-
     void deref()
     {
         if (derefBase())
@@ -84,8 +82,8 @@
     PassRefPtr<CSSRule> createCSSOMWrapper(CSSRule* parentRule) const;
 
 protected:
-    StyleRuleBase(Type type, signed sourceLine = 0) : m_type(type), m_sourceLine(sourceLine) { }
-    StyleRuleBase(const StyleRuleBase& o) : WTF::RefCountedBase(), m_type(o.m_type), m_sourceLine(o.m_sourceLine) { }
+    StyleRuleBase(Type type) : m_type(type) { }
+    StyleRuleBase(const StyleRuleBase& o) : WTF::RefCountedBase(), m_type(o.m_type) { }
 
     ~StyleRuleBase() { }
 
@@ -95,13 +93,12 @@
     PassRefPtr<CSSRule> createCSSOMWrapper(CSSStyleSheet* parentSheet, CSSRule* parentRule) const;
 
     unsigned m_type : 5;
-    signed m_sourceLine : 27;
 };
 
 class StyleRule : public StyleRuleBase {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<StyleRule> create(int sourceLine) { return adoptRef(new StyleRule(sourceLine)); }
+    static PassRefPtr<StyleRule> create() { return adoptRef(new StyleRule()); }
 
     ~StyleRule();
 
@@ -118,7 +115,7 @@
     static unsigned averageSizeInBytes();
 
 private:
-    StyleRule(int sourceLine);
+    StyleRule();
     StyleRule(const StyleRule&);
 
     RefPtr<StylePropertySet> m_properties;
diff --git a/Source/core/css/StyleRuleImport.cpp b/Source/core/css/StyleRuleImport.cpp
index 7abaef8..33ea081 100644
--- a/Source/core/css/StyleRuleImport.cpp
+++ b/Source/core/css/StyleRuleImport.cpp
@@ -37,7 +37,7 @@
 }
 
 StyleRuleImport::StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet> media)
-    : StyleRuleBase(Import, 0)
+    : StyleRuleBase(Import)
     , m_parentStyleSheet(0)
     , m_styleSheetClient(this)
     , m_strHref(href)
diff --git a/Source/core/css/resolver/FilterOperationResolver.cpp b/Source/core/css/resolver/FilterOperationResolver.cpp
index c75886a..3198f67 100644
--- a/Source/core/css/resolver/FilterOperationResolver.cpp
+++ b/Source/core/css/resolver/FilterOperationResolver.cpp
@@ -44,7 +44,6 @@
 #include "core/platform/graphics/filters/custom/CustomFilterProgramInfo.h"
 #include "core/platform/graphics/filters/custom/CustomFilterTransformParameter.h"
 #include "core/rendering/style/StyleCustomFilterProgram.h"
-#include "core/rendering/style/StyleCustomFilterProgramCache.h"
 #include "core/rendering/style/StyleShader.h"
 #include "core/svg/SVGURIReference.h"
 
@@ -230,26 +229,21 @@
     return 0;
 }
 
-static PassRefPtr<CustomFilterProgram> lookupCustomFilterProgram(CSSShaderValue* vertexShader, CSSShaderValue* fragmentShader,
+static PassRefPtr<CustomFilterProgram> createCustomFilterProgram(CSSShaderValue* vertexShader, CSSShaderValue* fragmentShader,
     CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType,
-    StyleCustomFilterProgramCache* customFilterProgramCache, StyleResolverState& state)
+    StyleResolverState& state)
 {
     ResourceFetcher* fetcher = state.document()->fetcher();
     KURL vertexShaderURL = vertexShader ? vertexShader->completeURL(fetcher) : KURL();
     KURL fragmentShaderURL = fragmentShader ? fragmentShader->completeURL(fetcher) : KURL();
-    RefPtr<StyleCustomFilterProgram> program;
-    if (customFilterProgramCache)
-        program = customFilterProgramCache->lookup(CustomFilterProgramInfo(vertexShaderURL.string(), fragmentShaderURL.string(), programType, mixSettings, meshType));
-    if (!program) {
-        // Create a new StyleCustomFilterProgram that will be resolved during the loadPendingShaders and added to the cache.
-        program = StyleCustomFilterProgram::create(vertexShaderURL, vertexShader ? styleShader(vertexShader, state) : 0,
+    RefPtr<StyleCustomFilterProgram> program = StyleCustomFilterProgram::create(vertexShaderURL, vertexShader ? styleShader(vertexShader, state) : 0,
             fragmentShaderURL, fragmentShader ? styleShader(fragmentShader, state) : 0, programType, mixSettings, meshType);
         // FIXME
-    }
+        // FIXME: Find out what the fixme above means.
     return program.release();
 }
 
-static PassRefPtr<CustomFilterOperation> createCustomFilterOperationWithInlineSyntax(CSSFilterValue* filterValue, StyleCustomFilterProgramCache* customFilterProgramCache, StyleResolverState& state)
+static PassRefPtr<CustomFilterOperation> createCustomFilterOperationWithInlineSyntax(CSSFilterValue* filterValue, StyleResolverState& state)
 {
     CSSValue* shadersValue = filterValue->itemWithoutBoundsCheck(0);
     ASSERT_WITH_SECURITY_IMPLICATION(shadersValue->isValueList());
@@ -348,19 +342,19 @@
     if (parametersValue && !parseCustomFilterParameterList(parametersValue, parameterList, state))
         return 0;
 
-    RefPtr<CustomFilterProgram> program = lookupCustomFilterProgram(vertexShader, fragmentShader, programType, mixSettings, meshType, customFilterProgramCache, state);
+    RefPtr<CustomFilterProgram> program = createCustomFilterProgram(vertexShader, fragmentShader, programType, mixSettings, meshType, state);
     return CustomFilterOperation::create(program.release(), parameterList, meshRows, meshColumns, meshType);
 }
 
-static PassRefPtr<CustomFilterOperation> createCustomFilterOperation(CSSFilterValue* filterValue, StyleCustomFilterProgramCache* customFilterProgramCache, StyleResolverState& state)
+static PassRefPtr<CustomFilterOperation> createCustomFilterOperation(CSSFilterValue* filterValue, StyleResolverState& state)
 {
     ASSERT(filterValue->length());
     bool isAtRuleReferenceSyntax = filterValue->itemWithoutBoundsCheck(0)->isPrimitiveValue();
-    return isAtRuleReferenceSyntax ? createCustomFilterOperationWithAtRuleReferenceSyntax(filterValue) : createCustomFilterOperationWithInlineSyntax(filterValue, customFilterProgramCache, state);
+    return isAtRuleReferenceSyntax ? createCustomFilterOperationWithAtRuleReferenceSyntax(filterValue) : createCustomFilterOperationWithInlineSyntax(filterValue, state);
 }
 
 
-bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const RenderStyle* style, const RenderStyle* rootStyle, FilterOperations& outOperations, StyleCustomFilterProgramCache* customFilterProgramCache, StyleResolverState& state)
+bool FilterOperationResolver::createFilterOperations(CSSValue* inValue, const RenderStyle* style, const RenderStyle* rootStyle, FilterOperations& outOperations, StyleResolverState& state)
 {
     ASSERT(outOperations.isEmpty());
 
@@ -392,7 +386,7 @@
             continue;
         }
         if (operationType == FilterOperation::CUSTOM) {
-            RefPtr<CustomFilterOperation> operation = createCustomFilterOperation(filterValue, customFilterProgramCache, state);
+            RefPtr<CustomFilterOperation> operation = createCustomFilterOperation(filterValue, state);
             if (!operation)
                 return false;
 
diff --git a/Source/core/css/resolver/FilterOperationResolver.h b/Source/core/css/resolver/FilterOperationResolver.h
index 9b929bb..b2096f7 100644
--- a/Source/core/css/resolver/FilterOperationResolver.h
+++ b/Source/core/css/resolver/FilterOperationResolver.h
@@ -29,13 +29,12 @@
 
 class CSSValue;
 class RenderStyle;
-class StyleCustomFilterProgramCache;
 
 class FilterOperationResolver {
 private:
     FilterOperationResolver();
 public:
-    static bool createFilterOperations(CSSValue* inValue, const RenderStyle* inStyle, const RenderStyle* rootStyle, FilterOperations& outOperations, StyleCustomFilterProgramCache*, StyleResolverState&);
+    static bool createFilterOperations(CSSValue* inValue, const RenderStyle* inStyle, const RenderStyle* rootStyle, FilterOperations& outOperations, StyleResolverState&);
 };
 
 } // namespace WebCore
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index 487470f..ff194f2 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -86,7 +86,10 @@
 
 void FontBuilder::setInitial(float effectiveZoom)
 {
-    ASSERT(m_document->settings());
+    ASSERT(m_document && m_document->settings());
+    if (!m_document || !m_document->settings())
+        return;
+
     FontDescriptionChangeScope scope(this);
 
     scope.reset();
diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp
index 6a1b9f1..70419be 100644
--- a/Source/core/css/resolver/ScopedStyleResolver.cpp
+++ b/Source/core/css/resolver/ScopedStyleResolver.cpp
@@ -333,6 +333,9 @@
 
 void ScopedStyleResolver::matchHostRules(ElementRuleCollector& collector, bool includeEmptyRules)
 {
+    // FIXME: Determine tree position.
+    TreePosition treePosition = ignoreTreePosition;
+
     if (m_atHostRules.isEmpty() || !m_scopingNode->isElementNode())
         return;
 
@@ -359,7 +362,7 @@
     collector.setBehaviorAtBoundary(static_cast<SelectorChecker::BehaviorAtBoundary>(SelectorChecker::DoesNotCrossBoundary | SelectorChecker::ScopeContainsLastMatchedElement));
     for (; shadowRoot; shadowRoot = shadowRoot->youngerShadowRoot()) {
         if (RuleSet* ruleSet = atHostRuleSetFor(shadowRoot))
-            collector.collectMatchingRules(MatchRequest(ruleSet, includeEmptyRules, m_scopingNode), ruleRange);
+            collector.collectMatchingRules(MatchRequest(ruleSet, includeEmptyRules, m_scopingNode), ruleRange, treePosition);
     }
 
     collector.sortAndTransferMatchedRules();
@@ -367,6 +370,9 @@
 
 void ScopedStyleResolver::matchAuthorRules(ElementRuleCollector& collector, bool includeEmptyRules, bool applyAuthorStyles)
 {
+    // FIXME: Determine tree position.
+    TreePosition treePosition = ignoreTreePosition;
+
     if (m_authorStyle) {
         collector.clearMatchedRules();
         collector.matchedResult().ranges.lastAuthorRule = collector.matchedResult().matchedProperties.size() - 1;
@@ -375,8 +381,8 @@
         MatchRequest matchRequest(m_authorStyle.get(), includeEmptyRules, m_scopingNode);
         RuleRange ruleRange = collector.matchedResult().ranges.authorRuleRange();
         collector.setBehaviorAtBoundary(applyAuthorStyles ? SelectorChecker::DoesNotCrossBoundary : static_cast<SelectorChecker::BehaviorAtBoundary>(SelectorChecker::DoesNotCrossBoundary | SelectorChecker::ScopeContainsLastMatchedElement));
-        collector.collectMatchingRules(matchRequest, ruleRange);
-        collector.collectMatchingRulesForRegion(matchRequest, ruleRange);
+        collector.collectMatchingRules(matchRequest, ruleRange, treePosition);
+        collector.collectMatchingRulesForRegion(matchRequest, ruleRange, treePosition);
         collector.sortAndTransferMatchedRules();
     }
 }
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index 6b11c4b..bb6a759 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -36,7 +36,7 @@
 #include "core/dom/ContainerNode.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/Node.h"
 #include "core/dom/NodeRenderStyle.h"
 #include "core/dom/NodeTraversal.h"
@@ -286,7 +286,7 @@
     if (element->isWebVTTElement() && context.element()->isWebVTTElement() && toWebVTTElement(element)->isPastNode() != toWebVTTElement(context.element())->isPastNode())
         return false;
 
-    if (FullscreenController* fullscreen = FullscreenController::fromIfExists(context.document())) {
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(context.document())) {
         if (element == fullscreen->webkitCurrentFullScreenElement() || context.element() == fullscreen->webkitCurrentFullScreenElement())
             return false;
     }
diff --git a/Source/core/css/resolver/StyleBuilder.h b/Source/core/css/resolver/StyleBuilder.h
index cd5e6bf..82214e7 100644
--- a/Source/core/css/resolver/StyleBuilder.h
+++ b/Source/core/css/resolver/StyleBuilder.h
@@ -38,17 +38,19 @@
 class CSSValue;
 class Document;
 class RenderStyle;
-class StyleResolver;
 class StyleResolverState;
 
 class StyleBuilder {
 public:
-    static bool applyProperty(CSSPropertyID, StyleResolver*, StyleResolverState&, CSSValue*, bool isInitial, bool isInherit);
+    static void applyProperty(CSSPropertyID, StyleResolverState&, CSSValue*);
 
     // This function contains the gigantic old switch-statement of properties inherited from
     // StyleResolver. Each property should be migrated over to a new StyleBuilder templated
     // function and removed from this code. Once they're all moved, this function can die.
-    static void oldApplyProperty(CSSPropertyID, StyleResolver*, StyleResolverState&, CSSValue*, bool isInitial, bool isInherit);
+    static void oldApplyProperty(CSSPropertyID, StyleResolverState&, CSSValue*, bool isInitial, bool isInherit);
+
+private:
+    static bool applyProperty(CSSPropertyID, StyleResolverState&, CSSValue*, bool isInitial, bool isInherit);
 };
 
 }
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 6ba8b19..37d1e3a 100644
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -47,8 +47,10 @@
 #include "core/css/CSSAspectRatioValue.h"
 #include "core/css/CSSCursorImageValue.h"
 #include "core/css/CSSGradientValue.h"
+#include "core/css/CSSGridTemplateValue.h"
 #include "core/css/CSSImageSetValue.h"
 #include "core/css/CSSLineBoxContainValue.h"
+#include "core/css/CSSParser.h"
 #include "core/css/CSSPrimitiveValueMappings.h"
 #include "core/css/CSSProperty.h"
 #include "core/css/CSSReflectValue.h"
@@ -58,10 +60,10 @@
 #include "core/css/Pair.h"
 #include "core/css/Rect.h"
 #include "core/css/ShadowValue.h"
+#include "core/css/StylePropertySet.h"
 #include "core/css/resolver/ElementStyleResources.h"
 #include "core/css/resolver/FilterOperationResolver.h"
 #include "core/css/resolver/FontBuilder.h"
-#include "core/css/resolver/StyleResolver.h"
 #include "core/css/resolver/StyleResolverState.h"
 #include "core/css/resolver/TransformBuilder.h"
 #include "core/page/Frame.h"
@@ -90,22 +92,22 @@
     return value->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | AutoConversion>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyClip(StyleResolverState& state)
 {
     state.style()->setClip(Length(), Length(), Length(), Length());
     state.style()->setHasClip(false);
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyClip(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyClip(StyleResolverState& state)
 {
     RenderStyle* parentStyle = state.parentStyle();
     if (!parentStyle->hasClip())
-        return applyInitialCSSPropertyClip(styleResolver, state);
+        return applyInitialCSSPropertyClip(state);
     state.style()->setClip(parentStyle->clipTop(), parentStyle->clipRight(), parentStyle->clipBottom(), parentStyle->clipLeft());
     state.style()->setHasClip(true);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyClip(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyClip(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -125,19 +127,19 @@
     }
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolverState& state)
 {
     state.style()->clearCursorList();
     state.style()->setCursor(RenderStyle::initialCursor());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyCursor(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyCursor(StyleResolverState& state)
 {
     state.style()->setCursor(state.parentStyle()->cursor());
     state.style()->setCursorList(state.parentStyle()->cursors());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyCursor(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyCursor(StyleResolverState& state, CSSValue* value)
 {
     state.style()->clearCursorList();
     if (value->isValueList()) {
@@ -164,7 +166,7 @@
     }
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyDirection(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyDirection(StyleResolverState& state, CSSValue* value)
 {
     state.style()->setDirection(*toCSSPrimitiveValue(value));
     Element* element = state.element();
@@ -179,7 +181,7 @@
     return true;
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyDisplay(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyDisplay(StyleResolverState& state)
 {
     EDisplay display = state.parentStyle()->display();
     if (!isValidDisplayValue(state, display))
@@ -187,7 +189,7 @@
     state.style()->setDisplay(display);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyDisplay(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyDisplay(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -200,47 +202,47 @@
     state.style()->setDisplay(display);
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyFontFamily(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyFontFamily(StyleResolverState& state)
 {
     state.fontBuilder().setFontFamilyInitial(state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyFontFamily(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyFontFamily(StyleResolverState& state)
 {
     state.fontBuilder().setFontFamilyInherit(state.parentFontDescription());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyFontFamily(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyFontFamily(StyleResolverState& state, CSSValue* value)
 {
     state.fontBuilder().setFontFamilyValue(value, state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyFontSize(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyFontSize(StyleResolverState& state)
 {
     state.fontBuilder().setFontSizeInitial(state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyFontSize(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyFontSize(StyleResolverState& state)
 {
     state.fontBuilder().setFontSizeInherit(state.parentFontDescription(), state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyFontSize(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyFontSize(StyleResolverState& state, CSSValue* value)
 {
     state.fontBuilder().setFontSizeValue(value, state.parentStyle(), state.rootElementStyle(), state.style()->effectiveZoom());
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyFontWeight(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyFontWeight(StyleResolverState& state)
 {
     state.fontBuilder().setWeight(FontWeightNormal);
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyFontWeight(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyFontWeight(StyleResolverState& state)
 {
     state.fontBuilder().setWeight(state.parentFontDescription().weight());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyFontWeight(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyFontWeight(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -260,7 +262,7 @@
     }
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyLineHeight(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -272,7 +274,7 @@
         lineHeight = RenderStyle::initialLineHeight();
     } else if (primitiveValue->isLength()) {
         double multiplier = state.style()->effectiveZoom();
-        if (Frame* frame = styleResolver->document()->frame())
+        if (Frame* frame = state.document()->frame())
             multiplier *= frame->textZoomFactor();
         lineHeight = primitiveValue->computeLength<Length>(state.style(), state.rootElementStyle(), multiplier);
     } else if (primitiveValue->isPercentage()) {
@@ -289,31 +291,31 @@
     state.style()->setLineHeight(lineHeight);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyListStyleImage(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyListStyleImage(StyleResolverState& state, CSSValue* value)
 {
     state.style()->setListStyleImage(state.styleImage(CSSPropertyListStyleImage, value));
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyOutlineStyle(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyOutlineStyle(StyleResolverState& state)
 {
     state.style()->setOutlineStyleIsAuto(RenderStyle::initialOutlineStyleIsAuto());
     state.style()->setOutlineStyle(RenderStyle::initialBorderStyle());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyOutlineStyle(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyOutlineStyle(StyleResolverState& state)
 {
     state.style()->setOutlineStyleIsAuto(state.parentStyle()->outlineStyleIsAuto());
     state.style()->setOutlineStyle(state.parentStyle()->outlineStyle());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyOutlineStyle(StyleResolverState& state, CSSValue* value)
 {
     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
     state.style()->setOutlineStyleIsAuto(*primitiveValue);
     state.style()->setOutlineStyle(*primitiveValue);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyResize(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyResize(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -325,7 +327,7 @@
     case 0:
         return;
     case CSSValueAuto:
-        if (Settings* settings = styleResolver->document()->settings())
+        if (Settings* settings = state.document()->settings())
             r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
         break;
     default:
@@ -410,9 +412,9 @@
     return true;
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertySize(StyleResolver*, StyleResolverState&) { }
-void StyleBuilderFunctions::applyInheritCSSPropertySize(StyleResolver*, StyleResolverState&) { }
-void StyleBuilderFunctions::applyValueCSSPropertySize(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyInitialCSSPropertySize(StyleResolverState&) { }
+void StyleBuilderFunctions::applyInheritCSSPropertySize(StyleResolverState&) { }
+void StyleBuilderFunctions::applyValueCSSPropertySize(StyleResolverState& state, CSSValue* value)
 {
     state.style()->resetPageSizeType();
     Length width;
@@ -479,14 +481,18 @@
     state.style()->setPageSize(LengthSize(width, height));
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyTextAlign(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyTextAlign(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
 
     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
+    // FIXME : Per http://www.w3.org/TR/css3-text/#text-align0 can now take <string> but this is not implemented in the
+    // rendering code.
+    if (primitiveValue->isString())
+        return;
 
-    if (primitiveValue->getValueID() != CSSValueWebkitMatchParent)
+    if (primitiveValue->isValueID() && primitiveValue->getValueID() != CSSValueWebkitMatchParent)
         state.style()->setTextAlign(*primitiveValue);
     else if (state.parentStyle()->textAlign() == TASTART)
         state.style()->setTextAlign(state.parentStyle()->isLeftToRightDirection() ? LEFT : RIGHT);
@@ -496,7 +502,7 @@
         state.style()->setTextAlign(state.parentStyle()->textAlign());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyTextDecoration(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyTextDecoration(StyleResolverState& state, CSSValue* value)
 {
     TextDecoration t = RenderStyle::initialTextDecoration();
     for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
@@ -506,7 +512,7 @@
     state.style()->setTextDecoration(t);
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyTextIndent(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyTextIndent(StyleResolverState& state)
 {
     state.style()->setTextIndent(state.parentStyle()->textIndent());
 #if ENABLE(CSS3_TEXT)
@@ -514,7 +520,7 @@
 #endif
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyTextIndent(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyTextIndent(StyleResolverState& state)
 {
     state.style()->setTextIndent(RenderStyle::initialTextIndent());
 #if ENABLE(CSS3_TEXT)
@@ -522,7 +528,7 @@
 #endif
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isValueList())
         return;
@@ -549,7 +555,7 @@
 #endif
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyVerticalAlign(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyVerticalAlign(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -568,19 +574,19 @@
     state.setEffectiveZoom(state.parentStyle() ? state.parentStyle()->effectiveZoom() : RenderStyle::initialZoom());
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyZoom(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyZoom(StyleResolverState& state)
 {
     resetEffectiveZoom(state);
     state.setZoom(RenderStyle::initialZoom());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyZoom(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyZoom(StyleResolverState& state)
 {
     resetEffectiveZoom(state);
     state.setZoom(state.parentStyle()->zoom());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolverState& state, CSSValue* value)
 {
     ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue());
     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
@@ -606,14 +612,14 @@
     }
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyWebkitAspectRatio(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyWebkitAspectRatio(StyleResolverState& state)
 {
     state.style()->setHasAspectRatio(RenderStyle::initialHasAspectRatio());
     state.style()->setAspectRatioDenominator(RenderStyle::initialAspectRatioDenominator());
     state.style()->setAspectRatioNumerator(RenderStyle::initialAspectRatioNumerator());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyWebkitAspectRatio(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyWebkitAspectRatio(StyleResolverState& state)
 {
     if (!state.parentStyle()->hasAspectRatio())
         return;
@@ -622,7 +628,7 @@
     state.style()->setAspectRatioNumerator(state.parentStyle()->aspectRatioNumerator());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitAspectRatio(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitAspectRatio(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isAspectRatioValue()) {
         state.style()->setHasAspectRatio(false);
@@ -634,7 +640,7 @@
     state.style()->setAspectRatioNumerator(aspectRatioValue->numeratorValue());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitClipPath(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitClipPath(StyleResolverState& state, CSSValue* value)
 {
     if (value->isPrimitiveValue()) {
         CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
@@ -644,29 +650,29 @@
             state.style()->setClipPath(ShapeClipPathOperation::create(basicShapeForValue(state, primitiveValue->getShapeValue())));
         } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_URI) {
             String cssURLValue = primitiveValue->getStringValue();
-            KURL url = styleResolver->document()->completeURL(cssURLValue);
+            KURL url = state.document()->completeURL(cssURLValue);
             // FIXME: It doesn't work with forward or external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=90405)
             state.style()->setClipPath(ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier()));
         }
     }
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyWebkitFontVariantLigatures(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyWebkitFontVariantLigatures(StyleResolverState& state)
 {
     state.fontBuilder().setFontVariantLigaturesInitial();
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyWebkitFontVariantLigatures(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyWebkitFontVariantLigatures(StyleResolverState& state)
 {
     state.fontBuilder().setFontVariantLigaturesInherit(state.parentFontDescription());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitFontVariantLigatures(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitFontVariantLigatures(StyleResolverState& state, CSSValue* value)
 {
     state.fontBuilder().setFontVariantLigaturesValue(value);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitMarqueeIncrement(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitMarqueeIncrement(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -693,7 +699,7 @@
     }
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitMarqueeSpeed(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitMarqueeSpeed(StyleResolverState& state, CSSValue* value)
 {
     if (!value->isPrimitiveValue())
         return;
@@ -721,39 +727,39 @@
 }
 
 // FIXME: We should use the same system for this as the rest of the pseudo-shorthands (e.g. background-position)
-void StyleBuilderFunctions::applyInitialCSSPropertyWebkitPerspectiveOrigin(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyWebkitPerspectiveOrigin(StyleResolverState& state)
 {
-    applyInitialCSSPropertyWebkitPerspectiveOriginX(styleResolver, state);
-    applyInitialCSSPropertyWebkitPerspectiveOriginY(styleResolver, state);
+    applyInitialCSSPropertyWebkitPerspectiveOriginX(state);
+    applyInitialCSSPropertyWebkitPerspectiveOriginY(state);
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyWebkitPerspectiveOrigin(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyWebkitPerspectiveOrigin(StyleResolverState& state)
 {
-    applyInheritCSSPropertyWebkitPerspectiveOriginX(styleResolver, state);
-    applyInheritCSSPropertyWebkitPerspectiveOriginY(styleResolver, state);
+    applyInheritCSSPropertyWebkitPerspectiveOriginX(state);
+    applyInheritCSSPropertyWebkitPerspectiveOriginY(state);
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitPerspectiveOrigin(StyleResolver*, StyleResolverState&, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitPerspectiveOrigin(StyleResolverState&, CSSValue* value)
 {
     // This is expanded in the parser
     ASSERT_NOT_REACHED();
 }
 
-void StyleBuilderFunctions::applyInitialCSSPropertyWebkitTextEmphasisStyle(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitialCSSPropertyWebkitTextEmphasisStyle(StyleResolverState& state)
 {
     state.style()->setTextEmphasisFill(RenderStyle::initialTextEmphasisFill());
     state.style()->setTextEmphasisMark(RenderStyle::initialTextEmphasisMark());
     state.style()->setTextEmphasisCustomMark(RenderStyle::initialTextEmphasisCustomMark());
 }
 
-void StyleBuilderFunctions::applyInheritCSSPropertyWebkitTextEmphasisStyle(StyleResolver*, StyleResolverState& state)
+void StyleBuilderFunctions::applyInheritCSSPropertyWebkitTextEmphasisStyle(StyleResolverState& state)
 {
     state.style()->setTextEmphasisFill(state.parentStyle()->textEmphasisFill());
     state.style()->setTextEmphasisMark(state.parentStyle()->textEmphasisMark());
     state.style()->setTextEmphasisCustomMark(state.parentStyle()->textEmphasisCustomMark());
 }
 
-void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextEmphasisStyle(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextEmphasisStyle(StyleResolverState& state, CSSValue* value)
 {
     if (value->isValueList()) {
         CSSValueList* list = toCSSValueList(value);
@@ -798,7 +804,7 @@
 }
 
 #if ENABLE(CSS3_TEXT)
-void StyleBuilderFunctions::applyValueCSSPropetyWebkitTextUnderlinePosition(StyleResolver*, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValueCSSPropetyWebkitTextUnderlinePosition(StyleResolverState& state, CSSValue* value)
 {
     // This is true if value is 'auto' or 'alphabetic'.
     if (value->isPrimitiveValue()) {
@@ -1048,10 +1054,127 @@
     return SVGURIReference::fragmentIdentifierFromIRIString(primitiveValue->getStringValue(), document);
 }
 
+static inline bool isValidVisitedLinkProperty(CSSPropertyID id)
+{
+    switch (id) {
+    case CSSPropertyBackgroundColor:
+    case CSSPropertyBorderLeftColor:
+    case CSSPropertyBorderRightColor:
+    case CSSPropertyBorderTopColor:
+    case CSSPropertyBorderBottomColor:
+    case CSSPropertyColor:
+    case CSSPropertyFill:
+    case CSSPropertyOutlineColor:
+    case CSSPropertyStroke:
+    case CSSPropertyTextDecorationColor:
+    case CSSPropertyWebkitColumnRuleColor:
+    case CSSPropertyWebkitTextEmphasisColor:
+    case CSSPropertyWebkitTextFillColor:
+    case CSSPropertyWebkitTextStrokeColor:
+        return true;
+    default:
+        break;
+    }
 
-// FIXME: Every use of "styleResolver" in this function is a layering
-// violation and should be removed.
-void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit)
+    return false;
+}
+
+static bool hasVariableReference(CSSValue* value)
+{
+    if (value->isPrimitiveValue()) {
+        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
+        return primitiveValue->hasVariableReference();
+    }
+
+    if (value->isCalculationValue())
+        return static_cast<CSSCalcValue*>(value)->hasVariableReference();
+
+    if (value->isReflectValue()) {
+        CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value);
+        CSSPrimitiveValue* direction = reflectValue->direction();
+        CSSPrimitiveValue* offset = reflectValue->offset();
+        CSSValue* mask = reflectValue->mask();
+        return (direction && hasVariableReference(direction)) || (offset && hasVariableReference(offset)) || (mask && hasVariableReference(mask));
+    }
+
+    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
+        if (hasVariableReference(i.value()))
+            return true;
+    }
+
+    return false;
+}
+
+// FIXME: Resolving variables should be factored better. Maybe a resover-style class?
+static void resolveVariables(StyleResolverState& state, CSSPropertyID id, CSSValue* value, Vector<std::pair<CSSPropertyID, String> >& knownExpressions)
+{
+    std::pair<CSSPropertyID, String> expression(id, value->serializeResolvingVariables(*state.style()->variables()));
+
+    if (knownExpressions.contains(expression))
+        return; // cycle detected.
+
+    knownExpressions.append(expression);
+
+    // FIXME: It would be faster not to re-parse from strings, but for now CSS property validation lives inside the parser so we do it there.
+    RefPtr<MutableStylePropertySet> resultSet = MutableStylePropertySet::create();
+    if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, state.document()))
+        return; // expression failed to parse.
+
+    for (unsigned i = 0; i < resultSet->propertyCount(); i++) {
+        StylePropertySet::PropertyReference property = resultSet->propertyAt(i);
+        if (property.id() != CSSPropertyVariable && hasVariableReference(property.value())) {
+            resolveVariables(state, property.id(), property.value(), knownExpressions);
+        } else {
+            StyleBuilder::applyProperty(property.id(), state, property.value());
+            // All properties become dependent on their parent style when they use variables.
+            state.style()->setHasExplicitlyInheritedProperties();
+        }
+    }
+}
+
+void StyleBuilder::applyProperty(CSSPropertyID id, StyleResolverState& state, CSSValue* value)
+{
+    if (id != CSSPropertyVariable && hasVariableReference(value)) {
+        Vector<std::pair<CSSPropertyID, String> > knownExpressions;
+        resolveVariables(state, id, value, knownExpressions);
+        return;
+    }
+
+    // CSS variables don't resolve shorthands at parsing time, so this should be *after* handling variables.
+    ASSERT_WITH_MESSAGE(!isExpandedShorthand(id), "Shorthand property id = %d wasn't expanded at parsing time", id);
+
+    bool isInherit = state.parentNode() && value->isInheritedValue();
+    bool isInitial = value->isInitialValue() || (!state.parentNode() && value->isInheritedValue());
+
+    ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
+    ASSERT(!isInherit || (state.parentNode() && state.parentStyle())); // isInherit -> (state.parentNode() && state.parentStyle())
+
+    if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
+        // Limit the properties that can be applied to only the ones honored by :visited.
+        return;
+    }
+
+    if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(id))
+        state.parentStyle()->setHasExplicitlyInheritedProperties();
+
+    if (id == CSSPropertyVariable) {
+        ASSERT_WITH_SECURITY_IMPLICATION(value->isVariableValue());
+        CSSVariableValue* variable = toCSSVariableValue(value);
+        ASSERT(!variable->name().isEmpty());
+        ASSERT(!variable->value().isEmpty());
+        state.style()->setVariable(variable->name(), variable->value());
+        return;
+    }
+
+    if (StyleBuilder::applyProperty(id, state, value, isInitial, isInherit))
+        return;
+
+    // Fall back to the old switch statement, which is now in StyleBuilderCustom.cpp
+    StyleBuilder::oldApplyProperty(id, state, value, isInitial, isInherit);
+}
+
+
+void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit)
 {
     CSSPrimitiveValue* primitiveValue = value->isPrimitiveValue() ? toCSSPrimitiveValue(value) : 0;
 
@@ -1113,7 +1236,7 @@
                     state.style()->setContent(value.isNull() ? emptyAtom : value.impl(), didSet);
                     didSet = true;
                     // register the fact that the attribute value affects the style
-                    styleResolver->m_features.attrsInRules.add(attr.localName().impl());
+                    state.contentAttrValues().append(attr.localName());
                 } else if (contentValue->isCounter()) {
                     Counter* counterValue = contentValue->getCounterValue();
                     EListStyleType listStyleType = NoneListStyle;
@@ -1419,7 +1542,7 @@
     {
         CSSPropertyID newId = CSSProperty::resolveDirectionAwareProperty(id, state.style()->direction(), state.style()->writingMode());
         ASSERT(newId != id);
-        return styleResolver->applyProperty(state, newId, value);
+        return applyProperty(newId, state, value);
     }
     case CSSPropertyFontStretch:
     case CSSPropertyPage:
@@ -1493,7 +1616,7 @@
     case CSSPropertyWebkitFilter: {
         HANDLE_INHERIT_AND_INITIAL(filter, Filter);
         FilterOperations operations;
-        if (FilterOperationResolver::createFilterOperations(value, state.style(), state.rootElementStyle(), operations, styleResolver->m_styleResourceLoader.customFilterProgramCache(), state))
+        if (FilterOperationResolver::createFilterOperations(value, state.style(), state.rootElementStyle(), operations, state))
             state.style()->setFilter(operations);
         return;
     }
@@ -1588,6 +1711,32 @@
         return;
     }
 
+    case CSSPropertyGridTemplate: {
+        if (isInherit) {
+            state.style()->setNamedGridArea(state.parentStyle()->namedGridArea());
+            state.style()->setNamedGridAreaRowCount(state.parentStyle()->namedGridAreaRowCount());
+            state.style()->setNamedGridAreaColumnCount(state.parentStyle()->namedGridAreaColumnCount());
+            return;
+        }
+        if (isInitial) {
+            state.style()->setNamedGridArea(RenderStyle::initialNamedGridArea());
+            state.style()->setNamedGridAreaRowCount(RenderStyle::initialNamedGridAreaCount());
+            state.style()->setNamedGridAreaColumnCount(RenderStyle::initialNamedGridAreaCount());
+            return;
+        }
+
+        if (value->isPrimitiveValue()) {
+            ASSERT(toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
+            return;
+        }
+
+        CSSGridTemplateValue* gridTemplateValue = toCSSGridTemplateValue(value);
+        state.style()->setNamedGridArea(gridTemplateValue->gridAreaMap());
+        state.style()->setNamedGridAreaRowCount(gridTemplateValue->rowCount());
+        state.style()->setNamedGridAreaColumnCount(gridTemplateValue->columnCount());
+        return;
+    }
+
     // These properties are aliased and we already applied the property on the prefixed version.
     case CSSPropertyTransitionDelay:
     case CSSPropertyTransitionDuration:
@@ -1759,10 +1908,6 @@
     case CSSPropertyWebkitFontVariantLigatures:
     case CSSPropertyWebkitHighlight:
     case CSSPropertyWebkitHyphenateCharacter:
-    case CSSPropertyWebkitHyphenateLimitAfter:
-    case CSSPropertyWebkitHyphenateLimitBefore:
-    case CSSPropertyWebkitHyphenateLimitLines:
-    case CSSPropertyWebkitHyphens:
     case CSSPropertyWebkitLineAlign:
     case CSSPropertyWebkitLineBreak:
     case CSSPropertyWebkitLineClamp:
@@ -1834,23 +1979,33 @@
     case CSSPropertyWordWrap:
     case CSSPropertyZIndex:
     case CSSPropertyZoom:
+    case CSSPropertyFontFamily:
+    case CSSPropertyGridAutoFlow:
+    case CSSPropertyMarker:
+    case CSSPropertyAlignmentBaseline:
+    case CSSPropertyBufferedRendering:
+    case CSSPropertyClipRule:
+    case CSSPropertyColorInterpolation:
+    case CSSPropertyColorInterpolationFilters:
+    case CSSPropertyColorRendering:
+    case CSSPropertyDominantBaseline:
+    case CSSPropertyFillRule:
+    case CSSPropertyMaskType:
+    case CSSPropertyShapeRendering:
+    case CSSPropertyStrokeLinecap:
+    case CSSPropertyStrokeLinejoin:
+    case CSSPropertyTextAnchor:
+    case CSSPropertyVectorEffect:
+    case CSSPropertyWritingMode:
+        ASSERT_NOT_REACHED();
+        return;
+    // Only used in @viewport rules
     case CSSPropertyMaxZoom:
     case CSSPropertyMinZoom:
     case CSSPropertyOrientation:
     case CSSPropertyUserZoom:
-    case CSSPropertyFontFamily:
-    case CSSPropertyGridAutoFlow:
-    case CSSPropertyMarker:
-        ASSERT_NOT_REACHED();
         return;
 
-    case CSSPropertyAlignmentBaseline:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(alignmentBaseline, AlignmentBaseline)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setAlignmentBaseline(*primitiveValue);
-        break;
-    }
     case CSSPropertyBaselineShift:
     {
         HANDLE_SVG_INHERIT_AND_INITIAL(baselineShift, BaselineShift);
@@ -1886,67 +2041,11 @@
             state.style()->accessSVGStyle()->setKerning(SVGLength::fromCSSPrimitiveValue(primitiveValue));
         break;
     }
-    case CSSPropertyDominantBaseline:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(dominantBaseline, DominantBaseline)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setDominantBaseline(*primitiveValue);
-        break;
-    }
-    case CSSPropertyColorInterpolation:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(colorInterpolation, ColorInterpolation)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setColorInterpolation(*primitiveValue);
-        break;
-    }
-    case CSSPropertyColorInterpolationFilters:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(colorInterpolationFilters, ColorInterpolationFilters)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setColorInterpolationFilters(*primitiveValue);
-        break;
-    }
     case CSSPropertyColorProfile:
     {
         // Not implemented.
         break;
     }
-    case CSSPropertyColorRendering:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(colorRendering, ColorRendering)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setColorRendering(*primitiveValue);
-        break;
-    }
-    case CSSPropertyClipRule:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(clipRule, ClipRule)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setClipRule(*primitiveValue);
-        break;
-    }
-    case CSSPropertyFillRule:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(fillRule, FillRule)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setFillRule(*primitiveValue);
-        break;
-    }
-    case CSSPropertyStrokeLinejoin:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(joinStyle, JoinStyle)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setJoinStyle(*primitiveValue);
-        break;
-    }
-    case CSSPropertyShapeRendering:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(shapeRendering, ShapeRendering)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setShapeRendering(*primitiveValue);
-        break;
-    }
     // end of ident only properties
     case CSSPropertyFill:
     {
@@ -2067,13 +2166,6 @@
             state.style()->accessSVGStyle()->setMarkerEndResource(fragmentIdentifier(primitiveValue, state.document()));
         break;
     }
-    case CSSPropertyStrokeLinecap:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(capStyle, CapStyle)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setCapStyle(*primitiveValue);
-        break;
-    }
     case CSSPropertyStrokeMiterlimit:
     {
         HANDLE_SVG_INHERIT_AND_INITIAL(strokeMiterLimit, StrokeMiterLimit)
@@ -2103,20 +2195,6 @@
             state.style()->accessSVGStyle()->setClipperResource(fragmentIdentifier(primitiveValue, state.document()));
         break;
     }
-    case CSSPropertyTextAnchor:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(textAnchor, TextAnchor)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setTextAnchor(*primitiveValue);
-        break;
-    }
-    case CSSPropertyWritingMode:
-    {
-        HANDLE_SVG_INHERIT_AND_INITIAL(writingMode, WritingMode)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setWritingMode(*primitiveValue);
-        break;
-    }
     case CSSPropertyStopColor:
     {
         HANDLE_SVG_INHERIT_AND_INITIAL(stopColor, StopColor);
@@ -2170,24 +2248,6 @@
         // Silently ignoring this property for now
         // http://bugs.webkit.org/show_bug.cgi?id=6022
         break;
-    case CSSPropertyVectorEffect: {
-        HANDLE_SVG_INHERIT_AND_INITIAL(vectorEffect, VectorEffect)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setVectorEffect(*primitiveValue);
-        break;
-    }
-    case CSSPropertyBufferedRendering: {
-        HANDLE_SVG_INHERIT_AND_INITIAL(bufferedRendering, BufferedRendering)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setBufferedRendering(*primitiveValue);
-        break;
-    }
-    case CSSPropertyMaskType: {
-        HANDLE_SVG_INHERIT_AND_INITIAL(maskType, MaskType)
-        if (primitiveValue)
-            state.style()->accessSVGStyle()->setMaskType(*primitiveValue);
-        break;
-    }
     }
 }
 
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 30d450d..e1e8378 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -36,6 +36,8 @@
 #include "core/animation/AnimatableValue.h"
 #include "core/animation/Animation.h"
 #include "core/animation/DocumentTimeline.h"
+#include "core/animation/css/CSSAnimatableValueFactory.h"
+#include "core/animation/css/CSSAnimations.h"
 #include "core/css/CSSCalculationValue.h"
 #include "core/css/CSSDefaultStyleSheets.h"
 #include "core/css/CSSFontSelector.h"
@@ -284,6 +286,9 @@
 
 inline void StyleResolver::matchShadowDistributedRules(ElementRuleCollector& collector, bool includeEmptyRules)
 {
+    // FIXME: Determine tree position.
+    TreePosition treePosition = ignoreTreePosition;
+
     if (m_ruleSets.shadowDistributedRules().isEmpty())
         return;
 
@@ -299,7 +304,7 @@
     Vector<MatchRequest> matchRequests;
     m_ruleSets.shadowDistributedRules().collectMatchRequests(includeEmptyRules, matchRequests);
     for (size_t i = 0; i < matchRequests.size(); ++i)
-        collector.collectMatchingRules(matchRequests[i], ruleRange);
+        collector.collectMatchingRules(matchRequests[i], ruleRange, treePosition);
     collector.sortAndTransferMatchedRules();
 
     collector.setBehaviorAtBoundary(previousBoundary);
@@ -317,7 +322,7 @@
 {
     // fast path
     if (m_styleTree.hasOnlyScopedResolverForDocument()) {
-        m_styleTree.scopedStyleResolverForDocument()->matchAuthorRules(collector, includeEmptyRules, true);
+        m_styleTree.scopedStyleResolverForDocument()->matchAuthorRules(collector, includeEmptyRules, element->treeScope()->applyAuthorStyles());
         return;
     }
 
@@ -442,7 +447,7 @@
     if (!ruleSet)
         return false;
 
-    ElementRuleCollector collector(context, m_selectorFilter, style, m_inspectorCSSOMWrappers);
+    ElementRuleCollector collector(context, m_selectorFilter, style);
     return collector.hasAnyMatchingRules(ruleSet);
 }
 
@@ -530,6 +535,11 @@
     document->setWritingModeSetOnDocumentElement(false);
 }
 
+static void addContentAttrValuesToFeatures(const Vector<AtomicString>& contentAttrValues, RuleFeatureSet& features)
+{
+    for (size_t i = 0; i < contentAttrValues.size(); ++i)
+        features.attrsInRules.add(contentAttrValues[i].impl());
+}
 
 PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent, StyleSharingBehavior sharingBehavior,
     RuleMatchingBehavior matchingBehavior, RenderRegion* regionForStyling)
@@ -597,7 +607,7 @@
     }
 
     {
-        ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style(), m_inspectorCSSOMWrappers);
+        ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
         collector.setRegionForStyling(regionForStyling);
 
         if (matchingBehavior == MatchOnlyUserAgentRules)
@@ -606,6 +616,8 @@
             matchAllRules(state, collector, m_matchAuthorAndUserStyles, matchingBehavior != MatchAllRulesExcludingSMIL);
 
         applyMatchedProperties(state, collector.matchedResult());
+
+        addContentAttrValuesToFeatures(state.contentAttrValues(), m_features);
     }
     {
         StyleAdjuster adjuster(state.cachedUAStyle(), m_document->inQuirksMode());
@@ -621,7 +633,7 @@
     return state.takeStyle();
 }
 
-PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* e, const RenderStyle* elementStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue)
+PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* e, const RenderStyle* elementStyle, const StyleKeyframe* keyframe)
 {
     ASSERT(document()->frame());
     ASSERT(documentSettings());
@@ -656,7 +668,7 @@
 
     // Line-height is set when we are sure we decided on the font-size
     if (state.lineHeightValue())
-        applyProperty(state, CSSPropertyLineHeight, state.lineHeightValue());
+        StyleBuilder::applyProperty(CSSPropertyLineHeight, state, state.lineHeightValue());
 
     // Now do rest of the properties.
     if (keyframe->properties())
@@ -669,24 +681,12 @@
     // Start loading resources referenced by this style.
     m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
 
-    // Add all the animating properties to the keyframe.
-    if (const StylePropertySet* styleDeclaration = keyframe->properties()) {
-        unsigned propertyCount = styleDeclaration->propertyCount();
-        for (unsigned i = 0; i < propertyCount; ++i) {
-            CSSPropertyID property = styleDeclaration->propertyAt(i).id();
-            // Timing-function within keyframes is special, because it is not animated; it just
-            // describes the timing function between this keyframe and the next.
-            if (property != CSSPropertyWebkitAnimationTimingFunction)
-                keyframeValue.addProperty(property);
-        }
-    }
-
     document()->didAccessStyleResolver();
 
     return state.takeStyle();
 }
 
-const StyleRuleKeyframes* StyleResolver::matchScopedKeyframesRule(Element* e, const StringImpl* animationName)
+const StyleRuleKeyframes* StyleResolver::matchScopedKeyframesRule(const Element* e, const StringImpl* animationName)
 {
     if (m_styleTree.hasOnlyScopedResolverForDocument())
         return m_styleTree.scopedStyleResolverForDocument()->keyframeStylesForAnimation(animationName);
@@ -705,6 +705,7 @@
 
 void StyleResolver::keyframeStylesForAnimation(Element* e, const RenderStyle* elementStyle, KeyframeList& list)
 {
+    ASSERT(!RuntimeEnabledFeatures::webAnimationsCSSEnabled());
     list.clear();
 
     // Get the keyframesRule for this name
@@ -722,7 +723,8 @@
         const StyleKeyframe* keyframe = keyframes[i].get();
 
         KeyframeValue keyframeValue(0, 0);
-        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, keyframe, keyframeValue));
+        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, keyframe));
+        keyframeValue.addProperties(keyframe->properties());
 
         // Add this keyframe style to all the indicated key times
         Vector<float> keys;
@@ -742,7 +744,8 @@
             zeroPercentKeyframe->setKeyText("0%");
         }
         KeyframeValue keyframeValue(0, 0);
-        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, zeroPercentKeyframe, keyframeValue));
+        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, zeroPercentKeyframe));
+        keyframeValue.addProperties(zeroPercentKeyframe->properties());
         list.insert(keyframeValue);
     }
 
@@ -754,11 +757,70 @@
             hundredPercentKeyframe->setKeyText("100%");
         }
         KeyframeValue keyframeValue(1, 0);
-        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, hundredPercentKeyframe, keyframeValue));
+        keyframeValue.setStyle(styleForKeyframe(e, elementStyle, hundredPercentKeyframe));
+        keyframeValue.addProperties(hundredPercentKeyframe->properties());
         list.insert(keyframeValue);
     }
 }
 
+void StyleResolver::resolveKeyframes(Element* element, const RenderStyle* style, const StringImpl* name, KeyframeAnimationEffect::KeyframeVector& keyframes)
+{
+    const StyleRuleKeyframes* keyframesRule = matchScopedKeyframesRule(element, name);
+    if (!keyframesRule)
+        return;
+
+    // Construct and populate the style for each keyframe
+    const Vector<RefPtr<StyleKeyframe> >& styleKeyframes = keyframesRule->keyframes();
+    for (unsigned i = 0; i < styleKeyframes.size(); ++i) {
+        const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
+        RefPtr<RenderStyle> keyframeStyle = styleForKeyframe(element, style, styleKeyframe);
+
+        Vector<float> offsets;
+        styleKeyframe->getKeys(offsets);
+        for (size_t j = 0; j < offsets.size(); ++j) {
+            RefPtr<Keyframe> keyframe = Keyframe::create();
+            keyframe->setOffset(offsets[j]);
+            const StylePropertySet* properties = styleKeyframe->properties();
+            // FIXME: AnimatableValues should be shared between the keyframes at different offsets.
+            for (unsigned k = 0; k < properties->propertyCount(); k++) {
+                CSSPropertyID property = properties->propertyAt(k).id();
+                // FIXME: CSSValue needs to be resolved.
+                keyframe->setPropertyValue(property, CSSAnimatableValueFactory::create(property, keyframeStyle.get()).get());
+            }
+            keyframes.append(keyframe);
+        }
+    }
+
+    // FIXME: If the 0% keyframe is missing, create it (but only if there is at least one other keyframe)
+    // FIXME: If the 100% keyframe is missing, create it (but only if there is at least one other keyframe)
+}
+
+const StylePropertySet* StyleResolver::firstKeyframeStyles(const Element* element, const StringImpl* animationName)
+{
+    const StyleRuleKeyframes* keyframesRule = matchScopedKeyframesRule(element, animationName);
+    if (!keyframesRule)
+        return 0;
+
+    // Find the last keyframe at offset 0
+    const StyleKeyframe* firstKeyframe = 0;
+    const Vector<RefPtr<StyleKeyframe> >& styleKeyframes = keyframesRule->keyframes();
+    for (unsigned i = 0; i < styleKeyframes.size(); ++i) {
+        const StyleKeyframe* styleKeyframe = styleKeyframes[i].get();
+
+        Vector<float> offsets;
+        styleKeyframe->getKeys(offsets);
+        for (size_t j = 0; j < offsets.size(); ++j) {
+            if (!offsets[j]) {
+                firstKeyframe = styleKeyframe;
+                break;
+            }
+        }
+    }
+
+    return firstKeyframe ? firstKeyframe->properties() : 0;
+}
+
+
 PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* e, const PseudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle)
 {
     ASSERT(document()->frame());
@@ -786,7 +848,7 @@
 
     {
         // Check UA, user and author rules.
-    ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style(), m_inspectorCSSOMWrappers);
+    ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
         collector.setPseudoStyleRequest(pseudoStyleRequest);
 
         matchUARules(collector);
@@ -801,6 +863,8 @@
         state.style()->setStyleType(pseudoStyleRequest.pseudoId);
 
         applyMatchedProperties(state, collector.matchedResult());
+
+        addContentAttrValuesToFeatures(state.contentAttrValues(), m_features);
     }
     {
         StyleAdjuster adjuster(state.cachedUAStyle(), m_document->inQuirksMode());
@@ -848,10 +912,12 @@
 
     // Line-height is set when we are sure we decided on the font-size.
     if (state.lineHeightValue())
-        applyProperty(state, CSSPropertyLineHeight, state.lineHeightValue());
+        StyleBuilder::applyProperty(CSSPropertyLineHeight, state, state.lineHeightValue());
 
     applyMatchedProperties<LowPriorityProperties>(state, result, false, 0, result.matchedProperties.size() - 1, inheritedOnly);
 
+    addContentAttrValuesToFeatures(state.contentAttrValues(), m_features);
+
     // Start loading resources referenced by this style.
     m_styleResourceLoader.loadPendingResources(state.style(), state.elementStyleResources());
 
@@ -949,7 +1015,7 @@
         resetDirectionAndWritingModeOnDocument(document());
     StyleResolverState state(document(), e);
 
-    ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style(), m_inspectorCSSOMWrappers);
+    ElementRuleCollector collector(state.elementContext(), m_selectorFilter, state.style());
     collector.setMode(SelectorChecker::CollectingRules);
     collector.setPseudoStyleRequest(PseudoStyleRequest(pseudoId));
 
@@ -976,10 +1042,18 @@
 // this is mostly boring stuff on how to apply a certain rule to the renderstyle...
 
 template <StyleResolver::StyleApplicationPass pass>
-void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Element* target, const DocumentTimeline* timeline)
+void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Element* target, const DocumentTimeline* timeline, const CSSAnimationUpdate* update)
 {
     ASSERT(pass != VariableDefinitions);
     ASSERT(pass != AnimationProperties);
+    if (update && update->styles()) {
+        bool applyInheritedOnly = false;
+        bool isImportant = false;
+        StyleRule* rule = 0;
+        applyProperties<pass>(state, update->styles(), rule, isImportant, applyInheritedOnly, PropertyWhitelistNone);
+        isImportant = true;
+        applyProperties<pass>(state, update->styles(), rule, isImportant, applyInheritedOnly, PropertyWhitelistNone);
+    }
     AnimationStack* animationStack = timeline->animationStack(target);
     if (!animationStack)
         return;
@@ -987,6 +1061,8 @@
 
     for (size_t i = 0; i < animations.size(); ++i) {
         RefPtr<Animation> animation = animations.at(i);
+        if (update && update->isFiltered(animation->player()))
+            continue;
         const AnimationEffect::CompositableValueMap* compositableValues = animation->compositableValues();
         for (AnimationEffect::CompositableValueMap::const_iterator iter = compositableValues->begin(); iter != compositableValues->end(); ++iter) {
             CSSPropertyID property = iter->key;
@@ -999,36 +1075,11 @@
             if (pass == HighPriorityProperties && property == CSSPropertyLineHeight)
                 state.setLineHeightValue(cssValue.get());
             else
-                applyProperty(state, property, cssValue.get());
+                StyleBuilder::applyProperty(property, state, cssValue.get());
         }
     }
 }
 
-static inline bool isValidVisitedLinkProperty(CSSPropertyID id)
-{
-    switch (id) {
-    case CSSPropertyBackgroundColor:
-    case CSSPropertyBorderLeftColor:
-    case CSSPropertyBorderRightColor:
-    case CSSPropertyBorderTopColor:
-    case CSSPropertyBorderBottomColor:
-    case CSSPropertyColor:
-    case CSSPropertyFill:
-    case CSSPropertyOutlineColor:
-    case CSSPropertyStroke:
-    case CSSPropertyTextDecorationColor:
-    case CSSPropertyWebkitColumnRuleColor:
-    case CSSPropertyWebkitTextEmphasisColor:
-    case CSSPropertyWebkitTextFillColor:
-    case CSSPropertyWebkitTextStrokeColor:
-        return true;
-    default:
-        break;
-    }
-
-    return false;
-}
-
 // http://dev.w3.org/csswg/css3-regions/#the-at-region-style-rule
 // FIXME: add incremental support for other region styling properties.
 static inline bool isValidRegionStyleProperty(CSSPropertyID id)
@@ -1096,13 +1147,13 @@
 bool StyleResolver::isPropertyForPass(CSSPropertyID property)
 {
     COMPILE_ASSERT(CSSPropertyVariable < firstCSSProperty, CSS_variable_is_before_first_property);
-    const CSSPropertyID firstAnimationProperty = CSSPropertyWebkitAnimation;
+    const CSSPropertyID firstAnimationProperty = CSSPropertyDisplay;
     const CSSPropertyID lastAnimationProperty = CSSPropertyTransitionTimingFunction;
     COMPILE_ASSERT(firstCSSProperty == firstAnimationProperty, CSS_first_animation_property_should_be_first_property);
     const CSSPropertyID firstHighPriorityProperty = CSSPropertyColor;
     const CSSPropertyID lastHighPriorityProperty = CSSPropertyLineHeight;
     COMPILE_ASSERT(lastAnimationProperty + 1 == firstHighPriorityProperty, CSS_color_is_first_high_priority_property);
-    COMPILE_ASSERT(CSSPropertyLineHeight == firstHighPriorityProperty + 18, CSS_line_height_is_end_of_high_prioity_property_range);
+    COMPILE_ASSERT(CSSPropertyLineHeight == firstHighPriorityProperty + 17, CSS_line_height_is_end_of_high_prioity_property_range);
     COMPILE_ASSERT(CSSPropertyZoom == lastHighPriorityProperty - 1, CSS_zoom_is_before_line_height);
     switch (pass) {
     case VariableDefinitions:
@@ -1122,7 +1173,6 @@
 void StyleResolver::applyProperties(StyleResolverState& state, const StylePropertySet* properties, StyleRule* rule, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
 {
     ASSERT((propertyWhitelistType != PropertyWhitelistRegion) || state.regionForStyling());
-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willProcessRule(document(), rule, this);
 
     unsigned propertyCount = properties->propertyCount();
     for (unsigned i = 0; i < propertyCount; ++i) {
@@ -1147,9 +1197,8 @@
         if (pass == HighPriorityProperties && property == CSSPropertyLineHeight)
             state.setLineHeightValue(current.value());
         else
-            applyProperty(state, current.id(), current.value());
+            StyleBuilder::applyProperty(current.id(), state, current.value());
     }
-    InspectorInstrumentation::didProcessRule(cookie);
 }
 
 template <StyleResolver::StyleApplicationPass pass>
@@ -1188,6 +1237,24 @@
     m_matchedPropertiesCache.clear();
 }
 
+PassOwnPtr<CSSAnimationUpdate> StyleResolver::calculateCSSAnimationUpdate(StyleResolverState& state)
+{
+    if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
+        return nullptr;
+
+    const Element* element = state.element();
+    ASSERT(element);
+
+    if (!CSSAnimations::needsUpdate(element, state.style()))
+        return nullptr;
+
+    ActiveAnimations* activeAnimations = element->activeAnimations();
+    const CSSAnimationDataList* animations = state.style()->animations();
+    const CSSAnimations* cssAnimations = activeAnimations ? activeAnimations->cssAnimations() : 0;
+    EDisplay display = state.style()->display();
+    return CSSAnimations::calculateUpdate(element, display, cssAnimations, animations, this);
+}
+
 void StyleResolver::applyMatchedProperties(StyleResolverState& state, const MatchResult& matchResult)
 {
     const Element* element = state.element();
@@ -1231,7 +1298,8 @@
     applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedOnly);
     applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
     applyMatchedProperties<AnimationProperties>(state, matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
-    // FIXME: animations should be triggered here
+
+    OwnPtr<CSSAnimationUpdate> cssAnimationUpdate = calculateCSSAnimationUpdate(state);
 
     // Now we have all of the matched rules in the appropriate order. Walk the rules and apply
     // high-priority properties first, i.e., those properties that other properties depend on.
@@ -1240,8 +1308,8 @@
     state.setLineHeightValue(0);
     applyMatchedProperties<HighPriorityProperties>(state, matchResult, false, 0, matchResult.matchedProperties.size() - 1, applyInheritedOnly);
     // Animation contributions are processed here because CSS Animations are overridable by user !important rules.
-    if (RuntimeEnabledFeatures::webAnimationsEnabled())
-        applyAnimatedProperties<HighPriorityProperties>(state, element, element->document()->timeline());
+    if (RuntimeEnabledFeatures::webAnimationsEnabled() && !applyInheritedOnly)
+        applyAnimatedProperties<HighPriorityProperties>(state, element, element->document()->timeline(), cssAnimationUpdate.get());
     applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, matchResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedOnly);
     applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
     applyMatchedProperties<HighPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
@@ -1256,7 +1324,7 @@
 
     // Line-height is set when we are sure we decided on the font-size.
     if (state.lineHeightValue())
-        applyProperty(state, CSSPropertyLineHeight, state.lineHeightValue());
+        StyleBuilder::applyProperty(CSSPropertyLineHeight, state, state.lineHeightValue());
 
     // Many properties depend on the font. If it changes we just apply all properties.
     if (cachedMatchedProperties && cachedMatchedProperties->renderStyle->fontDescription() != state.style()->fontDescription())
@@ -1270,8 +1338,8 @@
 
     // Now do the author and user normal priority properties and all the !important properties.
     applyMatchedProperties<LowPriorityProperties>(state, matchResult, false, matchResult.ranges.lastUARule + 1, matchResult.matchedProperties.size() - 1, applyInheritedOnly);
-    if (RuntimeEnabledFeatures::webAnimationsEnabled())
-        applyAnimatedProperties<LowPriorityProperties>(state, element, element->document()->timeline());
+    if (RuntimeEnabledFeatures::webAnimationsEnabled() && !applyInheritedOnly)
+        applyAnimatedProperties<LowPriorityProperties>(state, element, element->document()->timeline(), cssAnimationUpdate.get());
     applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matchResult.ranges.firstAuthorRule, matchResult.ranges.lastAuthorRule, applyInheritedOnly);
     applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUserRule, matchResult.ranges.lastUserRule, applyInheritedOnly);
     applyMatchedProperties<LowPriorityProperties>(state, matchResult, true, matchResult.ranges.firstUARule, matchResult.ranges.lastUARule, applyInheritedOnly);
@@ -1318,104 +1386,11 @@
             default:
                 break;
             }
-            applyProperty(state, properties[i].property, properties[i].value);
+            StyleBuilder::applyProperty(properties[i].property, state, properties[i].value);
         }
     }
 }
 
-static bool hasVariableReference(CSSValue* value)
-{
-    if (value->isPrimitiveValue()) {
-        CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
-        return primitiveValue->hasVariableReference();
-    }
-
-    if (value->isCalculationValue())
-        return static_cast<CSSCalcValue*>(value)->hasVariableReference();
-
-    if (value->isReflectValue()) {
-        CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value);
-        CSSPrimitiveValue* direction = reflectValue->direction();
-        CSSPrimitiveValue* offset = reflectValue->offset();
-        CSSValue* mask = reflectValue->mask();
-        return (direction && hasVariableReference(direction)) || (offset && hasVariableReference(offset)) || (mask && hasVariableReference(mask));
-    }
-
-    for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
-        if (hasVariableReference(i.value()))
-            return true;
-    }
-
-    return false;
-}
-
-void StyleResolver::resolveVariables(StyleResolverState& state, CSSPropertyID id, CSSValue* value, Vector<std::pair<CSSPropertyID, String> >& knownExpressions)
-{
-    std::pair<CSSPropertyID, String> expression(id, value->serializeResolvingVariables(*state.style()->variables()));
-
-    if (knownExpressions.contains(expression))
-        return; // cycle detected.
-
-    knownExpressions.append(expression);
-
-    // FIXME: It would be faster not to re-parse from strings, but for now CSS property validation lives inside the parser so we do it there.
-    RefPtr<MutableStylePropertySet> resultSet = MutableStylePropertySet::create();
-    if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, document()))
-        return; // expression failed to parse.
-
-    for (unsigned i = 0; i < resultSet->propertyCount(); i++) {
-        StylePropertySet::PropertyReference property = resultSet->propertyAt(i);
-        if (property.id() != CSSPropertyVariable && hasVariableReference(property.value())) {
-            resolveVariables(state, property.id(), property.value(), knownExpressions);
-        } else {
-            applyProperty(state, property.id(), property.value());
-            // All properties become dependent on their parent style when they use variables.
-            state.style()->setHasExplicitlyInheritedProperties();
-        }
-    }
-}
-
-void StyleResolver::applyProperty(StyleResolverState& state, CSSPropertyID id, CSSValue* value)
-{
-    if (id != CSSPropertyVariable && hasVariableReference(value)) {
-        Vector<std::pair<CSSPropertyID, String> > knownExpressions;
-        resolveVariables(state, id, value, knownExpressions);
-        return;
-    }
-
-    // CSS variables don't resolve shorthands at parsing time, so this should be *after* handling variables.
-    ASSERT_WITH_MESSAGE(!isExpandedShorthand(id), "Shorthand property id = %d wasn't expanded at parsing time", id);
-
-    bool isInherit = state.parentNode() && value->isInheritedValue();
-    bool isInitial = value->isInitialValue() || (!state.parentNode() && value->isInheritedValue());
-
-    ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit
-    ASSERT(!isInherit || (state.parentNode() && state.parentStyle())); // isInherit -> (state.parentNode() && state.parentStyle())
-
-    if (!state.applyPropertyToRegularStyle() && (!state.applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) {
-        // Limit the properties that can be applied to only the ones honored by :visited.
-        return;
-    }
-
-    if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(id))
-        state.parentStyle()->setHasExplicitlyInheritedProperties();
-
-    if (id == CSSPropertyVariable) {
-        ASSERT_WITH_SECURITY_IMPLICATION(value->isVariableValue());
-        CSSVariableValue* variable = toCSSVariableValue(value);
-        ASSERT(!variable->name().isEmpty());
-        ASSERT(!variable->value().isEmpty());
-        state.style()->setVariable(variable->name(), variable->value());
-        return;
-    }
-
-    if (StyleBuilder::applyProperty(id, this, state, value, isInitial, isInherit))
-        return;
-
-    // Fall back to the old switch statement, which is now in StyleBuilderCustom.cpp
-    StyleBuilder::oldApplyProperty(id, this, state, value, isInitial, isInherit);
-}
-
 void StyleResolver::addViewportDependentMediaQueryResult(const MediaQueryExp* expr, bool result)
 {
     m_viewportDependentMediaQueryResults.append(adoptPtr(new MediaQueryResult(*expr, result)));
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h
index 3c5a8b3..ccb9540 100644
--- a/Source/core/css/resolver/StyleResolver.h
+++ b/Source/core/css/resolver/StyleResolver.h
@@ -22,6 +22,7 @@
 #ifndef StyleResolver_h
 #define StyleResolver_h
 
+#include "core/animation/KeyframeAnimationEffect.h"
 #include "core/css/DocumentRuleSets.h"
 #include "core/css/InspectorCSSOMWrappers.h"
 #include "core/css/PseudoStyleRequest.h"
@@ -42,6 +43,7 @@
 
 namespace WebCore {
 
+class CSSAnimationUpdate;
 class CSSFontSelector;
 class CSSRuleList;
 class CSSSelector;
@@ -185,7 +187,15 @@
     PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0, StyleSharingBehavior = AllowStyleSharing,
         RuleMatchingBehavior = MatchAllRules, RenderRegion* regionForStyling = 0);
 
+    // FIXME: The following logic related to animations and keyframes should be factored out of StyleResolver
+    // The body of calculateCSSAnimationUpdate can move to CSSAnimations.cpp and take just const element, const style,
+    // and const ScopedStyleTree
+    PassOwnPtr<CSSAnimationUpdate> calculateCSSAnimationUpdate(StyleResolverState&);
+    void resolveKeyframes(Element*, const RenderStyle*, const StringImpl* animationName, KeyframeAnimationEffect::KeyframeVector&);
+    const StylePropertySet* firstKeyframeStyles(const Element*, const StringImpl* animationName);
     void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList&);
+    const StyleRuleKeyframes* matchScopedKeyframesRule(const Element*, const StringImpl* animationName);
+    PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*);
 
     PassRefPtr<RenderStyle> pseudoStyleForElement(Element*, const PseudoStyleRequest&, RenderStyle* parentStyle);
 
@@ -222,9 +232,6 @@
     // FIXME: Used by SharingStyleFinder, but should be removed.
     bool styleSharingCandidateMatchesRuleSet(const ElementResolveContext&, RenderStyle*, RuleSet*);
 
-    const StyleRuleKeyframes* matchScopedKeyframesRule(Element*, const StringImpl* animationName);
-    PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
-
     // These methods will give back the set of rules that matched for a given element (or a pseudo-element).
     enum CSSRuleFilter {
         UAAndUserCSSRules   = 1 << 1,
@@ -303,8 +310,7 @@
     template <StyleApplicationPass pass>
     void applyProperties(StyleResolverState&, const StylePropertySet* properties, StyleRule*, bool isImportant, bool inheritedOnly, PropertyWhitelistType = PropertyWhitelistNone);
     template <StyleApplicationPass pass>
-    void applyAnimatedProperties(StyleResolverState&, const Element*, const DocumentTimeline*);
-    void resolveVariables(StyleResolverState&, CSSPropertyID, CSSValue*, Vector<std::pair<CSSPropertyID, String> >& knownExpressions);
+    void applyAnimatedProperties(StyleResolverState&, const Element*, const DocumentTimeline*, const CSSAnimationUpdate*);
     void matchPageRules(MatchResult&, RuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName);
     void matchPageRulesForList(Vector<StyleRulePage*>& matchedRules, const Vector<StyleRulePage*>&, bool isLeftPage, bool isFirstPage, const String& pageName);
     void collectViewportRules();
@@ -325,8 +331,6 @@
 
     void cacheBorderAndBackground();
 
-    void applyProperty(StyleResolverState&, CSSPropertyID, CSSValue*);
-
     MatchedPropertiesCache m_matchedPropertiesCache;
 
     OwnPtr<MediaQueryEvaluator> m_medium;
@@ -344,6 +348,8 @@
 
     ScopedStyleTree m_styleTree;
 
+    // FIXME: The entire logic of collecting features on StyleResolver, as well astransferring them
+    // between various parts of machinery smells wrong. This needs to be better somehow.
     RuleFeatureSet m_features;
     OwnPtr<RuleSet> m_siblingRuleSet;
     OwnPtr<RuleSet> m_uncommonAttributeRuleSet;
@@ -355,9 +361,6 @@
 #ifdef STYLE_STATS
     static StyleSharingStats m_styleSharingStats;
 #endif
-
-    friend void StyleBuilder::oldApplyProperty(CSSPropertyID, StyleResolver*, StyleResolverState&, CSSValue*, bool isInitial, bool isInherit);
-
 };
 
 inline bool checkRegionSelector(const CSSSelector* regionSelector, Element* regionElement)
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index 319b5ef..059d57d 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -29,18 +29,20 @@
 
 namespace WebCore {
 
-StyleResolverState::StyleResolverState(const Document* newDocument, Element* newElement, RenderStyle* parentStyle, RenderRegion* regionForStyling)
+StyleResolverState::StyleResolverState(Document* document, Element* element, RenderStyle* parentStyle, RenderRegion* regionForStyling)
     : m_regionForStyling(0)
     , m_applyPropertyToRegularStyle(true)
     , m_applyPropertyToVisitedLinkStyle(false)
     , m_lineHeightValue(0)
     , m_styleMap(*this, m_elementStyleResources)
 {
-    ASSERT(!element() || document() == newDocument);
-    if (newElement)
-        m_elementContext = ElementResolveContext(newElement);
-    else
+    if (element) {
+        m_elementContext = ElementResolveContext(element);
+        m_document = m_elementContext.document();
+    } else {
         m_elementContext = ElementResolveContext();
+        m_document = document;
+    }
 
     m_regionForStyling = regionForStyling;
 
@@ -60,7 +62,7 @@
     // FIXME: StyleResolverState is never passed between documents
     // so we should be able to do this initialization at StyleResolverState
     // createion time instead of now, correct?
-    if (Page* page = newDocument->page())
+    if (Page* page = document->page())
         m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor());
 }
 
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 5747efb..f414c21 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -42,11 +42,13 @@
 class StyleResolverState {
 WTF_MAKE_NONCOPYABLE(StyleResolverState);
 public:
-    StyleResolverState(const Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
+    StyleResolverState(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
     ~StyleResolverState();
 
+    // In FontLoader and CanvasRenderingContext2D, we don't have an element to grab the document from.
+    // This is why we have to store the document separately.
+    Document* document() const { return m_document; }
     // These are all just pass-through methods to ElementResolveContext.
-    Document* document() const { return m_elementContext.document(); }
     Element* element() const { return m_elementContext.element(); }
     const ContainerNode* parentNode() const { return m_elementContext.parentNode(); }
     const RenderStyle* rootElementStyle() const { return m_elementContext.rootElementStyle(); }
@@ -76,6 +78,9 @@
     bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularStyle; }
     bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisitedLinkStyle; }
 
+    // Holds all attribute names found while applying "content" properties that contain an "attr()" value.
+    Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; }
+
     void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; }
     CSSValue* lineHeightValue() { return m_lineHeightValue; }
 
@@ -121,6 +126,7 @@
 
     void initElement(Element*);
 
+    Document* m_document;
     ElementResolveContext m_elementContext;
 
     // m_style is the primary output for each element's style resolve.
@@ -148,6 +154,7 @@
     // CSSToStyleMap is a pure-logic class and only contains
     // a back-pointer to this object.
     CSSToStyleMap m_styleMap;
+    Vector<AtomicString> m_contentAttrValues;
 };
 
 } // namespace WebCore
diff --git a/Source/core/css/view-source.css b/Source/core/css/view-source.css
index 591a23b..c7ccee4 100644
--- a/Source/core/css/view-source.css
+++ b/Source/core/css/view-source.css
@@ -29,7 +29,6 @@
 table {
     width: 100%;
     border-spacing: 0;
-    counter-reset: lines;
     white-space: pre-wrap !important;
     margin: 0;
     word-break: break-word;
@@ -67,13 +66,8 @@
     word-break: normal;
     white-space: nowrap;
     font-size: 9px;
-    font-family: Helvetica
-}
-
-.webkit-line-number::before {
-    content: counter(lines);
-    counter-increment: lines;
-    -webkit-user-select: none
+    font-family: Helvetica;
+    -webkit-user-select: none;
 }
 
 tbody:last-child .webkit-line-content:empty:before {
diff --git a/Source/core/debugger_script_source.target.darwin-arm.mk b/Source/core/debugger_script_source.target.darwin-arm.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.darwin-arm.mk
+++ b/Source/core/debugger_script_source.target.darwin-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/debugger_script_source.target.darwin-mips.mk b/Source/core/debugger_script_source.target.darwin-mips.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.darwin-mips.mk
+++ b/Source/core/debugger_script_source.target.darwin-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/debugger_script_source.target.darwin-x86.mk b/Source/core/debugger_script_source.target.darwin-x86.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.darwin-x86.mk
+++ b/Source/core/debugger_script_source.target.darwin-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/debugger_script_source.target.linux-arm.mk b/Source/core/debugger_script_source.target.linux-arm.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.linux-arm.mk
+++ b/Source/core/debugger_script_source.target.linux-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/debugger_script_source.target.linux-mips.mk b/Source/core/debugger_script_source.target.linux-mips.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.linux-mips.mk
+++ b/Source/core/debugger_script_source.target.linux-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/debugger_script_source.target.linux-x86.mk b/Source/core/debugger_script_source.target.linux-x86.mk
index 9bad2cd..8ae067d 100644
--- a/Source/core/debugger_script_source.target.linux-x86.mk
+++ b/Source/core/debugger_script_source.target.linux-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/DebuggerScript.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h from ../bindings/v8/DebuggerScript.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl DebuggerScriptSource_js ../bindings/v8/DebuggerScript.js "$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/DebuggerScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/DebuggerScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/dom/CharacterData.cpp b/Source/core/dom/CharacterData.cpp
index bc86e80..eb8a383 100644
--- a/Source/core/dom/CharacterData.cpp
+++ b/Source/core/dom/CharacterData.cpp
@@ -58,9 +58,10 @@
 
 String CharacterData::substringData(unsigned offset, unsigned count, ExceptionCode& ec)
 {
-    checkCharDataOperation(offset, ec);
-    if (ec)
+    if (offset > length()) {
+        ec = IndexSizeError;
         return String();
+    }
 
     return m_data.substring(offset, count);
 }
@@ -98,8 +99,7 @@
         toText(this)->updateTextRenderer(oldLength, 0);
 
     document()->incDOMTreeVersion();
-    // We don't call dispatchModifiedEvent here because we don't want the
-    // parser to dispatch DOM mutation events.
+
     if (parentNode())
         parentNode()->childrenChanged();
 
@@ -118,9 +118,10 @@
 
 void CharacterData::insertData(unsigned offset, const String& data, ExceptionCode& ec)
 {
-    checkCharDataOperation(offset, ec);
-    if (ec)
+    if (offset > length()) {
+        ec = IndexSizeError;
         return;
+    }
 
     String newStr = m_data;
     newStr.insert(data, offset);
@@ -132,9 +133,10 @@
 
 void CharacterData::deleteData(unsigned offset, unsigned count, ExceptionCode& ec)
 {
-    checkCharDataOperation(offset, ec);
-    if (ec)
+    if (offset > length()) {
+        ec = IndexSizeError;
         return;
+    }
 
     unsigned realCount;
     if (offset + count > length())
@@ -152,9 +154,10 @@
 
 void CharacterData::replaceData(unsigned offset, unsigned count, const String& data, ExceptionCode& ec)
 {
-    checkCharDataOperation(offset, ec);
-    if (ec)
+    if (offset > length()) {
+        ec = IndexSizeError;
         return;
+    }
 
     unsigned realCount;
     if (offset + count > length())
@@ -212,28 +215,12 @@
     if (parentNode())
         parentNode()->childrenChanged();
 
-    if (!isInShadowTree())
-        dispatchModifiedEvent(oldData);
-    InspectorInstrumentation::characterDataModified(document(), this);
-}
-
-void CharacterData::dispatchModifiedEvent(const String& oldData)
-{
-    if (document()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
-        dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
-    dispatchSubtreeModifiedEvent();
-}
-
-void CharacterData::checkCharDataOperation(unsigned offset, ExceptionCode& ec)
-{
-    ec = 0;
-
-    // IndexSizeError: Raised if the specified offset is negative or greater than the number of 16-bit
-    // units in data.
-    if (offset > length()) {
-        ec = IndexSizeError;
-        return;
+    if (!isInShadowTree()) {
+        if (document()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
+            dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
+        dispatchSubtreeModifiedEvent();
     }
+    InspectorInstrumentation::characterDataModified(document(), this);
 }
 
 int CharacterData::maxCharacterOffset() const
diff --git a/Source/core/dom/CharacterData.h b/Source/core/dom/CharacterData.h
index 07b08fa..6dc7e68 100644
--- a/Source/core/dom/CharacterData.h
+++ b/Source/core/dom/CharacterData.h
@@ -71,8 +71,6 @@
     virtual int maxCharacterOffset() const OVERRIDE FINAL;
     virtual bool offsetInCharacters() const OVERRIDE FINAL;
     void setDataAndUpdate(const String&, unsigned offsetOfReplacedData, unsigned oldLength, unsigned newLength);
-    void checkCharDataOperation(unsigned offset, ExceptionCode&);
-    void dispatchModifiedEvent(const String& oldValue);
 
     String m_data;
 };
diff --git a/Source/core/dom/CharacterData.idl b/Source/core/dom/CharacterData.idl
index eb6bfe7..0999ab7 100644
--- a/Source/core/dom/CharacterData.idl
+++ b/Source/core/dom/CharacterData.idl
@@ -23,19 +23,12 @@
 
     readonly attribute unsigned long length;
 
-    [TreatReturnedNullStringAs=Null, RaisesException] DOMString substringData([IsIndex,Default=Undefined] optional unsigned long offset, [IsIndex,Default=Undefined] optional unsigned long length);
+    [TreatReturnedNullStringAs=Null, RaisesException] DOMString substringData([Default=Undefined] optional unsigned long offset, [IsIndex,Default=Undefined] optional unsigned long length);
 
-    void appendData([Default=Undefined] optional DOMString data);
-
-     [RaisesException] void insertData([IsIndex,Default=Undefined] optional unsigned long offset,
-                                   [Default=Undefined] optional DOMString data);
-
-     [RaisesException] void deleteData([IsIndex,Default=Undefined] optional unsigned long offset,
-                                   [IsIndex,Default=Undefined] optional unsigned long length);
-
-     [RaisesException] void replaceData([IsIndex,Default=Undefined] optional unsigned long offset,
-                                    [IsIndex,Default=Undefined] optional unsigned long length,
-                                    [Default=Undefined] optional DOMString data);
+    void appendData(DOMString data);
+    [RaisesException] void insertData(unsigned long offset, DOMString data);
+    [RaisesException] void deleteData(unsigned long offset, unsigned long length);
+    [RaisesException] void replaceData(unsigned long offset, unsigned long length, DOMString data);
 };
 
 CharacterData implements ChildNode;
diff --git a/Source/core/dom/Comment.cpp b/Source/core/dom/Comment.cpp
index eb525bd..5b8374f 100644
--- a/Source/core/dom/Comment.cpp
+++ b/Source/core/dom/Comment.cpp
@@ -37,11 +37,6 @@
     return adoptRef(new Comment(document, text));
 }
 
-PassRefPtr<Comment> Comment::create(ScriptExecutionContext* context, const String& text)
-{
-    return adoptRef(new Comment(toDocument(context), text));
-}
-
 String Comment::nodeName() const
 {
     return commentAtom.string();
diff --git a/Source/core/dom/Comment.h b/Source/core/dom/Comment.h
index 6d4b768..affc488 100644
--- a/Source/core/dom/Comment.h
+++ b/Source/core/dom/Comment.h
@@ -32,7 +32,6 @@
 class Comment FINAL : public CharacterData {
 public:
     static PassRefPtr<Comment> create(Document*, const String&);
-    static PassRefPtr<Comment> create(ScriptExecutionContext*, const String&);
 
 private:
     Comment(Document*, const String&);
diff --git a/Source/core/dom/Comment.idl b/Source/core/dom/Comment.idl
index d928c6e..0503d63 100644
--- a/Source/core/dom/Comment.idl
+++ b/Source/core/dom/Comment.idl
@@ -19,7 +19,7 @@
 
 [
     Constructor([Default=NullString] optional DOMString data),
-    ConstructorCallWith=ScriptExecutionContext
+    ConstructorCallWith=Document
 ] interface Comment : CharacterData {
 };
 
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 0738935..e8aceb8 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -27,7 +27,7 @@
 #include "core/dom/ContainerNodeAlgorithms.h"
 #include "core/dom/EventNames.h"
 #include "core/dom/ExceptionCode.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/MutationEvent.h"
 #include "core/dom/NodeRareData.h"
 #include "core/dom/NodeRenderStyle.h"
@@ -468,7 +468,7 @@
 
     document()->removeFocusedElementOfSubtree(child.get());
 
-    if (FullscreenController* fullscreen = FullscreenController::fromIfExists(document()))
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document()))
         fullscreen->removeFullScreenElementOfSubtree(child.get());
 
     // Events fired when blurring currently focused node might have moved this
@@ -555,7 +555,7 @@
     // The container node can be removed from event handlers.
     RefPtr<ContainerNode> protect(this);
 
-    if (FullscreenController* fullscreen = FullscreenController::fromIfExists(document()))
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document()))
         fullscreen->removeFullScreenElementOfSubtree(this, true);
 
     // Do any prep work needed before actually starting to detach
diff --git a/Source/core/dom/ContextFeatures.cpp b/Source/core/dom/ContextFeatures.cpp
index fa374bd..47af9c0 100644
--- a/Source/core/dom/ContextFeatures.cpp
+++ b/Source/core/dom/ContextFeatures.cpp
@@ -71,18 +71,6 @@
     return document->contextFeatures()->isEnabled(document, PagePopup, false);
 }
 
-bool ContextFeatures::htmlNotificationsEnabled(Document* document)
-{
-#if ENABLE(LEGACY_NOTIFICATIONS)
-    if (!document)
-        return false;
-    return document->contextFeatures()->isEnabled(document, HTMLNotifications, false);
-#else
-    UNUSED_PARAM(document);
-    return false;
-#endif
-}
-
 bool ContextFeatures::mutationEventsEnabled(Document* document)
 {
     ASSERT(document);
diff --git a/Source/core/dom/ContextFeatures.h b/Source/core/dom/ContextFeatures.h
index b46b85e..231ee04 100644
--- a/Source/core/dom/ContextFeatures.h
+++ b/Source/core/dom/ContextFeatures.h
@@ -41,7 +41,6 @@
         DialogElement = 0,
         StyleScoped,
         PagePopup,
-        HTMLNotifications,
         MutationEvents,
         PushState,
         FeatureTypeSize // Should be the last entry.
@@ -54,7 +53,6 @@
     static bool dialogElementEnabled(Document*);
     static bool styleScopedEnabled(Document*);
     static bool pagePopupEnabled(Document*);
-    static bool htmlNotificationsEnabled(Document*);
     static bool mutationEventsEnabled(Document*);
     static bool pushStateEnabled(Document*);
 
diff --git a/Source/core/dom/CustomElementRegistrationContext.cpp b/Source/core/dom/CustomElementRegistrationContext.cpp
index 4e8129d..d37ba1e 100644
--- a/Source/core/dom/CustomElementRegistrationContext.cpp
+++ b/Source/core/dom/CustomElementRegistrationContext.cpp
@@ -39,7 +39,7 @@
 #include "core/dom/Element.h"
 #include "core/html/HTMLElement.h"
 #include "core/html/HTMLUnknownElement.h"
-#include "core/svg/SVGElement.h"
+#include "core/svg/SVGUnknownElement.h"
 #include "wtf/RefPtr.h"
 
 namespace WebCore {
@@ -69,7 +69,7 @@
     if (HTMLNames::xhtmlNamespaceURI == tagName.namespaceURI()) {
         element = HTMLElement::create(tagName, document);
     } else if (SVGNames::svgNamespaceURI == tagName.namespaceURI()) {
-        element = SVGElement::create(tagName, document);
+        element = SVGUnknownElement::create(tagName, document);
     } else {
         // XML elements are not custom elements, so return early.
         return Element::create(tagName, document);
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b3fc7f1..ad152ed 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -153,7 +153,6 @@
 #include "core/platform/text/SegmentedString.h"
 #include "core/rendering/HitTestRequest.h"
 #include "core/rendering/HitTestResult.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderView.h"
 #include "core/rendering/RenderWidget.h"
 #include "core/rendering/TextAutosizer.h"
@@ -355,8 +354,10 @@
         Element* element = document->focusedElement();
         if (!element)
             return;
-        if (document->childNeedsStyleRecalc())
+        if (document->childNeedsStyleRecalc()) {
+            document->setNeedsFocusedElementCheck();
             return;
+        }
         if (element->renderer() && element->renderer()->needsLayout())
             return;
         if (!element->isFocusable())
@@ -425,7 +426,7 @@
     , m_eventQueue(DocumentEventQueue::create(this))
     , m_weakFactory(this)
     , m_idAttributeName(idAttr)
-    , m_hasFullscreenController(false)
+    , m_hasFullscreenElementStack(false)
     , m_loadEventDelayCount(0)
     , m_loadEventDelayTimer(this, &Document::loadEventDelayTimerFired)
     , m_referrerPolicy(ReferrerPolicyDefault)
@@ -503,7 +504,6 @@
 {
     ASSERT(!renderer());
     ASSERT(m_ranges.isEmpty());
-    ASSERT(!m_styleRecalcTimer.isActive());
     ASSERT(!m_parentTreeScope);
     ASSERT(!hasGuardRefCount());
 
@@ -528,8 +528,6 @@
     ASSERT(!m_parser || m_parser->refCount() == 1);
     detachParser();
 
-    m_renderArena.clear();
-
     if (this == topDocument())
         clearAXObjectCache();
 
@@ -779,7 +777,7 @@
 
 bool Document::haveImportsLoaded() const
 {
-    return !m_import || m_import->haveChildrenLoaded();
+    return !m_import || !m_import->isBlocked();
 }
 
 PassRefPtr<DocumentFragment> Document::createDocumentFragment()
@@ -1219,11 +1217,11 @@
     RenderObject* renderer = node->renderer();
     if (!renderer)
         return 0;
-    VisiblePosition visiblePosition = renderer->positionForPoint(localPoint);
-    if (visiblePosition.isNull())
+    PositionWithAffinity positionWithAffinity = renderer->positionForPoint(localPoint);
+    if (positionWithAffinity.position().isNull())
         return 0;
 
-    Position rangeCompliantPosition = visiblePosition.deepEquivalent().parentAnchoredEquivalent();
+    Position rangeCompliantPosition = positionWithAffinity.position().parentAnchoredEquivalent();
     return Range::create(this, rangeCompliantPosition, rangeCompliantPosition);
 }
 
@@ -1539,7 +1537,7 @@
     if (m_styleRecalcTimer.isActive())
         return;
 
-    ASSERT(needsStyleRecalc() || childNeedsStyleRecalc());
+    ASSERT(needsStyleRecalc() || childNeedsStyleRecalc() || childNeedsDistributionRecalc());
 
     m_styleRecalcTimer.startOneShot(0);
 
@@ -1567,6 +1565,29 @@
     updateStyleIfNeeded();
 }
 
+void Document::updateDistributionIfNeeded()
+{
+    if (!childNeedsDistributionRecalc())
+        return;
+    TRACE_EVENT0("webkit", "Document::recalcDistribution");
+    recalcDistribution();
+}
+
+void Document::updateDistributionForNodeIfNeeded(Node* node)
+{
+    if (node->inDocument()) {
+        updateDistributionIfNeeded();
+        return;
+    }
+    Node* root = node;
+    while (Node* host = root->shadowHost())
+        root = host;
+    while (Node* ancestor = root->parentOrShadowHostNode())
+        root = ancestor;
+    if (root->childNeedsDistributionRecalc())
+        root->recalcDistribution();
+}
+
 void Document::recalcStyle(StyleChange change)
 {
     // we should not enter style recalc while painting
@@ -1580,6 +1601,8 @@
     TRACE_EVENT0("webkit", "Document::recalcStyle");
     TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "RecalcStyle");
 
+    updateDistributionIfNeeded();
+
     // FIXME: We should update style on our ancestor chain before proceeding (especially for seamless),
     // however doing so currently causes several tests to crash, as Frame::setDocument calls Document::attach
     // before setting the DOMWindow on the Frame, or the SecurityOrigin on the document. The attach, in turn
@@ -1606,8 +1629,7 @@
             frameView->beginDeferredRepaints();
         }
 
-        ASSERT(!renderer() || renderArena());
-        if (!renderer() || !renderArena())
+        if (!renderer())
             goto bailOut;
 
         if (styleChangeType() == SubtreeStyleChange)
@@ -1680,7 +1702,7 @@
     ASSERT(isMainThread());
     ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting()));
 
-    if (!needsStyleRecalc() && !childNeedsStyleRecalc())
+    if (!needsStyleRecalc() && !childNeedsStyleRecalc() && !childNeedsDistributionRecalc())
         return;
 
     AnimationUpdateBlock animationUpdateBlock(m_frame ? m_frame->animation() : 0);
@@ -1721,11 +1743,16 @@
     if (frameView && renderer() && (frameView->layoutPending() || renderer()->needsLayout()))
         frameView->layout();
 
+    setNeedsFocusedElementCheck();
+}
+
+void Document::setNeedsFocusedElementCheck()
+{
     // FIXME: Using a Task doesn't look a good idea.
-    if (m_focusedElement && !m_didPostCheckFocusedElementTask) {
-        postTask(CheckFocusedElementTask::create());
-        m_didPostCheckFocusedElementTask = true;
-    }
+    if (!m_focusedElement || m_didPostCheckFocusedElementTask)
+        return;
+    postTask(CheckFocusedElementTask::create());
+    m_didPostCheckFocusedElementTask = true;
 }
 
 // FIXME: This is a bad idea and needs to be removed eventually.
@@ -1847,11 +1874,8 @@
     ASSERT(!attached());
     ASSERT(!m_axObjectCache || this != topDocument());
 
-    if (!m_renderArena)
-        m_renderArena = RenderArena::create();
-
     // Create the rendering tree
-    setRenderer(new (m_renderArena.get()) RenderView(this));
+    setRenderer(new RenderView(this));
     renderView()->setIsInWindow(true);
 
     recalcStyle(Force);
@@ -1918,7 +1942,6 @@
     // or this setting of the frame to 0 could be made explicit in each of the
     // callers of Document::detach().
     m_frame = 0;
-    m_renderArena.clear();
 
     if (m_mediaQueryMatcher)
         m_mediaQueryMatcher->documentDestroyed();
@@ -4062,12 +4085,12 @@
 
 PassRefPtr<HTMLCollection> Document::windowNamedItems(const AtomicString& name)
 {
-    return ensureRareData()->ensureNodeLists()->addCacheWithAtomicName<HTMLNameCollection>(this, WindowNamedItems, name);
+    return ensureRareData()->ensureNodeLists()->addCacheWithAtomicName<WindowNameCollection>(this, WindowNamedItems, name);
 }
 
 PassRefPtr<HTMLCollection> Document::documentNamedItems(const AtomicString& name)
 {
-    return ensureRareData()->ensureNodeLists()->addCacheWithAtomicName<HTMLNameCollection>(this, DocumentNamedItems, name);
+    return ensureRareData()->ensureNodeLists()->addCacheWithAtomicName<DocumentNameCollection>(this, DocumentNamedItems, name);
 }
 
 void Document::finishedParsing()
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 6b2653e..f9eb213 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -130,7 +130,6 @@
 class ProcessingInstruction;
 class Range;
 class RegisteredEventListener;
-class RenderArena;
 class RenderView;
 class RequestAnimationFrameCallback;
 class SVGDocumentExtensions;
@@ -490,6 +489,8 @@
     PassRefPtr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element*);
     PassRefPtr<RenderStyle> styleForPage(int pageIndex);
 
+    void updateDistributionForNodeIfNeeded(Node*);
+
     // Returns true if page box (margin boxes and page borders) is visible.
     bool isPageBoxVisible(int pageIndex);
 
@@ -509,8 +510,6 @@
     virtual void suspendActiveDOMObjects(ActiveDOMObject::ReasonForSuspension) OVERRIDE;
     virtual void resumeActiveDOMObjects() OVERRIDE;
 
-    RenderArena* renderArena() { return m_renderArena.get(); }
-
     // Implemented in RenderView.h to avoid a cyclic header dependency this just
     // returns renderer so callers can avoid verbose casts.
     RenderView* renderView() const;
@@ -632,6 +631,7 @@
     Element* focusedElement() const { return m_focusedElement.get(); }
     UserActionElementSet& userActionElements()  { return m_userActionElements; }
     const UserActionElementSet& userActionElements() const { return m_userActionElements; }
+    void setNeedsFocusedElementCheck();
     void didRunCheckFocusedElementTask() { m_didPostCheckFocusedElementTask = false; }
 
     // The m_ignoreAutofocus flag specifies whether or not the document has been changed by the user enough
@@ -927,8 +927,8 @@
 
     const QualifiedName& idAttributeName() const { return m_idAttributeName; }
 
-    bool hasFullscreenController() const { return m_hasFullscreenController; }
-    void setHasFullscreenController() { m_hasFullscreenController = true; }
+    bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack; }
+    void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; }
 
     void webkitExitPointerLock();
     Element* webkitPointerLockElement() const;
@@ -1013,7 +1013,7 @@
     // Return a Locale for the default locale if the argument is null or empty.
     Locale& getCachedLocale(const AtomicString& locale = nullAtom);
 
-    DocumentTimeline* timeline() { return m_timeline.get(); }
+    DocumentTimeline* timeline() const { return m_timeline.get(); }
 
     void addToTopLayer(Element*, const Element* before = 0);
     void removeFromTopLayer(Element*);
@@ -1045,6 +1045,8 @@
     friend class Node;
     friend class IgnoreDestructiveWriteCountIncrementer;
 
+    void updateDistributionIfNeeded();
+
     void detachParser();
 
     typedef void (*ArgumentsCallback)(const String& keyString, const String& valueString, Document*, void* data);
@@ -1216,8 +1218,6 @@
     bool m_titleSetExplicitly;
     RefPtr<Element> m_titleElement;
 
-    RefPtr<RenderArena> m_renderArena;
-
     OwnPtr<AXObjectCache> m_axObjectCache;
     OwnPtr<DocumentMarkerController> m_markers;
 
@@ -1284,7 +1284,7 @@
 
     QualifiedName m_idAttributeName;
 
-    bool m_hasFullscreenController; // For early return in FullscreenController::fromIfExists()
+    bool m_hasFullscreenElementStack; // For early return in FullscreenElementStack::fromIfExists()
 
     Vector<RefPtr<Element> > m_topLayerElements;
 
diff --git a/Source/core/dom/DocumentFragment.cpp b/Source/core/dom/DocumentFragment.cpp
index cf3e7ad..6f052be 100644
--- a/Source/core/dom/DocumentFragment.cpp
+++ b/Source/core/dom/DocumentFragment.cpp
@@ -41,11 +41,6 @@
     return adoptRef(new DocumentFragment(document, Node::CreateDocumentFragment));
 }
 
-PassRefPtr<DocumentFragment> DocumentFragment::create(ScriptExecutionContext* context)
-{
-    return adoptRef(new DocumentFragment(toDocument(context), Node::CreateDocumentFragment));
-}
-
 String DocumentFragment::nodeName() const
 {
     return "#document-fragment";
diff --git a/Source/core/dom/DocumentFragment.h b/Source/core/dom/DocumentFragment.h
index 0489d39..82e7f6e 100644
--- a/Source/core/dom/DocumentFragment.h
+++ b/Source/core/dom/DocumentFragment.h
@@ -34,7 +34,6 @@
 class DocumentFragment : public ContainerNode {
 public:
     static PassRefPtr<DocumentFragment> create(Document*);
-    static PassRefPtr<DocumentFragment> create(ScriptExecutionContext*);
 
     void parseHTML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
     bool parseXML(const String&, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
diff --git a/Source/core/dom/DocumentFragment.idl b/Source/core/dom/DocumentFragment.idl
index 076c949..942f021 100644
--- a/Source/core/dom/DocumentFragment.idl
+++ b/Source/core/dom/DocumentFragment.idl
@@ -19,7 +19,7 @@
 
 [
     Constructor,
-    ConstructorCallWith=ScriptExecutionContext
+    ConstructorCallWith=Document
 ] interface DocumentFragment : Node {
     // NodeSelector - Selector API
     [RaisesException] Element querySelector(DOMString selectors);
diff --git a/Source/core/dom/DocumentFullscreen.cpp b/Source/core/dom/DocumentFullscreen.cpp
index 17bc1ee..407e55d 100644
--- a/Source/core/dom/DocumentFullscreen.cpp
+++ b/Source/core/dom/DocumentFullscreen.cpp
@@ -26,51 +26,51 @@
 #include "config.h"
 #include "core/dom/DocumentFullscreen.h"
 
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 
 namespace WebCore {
 
 bool DocumentFullscreen::webkitIsFullScreen(Document* document)
 {
-    if (FullscreenController* controller = FullscreenController::fromIfExists(document))
-        return controller->webkitIsFullScreen();
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document))
+        return fullscreen->webkitIsFullScreen();
     return false;
 }
 
 bool DocumentFullscreen::webkitFullScreenKeyboardInputAllowed(Document* document)
 {
-    if (FullscreenController* controller = FullscreenController::fromIfExists(document))
-        return controller->webkitFullScreenKeyboardInputAllowed();
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document))
+        return fullscreen->webkitFullScreenKeyboardInputAllowed();
     return false;
 }
 
 Element* DocumentFullscreen::webkitCurrentFullScreenElement(Document* document)
 {
-    if (FullscreenController* controller = FullscreenController::fromIfExists(document))
-        return controller->webkitCurrentFullScreenElement();
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document))
+        return fullscreen->webkitCurrentFullScreenElement();
     return 0;
 }
 
 void DocumentFullscreen::webkitCancelFullScreen(Document* document)
 {
-    FullscreenController::from(document)->webkitCancelFullScreen();
+    FullscreenElementStack::from(document)->webkitCancelFullScreen();
 }
 
 bool DocumentFullscreen::webkitFullscreenEnabled(Document* document)
 {
-    return FullscreenController::webkitFullscreenEnabled(document);
+    return FullscreenElementStack::webkitFullscreenEnabled(document);
 }
 
 Element* DocumentFullscreen::webkitFullscreenElement(Document* document)
 {
-    if (FullscreenController* controller = FullscreenController::fromIfExists(document))
-        return controller->webkitFullscreenElement();
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document))
+        return fullscreen->webkitFullscreenElement();
     return 0;
 }
 
 void DocumentFullscreen::webkitExitFullscreen(Document* document)
 {
-    FullscreenController::from(document)->webkitExitFullscreen();
+    FullscreenElementStack::from(document)->webkitExitFullscreen();
 }
 
 } // namespace WebCore
diff --git a/Source/core/dom/DocumentInit.cpp b/Source/core/dom/DocumentInit.cpp
index f6d74b2..8c508d4 100644
--- a/Source/core/dom/DocumentInit.cpp
+++ b/Source/core/dom/DocumentInit.cpp
@@ -37,7 +37,8 @@
 
 bool DocumentInit::shouldSetURL() const
 {
-    return (m_frame && m_frame->ownerElement()) || !m_url.isEmpty();
+    Frame* frame = frameForSecurityContext();
+    return (frame && frame->ownerElement()) || !m_url.isEmpty();
 }
 
 bool DocumentInit::shouldTreatURLAsSrcdocDocument() const
diff --git a/Source/core/dom/DocumentOrderedMap.cpp b/Source/core/dom/DocumentOrderedMap.cpp
index 76f236a..c5df110 100644
--- a/Source/core/dom/DocumentOrderedMap.cpp
+++ b/Source/core/dom/DocumentOrderedMap.cpp
@@ -37,6 +37,7 @@
 #include "core/dom/TreeScope.h"
 #include "core/html/HTMLLabelElement.h"
 #include "core/html/HTMLMapElement.h"
+#include "core/html/HTMLNameCollection.h"
 
 namespace WebCore {
 
@@ -47,6 +48,11 @@
     return element->getIdAttribute().impl() == key;
 }
 
+inline bool keyMatchesName(StringImpl* key, Element* element)
+{
+    return element->getNameAttribute().impl() == key;
+}
+
 inline bool keyMatchesMapName(StringImpl* key, Element* element)
 {
     return element->hasTagName(mapTag) && toHTMLMapElement(element)->getName().impl() == key;
@@ -62,6 +68,16 @@
     return isHTMLLabelElement(element) && element->getAttribute(forAttr).impl() == key;
 }
 
+inline bool keyMatchesWindowNamedItem(StringImpl* key, Element* element)
+{
+    return WindowNameCollection::nodeMatches(element, key);
+}
+
+inline bool keyMatchesDocumentNamedItem(StringImpl* key, Element* element)
+{
+    return DocumentNameCollection::nodeMatches(element, key);
+}
+
 void DocumentOrderedMap::clear()
 {
     m_map.clear();
@@ -143,6 +159,11 @@
     return get<keyMatchesId>(key, scope);
 }
 
+Element* DocumentOrderedMap::getElementByName(StringImpl* key, const TreeScope* scope) const
+{
+    return get<keyMatchesName>(key, scope);
+}
+
 Element* DocumentOrderedMap::getElementByMapName(StringImpl* key, const TreeScope* scope) const
 {
     return get<keyMatchesMapName>(key, scope);
@@ -158,4 +179,14 @@
     return get<keyMatchesLabelForAttribute>(key, scope);
 }
 
+Element* DocumentOrderedMap::getElementByWindowNamedItem(StringImpl* key, const TreeScope* scope) const
+{
+    return get<keyMatchesWindowNamedItem>(key, scope);
+}
+
+Element* DocumentOrderedMap::getElementByDocumentNamedItem(StringImpl* key, const TreeScope* scope) const
+{
+    return get<keyMatchesDocumentNamedItem>(key, scope);
+}
+
 } // namespace WebCore
diff --git a/Source/core/dom/DocumentOrderedMap.h b/Source/core/dom/DocumentOrderedMap.h
index b6fc8e0..762da72 100644
--- a/Source/core/dom/DocumentOrderedMap.h
+++ b/Source/core/dom/DocumentOrderedMap.h
@@ -47,12 +47,15 @@
     void clear();
 
     bool contains(StringImpl*) const;
-    bool containsMultiple(StringImpl*) const;
+    bool mightContainMultiple(StringImpl*) const;
     // concrete instantiations of the get<>() method template
     Element* getElementById(StringImpl*, const TreeScope*) const;
+    Element* getElementByName(StringImpl*, const TreeScope*) const;
     Element* getElementByMapName(StringImpl*, const TreeScope*) const;
     Element* getElementByLowercasedMapName(StringImpl*, const TreeScope*) const;
     Element* getElementByLabelForAttribute(StringImpl*, const TreeScope*) const;
+    Element* getElementByWindowNamedItem(StringImpl*, const TreeScope*) const;
+    Element* getElementByDocumentNamedItem(StringImpl*, const TreeScope*) const;
 
     void checkConsistency() const;
 
@@ -73,9 +76,9 @@
     return m_map.contains(id) || m_duplicateCounts.contains(id);
 }
 
-inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const
+inline bool DocumentOrderedMap::mightContainMultiple(StringImpl* id) const
 {
-    return m_duplicateCounts.contains(id);
+    return (m_map.contains(id) ? 1 : 0) + m_duplicateCounts.count(id) > 1;
 }
 
 } // namespace WebCore
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 7f38197..c18dec2 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -53,7 +53,7 @@
 #include "core/dom/EventDispatcher.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/FocusEvent.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/MutationObserverInterestGroup.h"
 #include "core/dom/MutationRecord.h"
 #include "core/dom/NamedNodeMap.h"
@@ -75,6 +75,7 @@
 #include "core/html/HTMLFormControlsCollection.h"
 #include "core/html/HTMLFrameOwnerElement.h"
 #include "core/html/HTMLLabelElement.h"
+#include "core/html/HTMLNameCollection.h"
 #include "core/html/HTMLOptionsCollection.h"
 #include "core/html/HTMLTableRowsCollection.h"
 #include "core/html/parser/HTMLParserIdioms.h"
@@ -210,6 +211,11 @@
         data->setPseudoElement(AFTER, 0);
         data->setPseudoElement(BACKDROP, 0);
         data->clearShadow();
+
+        if (RuntimeEnabledFeatures::webAnimationsCSSEnabled()) {
+            if (ActiveAnimations* activeAnimations = data->activeAnimations())
+                activeAnimations->cssAnimations()->cancel();
+        }
     }
 
     if (isCustomElement())
@@ -899,7 +905,7 @@
 {
     if (ElementShadow* parentElementShadow = shadowOfParentForDistribution(this)) {
         if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow, name, newValue))
-            parentElementShadow->invalidateDistribution();
+            parentElementShadow->setNeedsDistributionRecalc();
     }
 
     parseAttribute(name, newValue);
@@ -1230,20 +1236,20 @@
     if (hasRareData())
         elementRareData()->clearClassListValueForQuirksMode();
 
+    if (isUpgradedCustomElement() && inDocument())
+        CustomElement::didEnterDocument(this, document());
+
     TreeScope* scope = insertionPoint->treeScope();
     if (scope != treeScope())
         return InsertionDone;
 
-    if (isUpgradedCustomElement())
-        CustomElement::didEnterDocument(this, document());
-
     const AtomicString& idValue = getIdAttribute();
     if (!idValue.isNull())
         updateId(scope, nullAtom, idValue);
 
     const AtomicString& nameValue = getNameAttribute();
     if (!nameValue.isNull())
-        updateName(nullAtom, nameValue);
+        updateName(scope, nullAtom, nameValue);
 
     if (hasTagName(labelTag)) {
         if (scope->shouldCacheLabelsByForAttribute())
@@ -1255,7 +1261,7 @@
 
 void Element::removedFrom(ContainerNode* insertionPoint)
 {
-    bool wasInDocument = insertionPoint->document();
+    bool wasInDocument = insertionPoint->inDocument();
 
     if (Element* before = pseudoElement(BEFORE))
         before->removedFrom(insertionPoint);
@@ -1282,7 +1288,7 @@
 
         const AtomicString& nameValue = getNameAttribute();
         if (!nameValue.isNull())
-            updateName(nameValue, nullAtom);
+            updateName(insertionPoint->treeScope(), nameValue, nullAtom);
 
         if (hasTagName(labelTag)) {
             TreeScope* treeScope = insertionPoint->treeScope();
@@ -1367,6 +1373,11 @@
         data->resetComputedStyle();
         data->resetDynamicRestyleObservations();
         data->setIsInsideRegion(false);
+
+        if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && !context.performingReattach) {
+            if (ActiveAnimations* activeAnimations = data->activeAnimations())
+                activeAnimations->cssAnimations()->cancel();
+        }
     }
     if (ElementShadow* shadow = this->shadow())
         shadow->detach(context);
@@ -1474,9 +1485,9 @@
         InspectorInstrumentation::didRecalculateStyleForElement(this);
 
         if (RenderObject* renderer = this->renderer()) {
-            if (localChange != NoChange || pseudoStyleCacheIsInvalid(currentStyle.get(), newStyle.get()) || (change == Force && renderer->requiresForcedStyleRecalcPropagation()) || shouldNotifyRendererWithIdenticalStyles())
+            if (localChange != NoChange || pseudoStyleCacheIsInvalid(currentStyle.get(), newStyle.get()) || (change == Force && renderer->requiresForcedStyleRecalcPropagation()) || shouldNotifyRendererWithIdenticalStyles()) {
                 renderer->setAnimatableStyle(newStyle.get());
-            else if (needsStyleRecalc()) {
+            } else if (needsStyleRecalc()) {
                 // Although no change occurred, we use the new style so that the cousin style sharing code won't get
                 // fooled into believing this style is the same.
                 renderer->setStyleInternal(newStyle.get());
@@ -1498,12 +1509,10 @@
     }
     StyleResolverParentPusher parentPusher(this);
 
-    if (ElementShadow* shadow = this->shadow()) {
-        for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = root->olderShadowRoot()) {
-            if (shouldRecalcStyle(change, root)) {
-                parentPusher.push();
-                root->recalcStyle(change);
-            }
+    for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
+        if (shouldRecalcStyle(change, root)) {
+            parentPusher.push();
+            root->recalcStyle(change);
         }
     }
 
@@ -1624,11 +1633,17 @@
     return shadowRoot;
 }
 
+// FIXME: After replacing all internal shadowPseudoId with shadowPartId, remove this method.
 const AtomicString& Element::shadowPseudoId() const
 {
     return pseudo();
 }
 
+const AtomicString& Element::shadowPartId() const
+{
+    return part();
+}
+
 bool Element::childTypeAllowed(NodeType type) const
 {
     switch (type) {
@@ -1735,7 +1750,7 @@
         checkForSiblingStyleChanges(this, renderStyle(), false, beforeChange, afterChange, childCountDelta);
 
     if (ElementShadow* shadow = this->shadow())
-        shadow->invalidateDistribution();
+        shadow->setNeedsDistributionRecalc();
 }
 
 void Element::removeAllEventListeners()
@@ -2061,6 +2076,16 @@
     }
 }
 
+bool Element::isKeyboardFocusable() const
+{
+    return isFocusable() && tabIndex() >= 0;
+}
+
+bool Element::isMouseFocusable() const
+{
+    return isFocusable();
+}
+
 void Element::dispatchFocusEvent(Element* oldFocusedElement, FocusDirection)
 {
     RefPtr<FocusEvent> event = FocusEvent::create(eventNames().focusEvent, false, false, document()->defaultView(), 0, oldFocusedElement);
@@ -2148,6 +2173,7 @@
     return content.toString();
 }
 
+// FIXME: pseudo should be deprecated after all pseudo is replaced with ::part.
 const AtomicString& Element::pseudo() const
 {
     return getAttribute(pseudoAttr);
@@ -2158,6 +2184,16 @@
     setAttribute(pseudoAttr, value);
 }
 
+const AtomicString& Element::part() const
+{
+    return getAttribute(partAttr);
+}
+
+void Element::setPart(const AtomicString& value)
+{
+    setAttribute(partAttr, value);
+}
+
 LayoutSize Element::minimumSizeForResizing() const
 {
     return hasRareData() ? elementRareData()->minimumSizeForResizing() : defaultMinimumSizeForResizing();
@@ -2548,12 +2584,12 @@
 
 void Element::webkitRequestFullscreen()
 {
-    FullscreenController::from(document())->requestFullScreenForElement(this, ALLOW_KEYBOARD_INPUT, FullscreenController::EnforceIFrameAllowFullScreenRequirement);
+    FullscreenElementStack::from(document())->requestFullScreenForElement(this, ALLOW_KEYBOARD_INPUT, FullscreenElementStack::EnforceIFrameAllowFullScreenRequirement);
 }
 
 void Element::webkitRequestFullScreen(unsigned short flags)
 {
-    FullscreenController::from(document())->requestFullScreenForElement(this, (flags | LEGACY_MOZILLA_REQUEST), FullscreenController::EnforceIFrameAllowFullScreenRequirement);
+    FullscreenElementStack::from(document())->requestFullScreenForElement(this, (flags | LEGACY_MOZILLA_REQUEST), FullscreenElementStack::EnforceIFrameAllowFullScreenRequirement);
 }
 
 bool Element::containsFullScreenElement() const
@@ -2643,7 +2679,7 @@
 {
     ASSERT(styleToUse);
 
-    if (FullscreenController::isActiveFullScreenElement(this))
+    if (FullscreenElementStack::isActiveFullScreenElement(this))
         return false;
 
     if (isInShadowTree())
@@ -2720,17 +2756,48 @@
 
 inline void Element::updateName(const AtomicString& oldName, const AtomicString& newName)
 {
-    if (!inDocument() || isInShadowTree())
+    if (!isInTreeScope())
         return;
 
     if (oldName == newName)
         return;
 
-    if (shouldRegisterAsNamedItem())
-        updateNamedItemRegistration(oldName, newName);
+    updateName(treeScope(), oldName, newName);
 }
 
-inline void Element::updateId(const AtomicString& oldId, const AtomicString& newId)
+void Element::updateName(TreeScope* scope, const AtomicString& oldName, const AtomicString& newName)
+{
+    ASSERT(isInTreeScope());
+    ASSERT(oldName != newName);
+
+    if (!oldName.isEmpty())
+        scope->removeElementByName(oldName, this);
+    if (!newName.isEmpty())
+        scope->addElementByName(newName, this);
+
+    if (!inDocument() || isInShadowTree())
+        return;
+
+    Document* ownerDocument = document();
+    if (!ownerDocument->isHTMLDocument())
+        return;
+
+    if (WindowNameCollection::nodeMatchesIfNameAttributeMatch(this)) {
+        if (!oldName.isEmpty())
+            toHTMLDocument(ownerDocument)->windowNamedItemMap().remove(oldName.impl(), this);
+        if (!newName.isEmpty())
+            toHTMLDocument(ownerDocument)->windowNamedItemMap().add(newName.impl(), this);
+    }
+
+    if (DocumentNameCollection::nodeMatchesIfNameAttributeMatch(this)) {
+        if (!oldName.isEmpty())
+            toHTMLDocument(ownerDocument)->removeNamedDocumentItem(oldName, this);
+        if (!newName.isEmpty())
+            toHTMLDocument(ownerDocument)->addNamedDocumentItem(newName, this);
+    }
+}
+
+void Element::updateId(const AtomicString& oldId, const AtomicString& newId)
 {
     if (!isInTreeScope())
         return;
@@ -2751,8 +2818,26 @@
     if (!newId.isEmpty())
         scope->addElementById(newId, this);
 
-    if (shouldRegisterAsExtraNamedItem())
-        updateExtraNamedItemRegistration(oldId, newId);
+    if (!inDocument() || isInShadowTree())
+        return;
+
+    Document* ownerDocument = document();
+    if (!ownerDocument->isHTMLDocument())
+        return;
+
+    if (WindowNameCollection::nodeMatchesIfIdAttributeMatch(this)) {
+        if (!oldId.isEmpty())
+            toHTMLDocument(ownerDocument)->windowNamedItemMap().remove(oldId.impl(), this);
+        if (!newId.isEmpty())
+            toHTMLDocument(ownerDocument)->windowNamedItemMap().add(newId.impl(), this);
+    }
+
+    if (DocumentNameCollection::nodeMatchesIfIdAttributeMatch(this)) {
+        if (!oldId.isEmpty())
+            toHTMLDocument(ownerDocument)->removeNamedDocumentItem(oldId, this);
+        if (!newId.isEmpty())
+            toHTMLDocument(ownerDocument)->addNamedDocumentItem(newId, this);
+    }
 }
 
 void Element::updateLabel(TreeScope* scope, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue)
@@ -2838,30 +2923,6 @@
     }
 }
 
-void Element::updateNamedItemRegistration(const AtomicString& oldName, const AtomicString& newName)
-{
-    if (!document()->isHTMLDocument())
-        return;
-
-    if (!oldName.isEmpty())
-        toHTMLDocument(document())->removeNamedItem(oldName);
-
-    if (!newName.isEmpty())
-        toHTMLDocument(document())->addNamedItem(newName);
-}
-
-void Element::updateExtraNamedItemRegistration(const AtomicString& oldId, const AtomicString& newId)
-{
-    if (!document()->isHTMLDocument())
-        return;
-
-    if (!oldId.isEmpty())
-        toHTMLDocument(document())->removeExtraNamedItem(oldId);
-
-    if (!newId.isEmpty())
-        toHTMLDocument(document())->addExtraNamedItem(newId);
-}
-
 PassRefPtr<HTMLCollection> Element::ensureCachedHTMLCollection(CollectionType type)
 {
     if (HTMLCollection* collection = cachedHTMLCollection(type))
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 57a45a0..31ced21 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -48,6 +48,7 @@
 class Element;
 class ElementRareData;
 class ElementShadow;
+class Image;
 class InputMethodContext;
 class IntSize;
 class Locale;
@@ -130,9 +131,6 @@
 #endif
 
 class ShareableElementData : public ElementData {
-    // This is needed because we malloc() space for a ShareableElementData plus
-    // optional following attributes, as a performance tweak.
-    NEW_DELETE_SAME_AS_MALLOC_FREE;
 public:
     static PassRefPtr<ShareableElementData> createWithAttributes(const Vector<Attribute>&);
 
@@ -442,7 +440,6 @@
     ElementShadow* ensureShadow();
     PassRefPtr<ShadowRoot> createShadowRoot(ExceptionCode&);
     ShadowRoot* shadowRoot() const;
-    void ensureDistribution();
 
     bool hasAuthorShadowRoot() const { return shadowRoot(); }
 
@@ -450,6 +447,7 @@
     ShadowRoot* ensureUserAgentShadowRoot();
 
     virtual const AtomicString& shadowPseudoId() const;
+    virtual const AtomicString& shadowPartId() const;
 
     RenderStyle* computedStyle(PseudoId = NOPSEUDO);
 
@@ -504,10 +502,13 @@
 
     virtual const AtomicString& imageSourceURL() const;
     virtual String target() const { return String(); }
+    virtual Image* imageContents() { return 0; }
 
     virtual void focus(bool restorePreviousSelection = true, FocusDirection = FocusDirectionNone);
     virtual void updateFocusAppearance(bool restorePreviousSelection);
     virtual void blur();
+    virtual bool isKeyboardFocusable() const;
+    virtual bool isMouseFocusable() const;
     virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusDirection);
     virtual void dispatchBlurEvent(Element* newFocusedElement);
     void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocusedElement);
@@ -520,8 +521,11 @@
 
     virtual String title() const { return String(); }
 
+    // FIXME: pseudo should be deprecated after all pseudo is replaced with ::part.
     const AtomicString& pseudo() const;
     void setPseudo(const AtomicString&);
+    const AtomicString& part() const;
+    void setPart(const AtomicString&);
 
     LayoutSize minimumSizeForResizing() const;
     void setMinimumSizeForResizing(const LayoutSize&);
@@ -659,9 +663,6 @@
     virtual void didRecalcStyle(StyleChange);
     virtual PassRefPtr<RenderStyle> customStyleForRenderer();
 
-    virtual bool shouldRegisterAsNamedItem() const { return false; }
-    virtual bool shouldRegisterAsExtraNamedItem() const { return false; }
-
     void clearTabIndexExplicitlyIfNeeded();
     void setTabIndexExplicitly(short);
     virtual bool supportsFocus() const OVERRIDE;
@@ -710,6 +711,7 @@
     void updateId(const AtomicString& oldId, const AtomicString& newId);
     void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& newId);
     void updateName(const AtomicString& oldName, const AtomicString& newName);
+    void updateName(TreeScope*, const AtomicString& oldName, const AtomicString& newName);
     void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue);
 
     void scrollByUnits(int units, ScrollGranularity);
@@ -752,9 +754,6 @@
 
     SpellcheckAttributeState spellcheckAttributeState() const;
 
-    void updateNamedItemRegistration(const AtomicString& oldName, const AtomicString& newName);
-    void updateExtraNamedItemRegistration(const AtomicString& oldName, const AtomicString& newName);
-
     void unregisterNamedFlowContentNode();
 
     void createUniqueElementData();
@@ -957,6 +956,8 @@
         setFlag(InDocumentFlag);
     if (parentOrShadowHostNode()->isInShadowTree())
         setFlag(IsInShadowTreeFlag);
+    if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributionRecalc())
+        insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
     return InsertionDone;
 }
 
@@ -989,6 +990,11 @@
     return node && node->isElementNode() && toElement(node)->shadow();
 }
 
+inline bool isShadowHost(const Element* element)
+{
+    return element && element->shadow();
+}
+
 inline size_t ElementData::length() const
 {
     if (isUnique())
diff --git a/Source/core/dom/Element.idl b/Source/core/dom/Element.idl
index 29954ca..cc9631f 100644
--- a/Source/core/dom/Element.idl
+++ b/Source/core/dom/Element.idl
@@ -59,6 +59,11 @@
 
     [PerWorldBindings] readonly attribute CSSStyleDeclaration style;
 
+    // DOM4
+    // iht.com relies on id returning the empty string when no id is present.
+    // Other browsers do this as well. So we don't convert null to JS null.
+    [Reflect] attribute DOMString id;
+
     // Common extensions
 
     [PerWorldBindings] readonly attribute long offsetLeft;
diff --git a/Source/core/dom/ErrorEvent.cpp b/Source/core/dom/ErrorEvent.cpp
index db11e53..7c4b3c1 100644
--- a/Source/core/dom/ErrorEvent.cpp
+++ b/Source/core/dom/ErrorEvent.cpp
@@ -39,6 +39,7 @@
     : message()
     , filename()
     , lineno(0)
+    , colno(0)
 {
 }
 
@@ -52,7 +53,7 @@
     , m_message(initializer.message)
     , m_fileName(initializer.filename)
     , m_lineNumber(initializer.lineno)
-    , m_columnNumber(initializer.column)
+    , m_columnNumber(initializer.colno)
 {
     ScriptWrappable::init(this);
 }
diff --git a/Source/core/dom/ErrorEvent.h b/Source/core/dom/ErrorEvent.h
index 1e57e25..8215544 100644
--- a/Source/core/dom/ErrorEvent.h
+++ b/Source/core/dom/ErrorEvent.h
@@ -42,7 +42,7 @@
     String message;
     String filename;
     unsigned lineno;
-    unsigned column;
+    unsigned colno;
 };
 
 class ErrorEvent : public Event {
@@ -59,12 +59,16 @@
     {
         return adoptRef(new ErrorEvent(type, initializer));
     }
+    static PassRefPtr<ErrorEvent> createSanitizedError()
+    {
+        return adoptRef(new ErrorEvent("Script error.", String(), 0, 0));
+    }
     virtual ~ErrorEvent();
 
     const String& message() const { return m_message; }
     const String& filename() const { return m_fileName; }
     unsigned lineno() const { return m_lineNumber; }
-    unsigned column() const { return m_columnNumber; }
+    unsigned colno() const { return m_columnNumber; }
 
     virtual const AtomicString& interfaceName() const;
 
diff --git a/Source/core/dom/ErrorEvent.idl b/Source/core/dom/ErrorEvent.idl
index 21195e9..33f0239 100644
--- a/Source/core/dom/ErrorEvent.idl
+++ b/Source/core/dom/ErrorEvent.idl
@@ -34,9 +34,7 @@
     [InitializedByEventConstructor] readonly attribute DOMString message;
     [InitializedByEventConstructor] readonly attribute DOMString filename;
     [InitializedByEventConstructor] readonly attribute unsigned long lineno;
-
-    // FIXME: Part of the specification but not exposed yet.
-    // No other browser seems to support it (except IE10 as 'colno').
-    // [InitializedByEventConstructor] readonly attribute unsigned long column;
+    [InitializedByEventConstructor] readonly attribute unsigned long colno;
+    [InitializedByEventConstructor, Custom, Unserializable] readonly attribute any error;
 };
 
diff --git a/Source/core/dom/EventPathWalker.cpp b/Source/core/dom/EventPathWalker.cpp
index 4c28e19..4853df6 100644
--- a/Source/core/dom/EventPathWalker.cpp
+++ b/Source/core/dom/EventPathWalker.cpp
@@ -39,6 +39,11 @@
     , m_isVisitingInsertionPointInReprojection(false)
 {
     ASSERT(node);
+    // FIXME: It's not clear if we need this document check, but I think we do
+    // since DocType nodes from document.implementation.createDocumentType
+    // don't have a document().
+    if (Document* document = node->document())
+        document->updateDistributionForNodeIfNeeded(const_cast<Node*>(node));
 }
 
 Node* EventPathWalker::parent(const Node* node)
@@ -53,7 +58,6 @@
     ASSERT(m_node);
     ASSERT(m_distributedNode);
     if (ElementShadow* shadow = shadowOfParent(m_node)) {
-        shadow->host()->ensureDistribution();
         if (InsertionPoint* insertionPoint = shadow->distributor().findInsertionPointFor(m_distributedNode)) {
             m_node = insertionPoint;
             m_isVisitingInsertionPointInReprojection = true;
diff --git a/Source/core/dom/EventRetargeter.cpp b/Source/core/dom/EventRetargeter.cpp
index 6a9dac1..c113fd1 100644
--- a/Source/core/dom/EventRetargeter.cpp
+++ b/Source/core/dom/EventRetargeter.cpp
@@ -25,7 +25,7 @@
 #include "core/dom/EventContext.h"
 #include "core/dom/EventPathWalker.h"
 #include "core/dom/FocusEvent.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/MouseEvent.h"
 #include "core/dom/Touch.h"
 #include "core/dom/TouchEvent.h"
@@ -47,7 +47,7 @@
 {
     // Video-only full screen is a mode where we use the shadow DOM as an implementation
     // detail that should not be detectable by the web content.
-    if (Element* element = FullscreenController::currentFullScreenElementFrom(target->toNode()->document())) {
+    if (Element* element = FullscreenElementStack::currentFullScreenElementFrom(target->toNode()->document())) {
         // FIXME: We assume that if the full screen element is a media element that it's
         // the video-only full screen. Both here and elsewhere. But that is probably wrong.
         if (element->isMediaElement() && shadowRoot && shadowRoot->host() == element)
diff --git a/Source/core/dom/EventRetargeter.h b/Source/core/dom/EventRetargeter.h
index f2e66ca..c76c0be 100644
--- a/Source/core/dom/EventRetargeter.h
+++ b/Source/core/dom/EventRetargeter.h
@@ -80,8 +80,9 @@
         return referenceNode;
 
     // Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included
-    // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects
-    Element* shadowHostElement = toShadowRoot(referenceNode->treeScope()->rootNode())->host();
+    // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects.
+    Node* rootNode = referenceNode->treeScope()->rootNode();
+    Element* shadowHostElement = rootNode->isShadowRoot() ? toShadowRoot(rootNode)->host() : 0;
     // At this time, SVG nodes are not supported in non-<use> shadow trees.
     if (!shadowHostElement || !shadowHostElement->hasTagName(SVGNames::useTag))
         return referenceNode;
diff --git a/Source/core/dom/EventTarget.cpp b/Source/core/dom/EventTarget.cpp
index d318f66..522f44c 100644
--- a/Source/core/dom/EventTarget.cpp
+++ b/Source/core/dom/EventTarget.cpp
@@ -225,16 +225,17 @@
 
     // Fire all listeners registered for this event. Don't fire listeners removed
     // during event dispatch. Also, don't fire event listeners added during event
-    // dispatch. Conveniently, all new event listeners will be added after 'end',
-    // so iterating to 'end' naturally excludes new event listeners.
+    // dispatch. Conveniently, all new event listeners will be added after or at
+    // index |size|, so iterating up to (but not including) |size| naturally excludes
+    // new event listeners.
 
     bool userEventWasHandled = false;
     size_t i = 0;
-    size_t end = entry.size();
+    size_t size = entry.size();
     if (!d->firingEventIterators)
         d->firingEventIterators = adoptPtr(new FiringEventIteratorVector);
-    d->firingEventIterators->append(FiringEventIterator(event->type(), i, end));
-    for ( ; i < end; ++i) {
+    d->firingEventIterators->append(FiringEventIterator(event->type(), i, size));
+    for ( ; i < size; ++i) {
         RegisteredEventListener& registeredListener = entry[i];
         if (event->eventPhase() == Event::CAPTURING_PHASE && !registeredListener.useCapture)
             continue;
diff --git a/Source/core/dom/FullscreenController.cpp b/Source/core/dom/FullscreenElementStack.cpp
similarity index 85%
rename from Source/core/dom/FullscreenController.cpp
rename to Source/core/dom/FullscreenElementStack.cpp
index c365872..78dfe24 100644
--- a/Source/core/dom/FullscreenController.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -26,7 +26,7 @@
  */
 
 #include "config.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 
 #include "HTMLNames.h"
 #include "bindings/v8/ScriptController.h"
@@ -56,67 +56,67 @@
     return true;
 }
 
-const char* FullscreenController::supplementName()
+const char* FullscreenElementStack::supplementName()
 {
-    return "FullscreenController";
+    return "FullscreenElementStack";
 }
 
-FullscreenController* FullscreenController::from(Document* document)
+FullscreenElementStack* FullscreenElementStack::from(Document* document)
 {
-    FullscreenController* controller = fromIfExists(document);
-    if (!controller) {
-        controller = new FullscreenController(document);
-        Supplement<ScriptExecutionContext>::provideTo(document, supplementName(), adoptPtr(controller));
+    FullscreenElementStack* fullscreen = fromIfExists(document);
+    if (!fullscreen) {
+        fullscreen = new FullscreenElementStack(document);
+        Supplement<ScriptExecutionContext>::provideTo(document, supplementName(), adoptPtr(fullscreen));
     }
 
-    return controller;
+    return fullscreen;
 }
 
-FullscreenController* FullscreenController::fromIfExistsSlow(Document* document)
+FullscreenElementStack* FullscreenElementStack::fromIfExistsSlow(Document* document)
 {
-    return static_cast<FullscreenController*>(Supplement<ScriptExecutionContext>::from(document, supplementName()));
+    return static_cast<FullscreenElementStack*>(Supplement<ScriptExecutionContext>::from(document, supplementName()));
 }
 
-Element* FullscreenController::fullscreenElementFrom(Document* document)
+Element* FullscreenElementStack::fullscreenElementFrom(Document* document)
 {
-    if (FullscreenController* found = fromIfExists(document))
+    if (FullscreenElementStack* found = fromIfExists(document))
         return found->webkitFullscreenElement();
     return 0;
 }
 
-Element* FullscreenController::currentFullScreenElementFrom(Document* document)
+Element* FullscreenElementStack::currentFullScreenElementFrom(Document* document)
 {
-    if (FullscreenController* found = fromIfExists(document))
+    if (FullscreenElementStack* found = fromIfExists(document))
         return found->webkitCurrentFullScreenElement();
     return 0;
 }
 
-bool FullscreenController::isFullScreen(Document* document)
+bool FullscreenElementStack::isFullScreen(Document* document)
 {
-    if (FullscreenController* found = fromIfExists(document))
+    if (FullscreenElementStack* found = fromIfExists(document))
         return found->webkitIsFullScreen();
     return false;
 }
 
-FullscreenController::FullscreenController(Document* document)
+FullscreenElementStack::FullscreenElementStack(Document* document)
     : DocumentLifecycleObserver(document)
     , m_areKeysEnabledInFullScreen(false)
     , m_fullScreenRenderer(0)
-    , m_fullScreenChangeDelayTimer(this, &FullscreenController::fullScreenChangeDelayTimerFired)
+    , m_fullScreenChangeDelayTimer(this, &FullscreenElementStack::fullScreenChangeDelayTimerFired)
 {
-    document->setHasFullscreenController();
+    document->setHasFullscreenElementStack();
 }
 
-FullscreenController::~FullscreenController()
+FullscreenElementStack::~FullscreenElementStack()
 {
 }
 
-inline Document* FullscreenController::document()
+inline Document* FullscreenElementStack::document()
 {
     return toDocument(scriptExecutionContext());
 }
 
-void FullscreenController::documentWasDetached()
+void FullscreenElementStack::documentWasDetached()
 {
     m_fullScreenChangeEventTargetQueue.clear();
     m_fullScreenErrorEventTargetQueue.clear();
@@ -125,19 +125,19 @@
         setFullScreenRenderer(0);
 }
 
-void FullscreenController::documentWasDisposed()
+void FullscreenElementStack::documentWasDisposed()
 {
     m_fullScreenElement = 0;
     m_fullScreenElementStack.clear();
 }
 
-bool FullscreenController::fullScreenIsAllowedForElement(Element* element) const
+bool FullscreenElementStack::fullScreenIsAllowedForElement(Element* element) const
 {
     ASSERT(element);
     return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr, element->document()->ownerElement());
 }
 
-void FullscreenController::requestFullScreenForElement(Element* element, unsigned short flags, FullScreenCheckType checkType)
+void FullscreenElementStack::requestFullScreenForElement(Element* element, unsigned short flags, FullScreenCheckType checkType)
 {
     // The Mozilla Full Screen API <https://wiki.mozilla.org/Gecko:FullScreenAPI> has different requirements
     // for full screen mode, and do not have the concept of a full screen element stack.
@@ -250,7 +250,7 @@
     m_fullScreenChangeDelayTimer.startOneShot(0);
 }
 
-void FullscreenController::webkitCancelFullScreen()
+void FullscreenElementStack::webkitCancelFullScreen()
 {
     // The Mozilla "cancelFullScreen()" API behaves like the W3C "fully exit fullscreen" behavior, which
     // is defined as:
@@ -263,12 +263,12 @@
     // calling webkitExitFullscreen():
     Vector<RefPtr<Element> > replacementFullscreenElementStack;
     replacementFullscreenElementStack.append(fullscreenElementFrom(document()->topDocument()));
-    FullscreenController* topController = from(document()->topDocument());
-    topController->m_fullScreenElementStack.swap(replacementFullscreenElementStack);
-    topController->webkitExitFullscreen();
+    FullscreenElementStack* topFullscreenElementStack = from(document()->topDocument());
+    topFullscreenElementStack->m_fullScreenElementStack.swap(replacementFullscreenElementStack);
+    topFullscreenElementStack->webkitExitFullscreen();
 }
 
-void FullscreenController::webkitExitFullscreen()
+void FullscreenElementStack::webkitExitFullscreen()
 {
     // The exitFullscreen() method must run these steps:
 
@@ -339,7 +339,7 @@
     document()->page()->chrome().client()->enterFullScreenForElement(newTop);
 }
 
-bool FullscreenController::webkitFullscreenEnabled(Document* document)
+bool FullscreenElementStack::webkitFullscreenEnabled(Document* document)
 {
     // 4. The fullscreenEnabled attribute must return true if the context object and all ancestor
     // browsing context's documents have their fullscreen enabled flag set, or false otherwise.
@@ -349,7 +349,7 @@
 
 }
 
-void FullscreenController::webkitWillEnterFullScreenForElement(Element* element)
+void FullscreenElementStack::webkitWillEnterFullScreenForElement(Element* element)
 {
     if (!document()->attached())
         return;
@@ -391,7 +391,7 @@
     document()->recalcStyle(Node::Force);
 }
 
-void FullscreenController::webkitDidEnterFullScreenForElement(Element*)
+void FullscreenElementStack::webkitDidEnterFullScreenForElement(Element*)
 {
     if (!m_fullScreenElement)
         return;
@@ -404,7 +404,7 @@
     m_fullScreenChangeDelayTimer.startOneShot(0);
 }
 
-void FullscreenController::webkitWillExitFullScreenForElement(Element*)
+void FullscreenElementStack::webkitWillExitFullScreenForElement(Element*)
 {
     if (!m_fullScreenElement)
         return;
@@ -415,7 +415,7 @@
     m_fullScreenElement->willStopBeingFullscreenElement();
 }
 
-void FullscreenController::webkitDidExitFullScreenForElement(Element*)
+void FullscreenElementStack::webkitDidExitFullScreenForElement(Element*)
 {
     if (!m_fullScreenElement)
         return;
@@ -442,7 +442,7 @@
     from(exitingDocument)->m_fullScreenChangeDelayTimer.startOneShot(0);
 }
 
-void FullscreenController::setFullScreenRenderer(RenderFullScreen* renderer)
+void FullscreenElementStack::setFullScreenRenderer(RenderFullScreen* renderer)
 {
     if (renderer == m_fullScreenRenderer)
         return;
@@ -461,12 +461,12 @@
     m_fullScreenRenderer = renderer;
 }
 
-void FullscreenController::fullScreenRendererDestroyed()
+void FullscreenElementStack::fullScreenRendererDestroyed()
 {
     m_fullScreenRenderer = 0;
 }
 
-void FullscreenController::fullScreenChangeDelayTimerFired(Timer<FullscreenController>*)
+void FullscreenElementStack::fullScreenChangeDelayTimerFired(Timer<FullscreenElementStack>*)
 {
     // Since we dispatch events in this function, it's possible that the
     // document will be detached and GC'd. We protect it here to make sure we
@@ -510,13 +510,13 @@
     }
 }
 
-void FullscreenController::fullScreenElementRemoved()
+void FullscreenElementStack::fullScreenElementRemoved()
 {
     m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
     webkitCancelFullScreen();
 }
 
-void FullscreenController::removeFullScreenElementOfSubtree(Node* node, bool amongChildrenOnly)
+void FullscreenElementStack::removeFullScreenElementOfSubtree(Node* node, bool amongChildrenOnly)
 {
     if (!m_fullScreenElement)
         return;
@@ -531,12 +531,12 @@
         fullScreenElementRemoved();
 }
 
-void FullscreenController::clearFullscreenElementStack()
+void FullscreenElementStack::clearFullscreenElementStack()
 {
     m_fullScreenElementStack.clear();
 }
 
-void FullscreenController::popFullscreenElementStack()
+void FullscreenElementStack::popFullscreenElementStack()
 {
     if (m_fullScreenElementStack.isEmpty())
         return;
@@ -544,20 +544,20 @@
     m_fullScreenElementStack.removeLast();
 }
 
-void FullscreenController::pushFullscreenElementStack(Element* element)
+void FullscreenElementStack::pushFullscreenElementStack(Element* element)
 {
     m_fullScreenElementStack.append(element);
 }
 
-void FullscreenController::addDocumentToFullScreenChangeEventQueue(Document* doc)
+void FullscreenElementStack::addDocumentToFullScreenChangeEventQueue(Document* doc)
 {
     ASSERT(doc);
 
     Node* target = 0;
-    if (FullscreenController* controller = fromIfExists(doc)) {
-        target = controller->webkitFullscreenElement();
+    if (FullscreenElementStack* fullscreen = fromIfExists(doc)) {
+        target = fullscreen->webkitFullscreenElement();
         if (!target)
-            target = controller->webkitCurrentFullScreenElement();
+            target = fullscreen->webkitCurrentFullScreenElement();
     }
 
     if (!target)
diff --git a/Source/core/dom/FullscreenController.h b/Source/core/dom/FullscreenElementStack.h
similarity index 83%
rename from Source/core/dom/FullscreenController.h
rename to Source/core/dom/FullscreenElementStack.h
index 9fbfe3d..fcf9996 100644
--- a/Source/core/dom/FullscreenController.h
+++ b/Source/core/dom/FullscreenElementStack.h
@@ -25,8 +25,8 @@
  *
  */
 
-#ifndef FullscreenController_h
-#define FullscreenController_h
+#ifndef FullscreenElementStack_h
+#define FullscreenElementStack_h
 
 #include "core/dom/DocumentLifecycleObserver.h"
 #include "core/dom/Element.h"
@@ -46,14 +46,14 @@
 class RenderStyle;
 class ScriptExecutionContext;
 
-class FullscreenController
+class FullscreenElementStack
     : public Supplement<ScriptExecutionContext>
     , public DocumentLifecycleObserver {
 public:
-    virtual ~FullscreenController();
+    virtual ~FullscreenElementStack();
     static const char* supplementName();
-    static FullscreenController* from(Document*);
-    static FullscreenController* fromIfExists(Document*);
+    static FullscreenElementStack* from(Document*);
+    static FullscreenElementStack* fromIfExists(Document*);
     static Element* fullscreenElementFrom(Document*);
     static Element* currentFullScreenElementFrom(Document*);
     static bool isFullScreen(Document*);
@@ -98,39 +98,39 @@
     virtual void documentWasDisposed() OVERRIDE;
 
 private:
-    static FullscreenController* fromIfExistsSlow(Document*);
+    static FullscreenElementStack* fromIfExistsSlow(Document*);
 
-    explicit FullscreenController(Document*);
+    explicit FullscreenElementStack(Document*);
 
     Document* document();
-    void fullScreenChangeDelayTimerFired(Timer<FullscreenController>*);
+    void fullScreenChangeDelayTimerFired(Timer<FullscreenElementStack>*);
 
     bool m_areKeysEnabledInFullScreen;
     RefPtr<Element> m_fullScreenElement;
     Vector<RefPtr<Element> > m_fullScreenElementStack;
     RenderFullScreen* m_fullScreenRenderer;
-    Timer<FullscreenController> m_fullScreenChangeDelayTimer;
+    Timer<FullscreenElementStack> m_fullScreenChangeDelayTimer;
     Deque<RefPtr<Node> > m_fullScreenChangeEventTargetQueue;
     Deque<RefPtr<Node> > m_fullScreenErrorEventTargetQueue;
     LayoutRect m_savedPlaceholderFrameRect;
     RefPtr<RenderStyle> m_savedPlaceholderRenderStyle;
 };
 
-inline bool FullscreenController::isActiveFullScreenElement(const Element* element)
+inline bool FullscreenElementStack::isActiveFullScreenElement(const Element* element)
 {
-    FullscreenController* controller = fromIfExists(element->document());
+    FullscreenElementStack* controller = fromIfExists(element->document());
     if (!controller)
         return false;
     return controller->webkitIsFullScreen() && controller->webkitCurrentFullScreenElement() == element;
 }
 
-inline FullscreenController* FullscreenController::fromIfExists(Document* document)
+inline FullscreenElementStack* FullscreenElementStack::fromIfExists(Document* document)
 {
-    if (!document->hasFullscreenController())
+    if (!document->hasFullscreenElementStack())
         return 0;
     return fromIfExistsSlow(document);
 }
 
 } // namespace WebCore
 
-#endif // FullscreenController_h
+#endif // FullscreenElementStack_h
diff --git a/Source/core/dom/KeyboardEvent.cpp b/Source/core/dom/KeyboardEvent.cpp
index 5354fc0..4dc27d7 100644
--- a/Source/core/dom/KeyboardEvent.cpp
+++ b/Source/core/dom/KeyboardEvent.cpp
@@ -68,26 +68,27 @@
 static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeyboardEvent& key)
 {
     if (key.isKeypad())
-        return KeyboardEvent::DOMKeyLocationNumpad;
+        return KeyboardEvent::DOM_KEY_LOCATION_NUMPAD;
 
+    // FIXME: Support DOM_KEY_LOCATION_MOBILE & DOM_KEY_LOCATION_JOYSTICK (crbug.com/265446).
     switch (key.windowsVirtualKeyCode()) {
     case VK_LCONTROL:
     case VK_LSHIFT:
     case VK_LMENU:
     case VK_LWIN:
-        return KeyboardEvent::DOMKeyLocationLeft;
+        return KeyboardEvent::DOM_KEY_LOCATION_LEFT;
     case VK_RCONTROL:
     case VK_RSHIFT:
     case VK_RMENU:
     case VK_RWIN:
-        return KeyboardEvent::DOMKeyLocationRight;
+        return KeyboardEvent::DOM_KEY_LOCATION_RIGHT;
     default:
-        return KeyboardEvent::DOMKeyLocationStandard;
+        return KeyboardEvent::DOM_KEY_LOCATION_STANDARD;
     }
 }
 
 KeyboardEventInit::KeyboardEventInit()
-    : keyLocation(0)
+    : location(0)
     , ctrlKey(false)
     , altKey(false)
     , shiftKey(false)
@@ -96,7 +97,7 @@
 }
 
 KeyboardEvent::KeyboardEvent()
-    : m_keyLocation(DOMKeyLocationStandard)
+    : m_location(DOM_KEY_LOCATION_STANDARD)
     , m_altGraphKey(false)
 {
     ScriptWrappable::init(this);
@@ -107,7 +108,7 @@
                           true, true, view, 0, key.ctrlKey(), key.altKey(), key.shiftKey(), key.metaKey())
     , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key)))
     , m_keyIdentifier(key.keyIdentifier())
-    , m_keyLocation(keyLocationCode(key))
+    , m_location(keyLocationCode(key))
     , m_altGraphKey(false)
 {
     ScriptWrappable::init(this);
@@ -116,18 +117,18 @@
 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventInit& initializer)
     : UIEventWithKeyState(eventType, initializer.bubbles, initializer.cancelable, initializer.view, initializer.detail, initializer.ctrlKey, initializer.altKey, initializer.shiftKey, initializer.metaKey)
     , m_keyIdentifier(initializer.keyIdentifier)
-    , m_keyLocation(initializer.keyLocation)
+    , m_location(initializer.location)
     , m_altGraphKey(false)
 {
     ScriptWrappable::init(this);
 }
 
 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, AbstractView *view,
-                             const String &keyIdentifier,  unsigned keyLocation,
+                             const String &keyIdentifier,  unsigned location,
                              bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
     : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, ctrlKey, altKey, shiftKey, metaKey)
     , m_keyIdentifier(keyIdentifier)
-    , m_keyLocation(keyLocation)
+    , m_location(location)
     , m_altGraphKey(altGraphKey)
 {
     ScriptWrappable::init(this);
@@ -138,7 +139,7 @@
 }
 
 void KeyboardEvent::initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
-                                      const String &keyIdentifier, unsigned keyLocation,
+                                      const String &keyIdentifier, unsigned location,
                                       bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
 {
     if (dispatched())
@@ -147,7 +148,7 @@
     initUIEvent(type, canBubble, cancelable, view, 0);
 
     m_keyIdentifier = keyIdentifier;
-    m_keyLocation = keyLocation;
+    m_location = location;
     m_ctrlKey = ctrlKey;
     m_shiftKey = shiftKey;
     m_altKey = altKey;
@@ -157,6 +158,8 @@
 
 bool KeyboardEvent::getModifierState(const String& keyIdentifier) const
 {
+    // FIXME: The following keyIdentifiers are not supported yet (crbug.com/265458):
+    // "AltGraph", "CapsLock", "Fn", "NumLock", "ScrollLock", "SymbolLock", "OS".
     if (keyIdentifier == "Control")
         return ctrlKey();
     if (keyIdentifier == "Shift")
diff --git a/Source/core/dom/KeyboardEvent.h b/Source/core/dom/KeyboardEvent.h
index 02c7e34..274e2c7 100644
--- a/Source/core/dom/KeyboardEvent.h
+++ b/Source/core/dom/KeyboardEvent.h
@@ -37,7 +37,7 @@
     KeyboardEventInit();
 
     String keyIdentifier;
-    unsigned keyLocation;
+    unsigned location;
     bool ctrlKey;
     bool altKey;
     bool shiftKey;
@@ -47,10 +47,13 @@
 class KeyboardEvent : public UIEventWithKeyState {
 public:
     enum KeyLocationCode {
-        DOMKeyLocationStandard      = 0x00,
-        DOMKeyLocationLeft          = 0x01,
-        DOMKeyLocationRight         = 0x02,
-        DOMKeyLocationNumpad        = 0x03
+        DOM_KEY_LOCATION_STANDARD   = 0x00,
+        DOM_KEY_LOCATION_LEFT       = 0x01,
+        DOM_KEY_LOCATION_RIGHT      = 0x02,
+        DOM_KEY_LOCATION_NUMPAD     = 0x03
+        // FIXME: The following values are not supported yet (crbug.com/265446)
+        // DOM_KEY_LOCATION_MOBILE     = 0x04,
+        // DOM_KEY_LOCATION_JOYSTICK   = 0x05
     };
 
     static PassRefPtr<KeyboardEvent> create()
@@ -69,21 +72,21 @@
     }
 
     static PassRefPtr<KeyboardEvent> create(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
-        const String& keyIdentifier, unsigned keyLocation,
+        const String& keyIdentifier, unsigned location,
         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey)
     {
-        return adoptRef(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, keyLocation,
+        return adoptRef(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location,
         ctrlKey, altKey, shiftKey, metaKey, altGraphKey));
     }
 
     virtual ~KeyboardEvent();
 
     void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*,
-        const String& keyIdentifier, unsigned keyLocation,
+        const String& keyIdentifier, unsigned location,
         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey = false);
 
     const String& keyIdentifier() const { return m_keyIdentifier; }
-    unsigned keyLocation() const { return m_keyLocation; }
+    unsigned location() const { return m_location; }
 
     bool getModifierState(const String& keyIdentifier) const;
 
@@ -103,12 +106,12 @@
     KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
     KeyboardEvent(const AtomicString&, const KeyboardEventInit&);
     KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView*,
-        const String& keyIdentifier, unsigned keyLocation,
+        const String& keyIdentifier, unsigned location,
         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey);
 
     OwnPtr<PlatformKeyboardEvent> m_keyEvent;
     String m_keyIdentifier;
-    unsigned m_keyLocation;
+    unsigned m_location;
     bool m_altGraphKey : 1;
 };
 
diff --git a/Source/core/dom/KeyboardEvent.idl b/Source/core/dom/KeyboardEvent.idl
index cda219f..81b2c17 100644
--- a/Source/core/dom/KeyboardEvent.idl
+++ b/Source/core/dom/KeyboardEvent.idl
@@ -21,22 +21,33 @@
 [
     ConstructorTemplate=Event
 ] interface KeyboardEvent : UIEvent {
+    const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
+    const unsigned long DOM_KEY_LOCATION_LEFT     = 0x01;
+    const unsigned long DOM_KEY_LOCATION_RIGHT    = 0x02;
+    const unsigned long DOM_KEY_LOCATION_NUMPAD   = 0x03;
+    // FIXME: The following constants are defined in the specification but
+    // not yet supported (crbug.com/265446).
+    // const unsigned long DOM_KEY_LOCATION_MOBILE   = 0x04;
+    // const unsigned long DOM_KEY_LOCATION_JOYSTICK = 0x05;
 
     [InitializedByEventConstructor] readonly attribute DOMString        keyIdentifier;
-    [InitializedByEventConstructor] readonly attribute unsigned long    keyLocation;
+    [InitializedByEventConstructor] readonly attribute unsigned long    location;
+    [ImplementedAs=location, DeprecateAs=KeyboardEventKeyLocation, InitializedByEventConstructor] readonly attribute unsigned long keyLocation; // Deprecated.
     [InitializedByEventConstructor] readonly attribute boolean          ctrlKey;
     [InitializedByEventConstructor] readonly attribute boolean          shiftKey;
     [InitializedByEventConstructor] readonly attribute boolean          altKey;
     [InitializedByEventConstructor] readonly attribute boolean          metaKey;
     readonly attribute boolean          altGraphKey;
 
+    boolean getModifierState(DOMString keyArgument);
+
     // FIXME: this does not match the version in the DOM spec.
     void initKeyboardEvent([Default=Undefined] optional DOMString type,
                            [Default=Undefined] optional boolean canBubble,
                            [Default=Undefined] optional boolean cancelable,
                            [Default=Undefined] optional Window view,
                            [Default=Undefined] optional DOMString keyIdentifier,
-                           [Default=Undefined] optional unsigned long keyLocation,
+                           [Default=Undefined] optional unsigned long location,
                            [Default=Undefined] optional boolean ctrlKey,
                            [Default=Undefined] optional boolean altKey,
                            [Default=Undefined] optional boolean shiftKey,
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 56d0a7f..edd958d 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -67,6 +67,7 @@
 #include "core/dom/UserActionElementSet.h"
 #include "core/dom/WheelEvent.h"
 #include "core/dom/shadow/ElementShadow.h"
+#include "core/dom/shadow/InsertionPoint.h"
 #include "core/dom/shadow/ShadowRoot.h"
 #include "core/editing/htmlediting.h"
 #include "core/html/HTMLFrameOwnerElement.h"
@@ -762,6 +763,34 @@
     return 0;
 }
 
+void Node::recalcDistribution()
+{
+    if (isElementNode()) {
+        if (ElementShadow* shadow = toElement(this)->shadow())
+            shadow->distributeIfNeeded();
+    }
+
+    for (Node* child = firstChild(); child; child = child->nextSibling()) {
+        if (child->childNeedsDistributionRecalc())
+            child->recalcDistribution();
+    }
+
+    for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
+        if (root->childNeedsDistributionRecalc())
+            root->recalcDistribution();
+    }
+
+    clearChildNeedsDistributionRecalc();
+}
+
+void Node::markAncestorsWithChildNeedsDistributionRecalc()
+{
+    for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode())
+        node->setChildNeedsDistributionRecalc();
+    if (document()->childNeedsDistributionRecalc())
+        document()->scheduleStyleRecalc();
+}
+
 inline void Node::setStyleChange(StyleChangeType changeType)
 {
     m_nodeFlags = (m_nodeFlags & ~StyleChangeMask) | changeType;
@@ -815,12 +844,18 @@
         attach();
         return;
     }
-    setStyleChange(SubtreeStyleChange);
     markAncestorsWithChildNeedsStyleRecalc();
-    if (shouldSetAttached == DoNotSetAttached)
-        return;
-    for (Node* node = this; node; node = NodeTraversal::next(node, this))
-        node->setAttached();
+    for (Node* node = this; node; node = NodeTraversal::next(node, this)) {
+        node->setStyleChange(SubtreeStyleChange);
+        node->setChildNeedsStyleRecalc();
+        // FIXME: This flag is only used by HTMLFrameElementBase and doesn't look needed.
+        if (shouldSetAttached == SetAttached)
+            node->setAttached();
+        if (isActiveInsertionPoint(node))
+            toInsertionPoint(node)->lazyAttachDistribution(shouldSetAttached);
+        for (ShadowRoot* root = node->youngestShadowRoot(); root; root = root->olderShadowRoot())
+            root->lazyAttach(shouldSetAttached);
+    }
 }
 
 bool Node::supportsFocus() const
@@ -837,16 +872,6 @@
     return rendererIsFocusable();
 }
 
-bool Node::isKeyboardFocusable(KeyboardEvent*) const
-{
-    return isFocusable() && tabIndex() >= 0;
-}
-
-bool Node::isMouseFocusable() const
-{
-    return isFocusable();
-}
-
 Node* Node::focusDelegate()
 {
     return this;
@@ -982,10 +1007,28 @@
 
 bool Node::containsIncludingShadowDOM(const Node* node) const
 {
-    for (; node; node = node->parentOrShadowHostNode()) {
-        if (node == this)
-            return true;
+    if (!node)
+        return false;
+
+    if (this == node)
+        return true;
+
+    if (document() != node->document())
+        return false;
+
+    if (inDocument() != node->inDocument())
+        return false;
+
+    bool hasChildren = isContainerNode() && toContainerNode(this)->hasChildNodes();
+    bool hasShadow = isElementNode() && toElement(this)->shadow();
+    if (!hasChildren && !hasShadow)
+        return false;
+
+    for (; node; node = node->shadowHost()) {
+        if (treeScope() == node->treeScope())
+            return contains(node);
     }
+
     return false;
 }
 
@@ -1912,7 +1955,7 @@
         const Node* node = chain[index - 1];
         if (node->isShadowRoot()) {
             int count = 0;
-            for (ShadowRoot* shadowRoot = oldestShadowRootFor(toShadowRoot(node)->host()); shadowRoot && shadowRoot != node; shadowRoot = shadowRoot->youngerShadowRoot())
+            for (ShadowRoot* shadowRoot = toShadowRoot(node)->olderShadowRoot(); shadowRoot; shadowRoot = shadowRoot->olderShadowRoot())
                 ++count;
             fprintf(stderr, "/#shadow-root[%d]", count);
             continue;
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 24338a1..2a11ef9 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -391,6 +391,13 @@
         clearFlag(NotifyRendererWithIdenticalStyles);
     }
 
+    bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistributionRecalc); }
+    void setChildNeedsDistributionRecalc()  { setFlag(ChildNeedsDistributionRecalc); }
+    void clearChildNeedsDistributionRecalc()  { clearFlag(ChildNeedsDistributionRecalc); }
+    void markAncestorsWithChildNeedsDistributionRecalc();
+
+    void recalcDistribution();
+
     bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(NotifyRendererWithIdenticalStyles); }
 
     void setIsLink(bool f) { setFlag(f, IsLinkFlag); }
@@ -429,8 +436,6 @@
     virtual bool supportsFocus() const;
     // Whether the node can actually be focused.
     bool isFocusable() const;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
-    virtual bool isMouseFocusable() const;
     virtual Node* focusDelegate();
     // This is called only when the node is focused.
     virtual bool shouldHaveFocusAppearance() const;
@@ -517,6 +522,9 @@
     bool containsIncludingShadowDOM(const Node*) const;
     bool containsIncludingHostElements(const Node*) const;
 
+    // FIXME: Remove this when crbug.com/265716 cleans up contains semantics.
+    bool bindingsContains(const Node* node) const { return containsIncludingShadowDOM(node); }
+
     // Used to determine whether range offsets use characters or node indices.
     virtual bool offsetInCharacters() const;
     // Number of DOM 16-bit units contained in node. Note that rendered text length can be different - e.g. because of
@@ -750,10 +758,12 @@
         CustomElementIsUpgradeCandidateOrUpgraded = 1 << 27,
         CustomElementHasDefinitionOrIsUpgraded = 1 << 28,
 
+        ChildNeedsDistributionRecalc = 1 << 29,
+
         DefaultNodeFlags = IsParsingChildrenFinishedFlag
     };
 
-    // 3 bits remaining
+    // 2 bits remaining
 
     bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
     void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
diff --git a/Source/core/dom/Node.idl b/Source/core/dom/Node.idl
index b14d4f7..64f5b1e 100644
--- a/Source/core/dom/Node.idl
+++ b/Source/core/dom/Node.idl
@@ -91,7 +91,7 @@
     unsigned short     compareDocumentPosition([Default=Undefined] optional Node other);
 
     // Introduced in DOM4
-    boolean contains([Default=Undefined] optional Node other);
+    [ImplementedAs=bindingsContains] boolean contains([Default=Undefined] optional Node other);
 
     // IE extensions
     [PerWorldBindings] readonly attribute Element          parentElement;
diff --git a/Source/core/dom/NodeFilter.h b/Source/core/dom/NodeFilter.h
index c720126..a811a13 100644
--- a/Source/core/dom/NodeFilter.h
+++ b/Source/core/dom/NodeFilter.h
@@ -77,6 +77,11 @@
 
     short acceptNode(ScriptState*, Node*) const;
 
+    void setCondition(PassRefPtr<NodeFilterCondition> condition)
+    {
+        m_condition = condition;
+    }
+
 private:
     explicit NodeFilter(PassRefPtr<NodeFilterCondition> condition) : m_condition(condition)
     {
diff --git a/Source/core/dom/NodeIterator.idl b/Source/core/dom/NodeIterator.idl
index d25c305..5e52661 100644
--- a/Source/core/dom/NodeIterator.idl
+++ b/Source/core/dom/NodeIterator.idl
@@ -19,7 +19,9 @@
  */
 
 // Introduced in DOM Level 2:
-interface NodeIterator {
+[
+    CustomToV8
+] interface NodeIterator {
     readonly attribute Node root;
     readonly attribute unsigned long whatToShow;
     readonly attribute NodeFilter filter;
diff --git a/Source/core/dom/NodeRenderingContext.cpp b/Source/core/dom/NodeRenderingContext.cpp
index c469b1b..c66ae3c 100644
--- a/Source/core/dom/NodeRenderingContext.cpp
+++ b/Source/core/dom/NodeRenderingContext.cpp
@@ -29,7 +29,7 @@
 #include "RuntimeEnabledFeatures.h"
 #include "core/css/resolver/StyleResolver.h"
 #include "core/dom/ContainerNode.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/Node.h"
 #include "core/dom/Text.h"
 #include "core/dom/shadow/InsertionPoint.h"
@@ -243,7 +243,7 @@
     element->setRenderer(newRenderer);
     newRenderer->setAnimatableStyle(m_style.release()); // setAnimatableStyle() can depend on renderer() already being set.
 
-    if (FullscreenController::isActiveFullScreenElement(element)) {
+    if (FullscreenElementStack::isActiveFullScreenElement(element)) {
         newRenderer = RenderFullScreen::wrapRenderer(newRenderer, parentRenderer, element->document());
         if (!newRenderer)
             return;
diff --git a/Source/core/dom/NodeRenderingTraversal.cpp b/Source/core/dom/NodeRenderingTraversal.cpp
index 482b8ad..d550bcb 100644
--- a/Source/core/dom/NodeRenderingTraversal.cpp
+++ b/Source/core/dom/NodeRenderingTraversal.cpp
@@ -49,8 +49,7 @@
 
 ContainerNode* parent(const Node* node, ParentDetails* details)
 {
-    // FIXME(morrita): We should ensure shadow tree distribution to be valid here through ContentDistributor::ensureDistribution().
-    // Currently we rely on the caller side since doing it here is expensive.
+    // FIXME: Once everything lazy attaches we should assert that we don't need a distribution recalc here.
     ComposedShadowTreeWalker walker(node, ComposedShadowTreeWalker::CrossUpperBoundary, ComposedShadowTreeWalker::CanStartFromShadowBoundary);
     ContainerNode* found = toContainerNode(walker.traverseParent(walker.get(), details));
     return details->outOfComposition() ? 0 : found;
diff --git a/Source/core/dom/Position.h b/Source/core/dom/Position.h
index 10cd594..7a30694 100644
--- a/Source/core/dom/Position.h
+++ b/Source/core/dom/Position.h
@@ -317,6 +317,27 @@
     return offset < currentOffset;
 }
 
+class PositionWithAffinity {
+public:
+    PositionWithAffinity()
+        : m_affinity(DOWNSTREAM)
+    {
+    }
+
+    PositionWithAffinity(const Position& position, EAffinity affinity = DOWNSTREAM)
+        : m_position(position)
+        , m_affinity(affinity)
+    {
+    }
+
+    EAffinity affinity() const { return m_affinity; }
+    const Position& position() const { return m_position; }
+
+private:
+    Position m_position;
+    EAffinity m_affinity;
+};
+
 } // namespace WebCore
 
 #ifndef NDEBUG
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index 33d2ea6..2f4de90 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -102,11 +102,6 @@
     return adoptRef(new Range(ownerDocument, start.containerNode(), start.computeOffsetInContainerNode(), end.containerNode(), end.computeOffsetInContainerNode()));
 }
 
-PassRefPtr<Range> Range::create(ScriptExecutionContext* context)
-{
-    return adoptRef(new Range(toDocument(context)));
-}
-
 Range::~Range()
 {
     // Always detach (even if we've already detached) to fix https://bugs.webkit.org/show_bug.cgi?id=26044
diff --git a/Source/core/dom/Range.h b/Source/core/dom/Range.h
index 34716dc..1591515 100644
--- a/Source/core/dom/Range.h
+++ b/Source/core/dom/Range.h
@@ -51,7 +51,6 @@
     static PassRefPtr<Range> create(PassRefPtr<Document>);
     static PassRefPtr<Range> create(PassRefPtr<Document>, PassRefPtr<Node> startContainer, int startOffset, PassRefPtr<Node> endContainer, int endOffset);
     static PassRefPtr<Range> create(PassRefPtr<Document>, const Position&, const Position&);
-    static PassRefPtr<Range> create(ScriptExecutionContext*);
     ~Range();
 
     Document* ownerDocument() const { return m_ownerDocument.get(); }
diff --git a/Source/core/dom/Range.idl b/Source/core/dom/Range.idl
index b34558f..b926178 100644
--- a/Source/core/dom/Range.idl
+++ b/Source/core/dom/Range.idl
@@ -21,7 +21,7 @@
 // Introduced in DOM Level 2:
 [
     Constructor,
-    ConstructorCallWith=ScriptExecutionContext
+    ConstructorCallWith=Document
 ] interface Range {
 
     [GetterRaisesException] readonly attribute Node startContainer;
diff --git a/Source/core/dom/ScriptExecutionContext.cpp b/Source/core/dom/ScriptExecutionContext.cpp
index ff466ba..42e04fb 100644
--- a/Source/core/dom/ScriptExecutionContext.cpp
+++ b/Source/core/dom/ScriptExecutionContext.cpp
@@ -194,10 +194,14 @@
     }
 }
 
+bool ScriptExecutionContext::shouldSanitizeScriptError(const String& sourceURL)
+{
+    return !securityOrigin()->canRequest(completeURL(sourceURL));
+}
+
 bool ScriptExecutionContext::sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnNumber, String& sourceURL)
 {
-    KURL targetURL = completeURL(sourceURL);
-    if (securityOrigin()->canRequest(targetURL))
+    if (!shouldSanitizeScriptError(sourceURL))
         return false;
     errorMessage = "Script error.";
     sourceURL = String();
@@ -206,18 +210,19 @@
     return true;
 }
 
-void ScriptExecutionContext::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<ScriptCallStack> callStack)
+void ScriptExecutionContext::reportException(PassRefPtr<ErrorEvent> event, PassRefPtr<ScriptCallStack> callStack)
 {
+    RefPtr<ErrorEvent> errorEvent = event;
     if (m_inDispatchErrorEvent) {
         if (!m_pendingExceptions)
             m_pendingExceptions = adoptPtr(new Vector<OwnPtr<PendingException> >());
-        m_pendingExceptions->append(adoptPtr(new PendingException(errorMessage, lineNumber, columnNumber, sourceURL, callStack)));
+        m_pendingExceptions->append(adoptPtr(new PendingException(errorEvent->message(), errorEvent->lineno(), errorEvent->colno(), errorEvent->filename(), callStack)));
         return;
     }
 
     // First report the original exception and only then all the nested ones.
-    if (!dispatchErrorEvent(errorMessage, lineNumber, columnNumber, sourceURL))
-        logExceptionToConsole(errorMessage, sourceURL, lineNumber, columnNumber, callStack);
+    if (!dispatchErrorEvent(errorEvent))
+        logExceptionToConsole(errorEvent->message(), errorEvent->filename(), errorEvent->lineno(), errorEvent->colno(), callStack);
 
     if (!m_pendingExceptions)
         return;
@@ -234,21 +239,18 @@
     addMessage(source, level, message, sourceURL, lineNumber, 0, state, requestIdentifier);
 }
 
-bool ScriptExecutionContext::dispatchErrorEvent(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
+bool ScriptExecutionContext::dispatchErrorEvent(PassRefPtr<ErrorEvent> event)
 {
     EventTarget* target = errorEventTarget();
     if (!target)
         return false;
 
-    String message = errorMessage;
-    int line = lineNumber;
-    int column = columnNumber;
-    String sourceName = sourceURL;
-    sanitizeScriptError(message, line, column, sourceName);
+    RefPtr<ErrorEvent> errorEvent = event;
+    if (shouldSanitizeScriptError(errorEvent->filename()))
+        errorEvent = ErrorEvent::createSanitizedError();
 
     ASSERT(!m_inDispatchErrorEvent);
     m_inDispatchErrorEvent = true;
-    RefPtr<ErrorEvent> errorEvent = ErrorEvent::create(message, sourceName, line, column);
     target->dispatchEvent(errorEvent);
     m_inDispatchErrorEvent = false;
     return errorEvent->defaultPrevented();
diff --git a/Source/core/dom/ScriptExecutionContext.h b/Source/core/dom/ScriptExecutionContext.h
index fcbd208..f992a2b 100644
--- a/Source/core/dom/ScriptExecutionContext.h
+++ b/Source/core/dom/ScriptExecutionContext.h
@@ -29,6 +29,7 @@
 #define ScriptExecutionContext_h
 
 #include "core/dom/ActiveDOMObject.h"
+#include "core/dom/ErrorEvent.h"
 #include "core/dom/SecurityContext.h"
 #include "core/page/ConsoleTypes.h"
 #include "core/page/DOMTimer.h"
@@ -68,8 +69,9 @@
 
     virtual void disableEval(const String& errorMessage) = 0;
 
+    bool shouldSanitizeScriptError(const String& sourceURL);
     bool sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnNumber, String& sourceURL);
-    void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, PassRefPtr<ScriptCallStack>);
+    void reportException(PassRefPtr<ErrorEvent>, PassRefPtr<ScriptCallStack>);
 
     void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, ScriptState* = 0, unsigned long requestIdentifier = 0);
     virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) = 0;
@@ -156,7 +158,7 @@
     virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) = 0;
     virtual EventTarget* errorEventTarget() = 0;
     virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) = 0;
-    bool dispatchErrorEvent(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL);
+    bool dispatchErrorEvent(PassRefPtr<ErrorEvent>);
 
     void closeMessagePorts();
 
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp
index 91cd1d4..e918983 100644
--- a/Source/core/dom/ScriptLoader.cpp
+++ b/Source/core/dom/ScriptLoader.cpp
@@ -35,6 +35,7 @@
 #include "core/dom/ScriptRunner.h"
 #include "core/dom/ScriptableDocumentParser.h"
 #include "core/dom/Text.h"
+#include "core/html/HTMLImport.h"
 #include "core/html/HTMLScriptElement.h"
 #include "core/html/parser/HTMLParserIdioms.h"
 #include "core/loader/cache/CachedScript.h"
@@ -165,6 +166,14 @@
     return false;
 }
 
+Document* ScriptLoader::executingDocument() const
+{
+    Document* document = m_element->document();
+    if (!document->import())
+        return document;
+    return document->import()->master();
+}
+
 // http://dev.w3.org/html5/spec/Overview.html#prepare-a-script
 bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition, LegacyTypeSupport supportLegacyTypes)
 {
@@ -202,15 +211,16 @@
     m_alreadyStarted = true;
 
     // FIXME: If script is parser inserted, verify it's still in the original document.
-    Document* document = m_element->document();
+    Document* executingDocument = this->executingDocument();
+    Document* elementDocument = m_element->document();
 
     // FIXME: Eventually we'd like to evaluate scripts which are inserted into a
     // viewless document but this'll do for now.
     // See http://bugs.webkit.org/show_bug.cgi?id=5727
-    if (!document->frame())
+    if (!executingDocument->frame())
         return false;
 
-    if (!document->frame()->script()->canExecuteScripts(AboutToExecuteScript))
+    if (!executingDocument->frame()->script()->canExecuteScripts(AboutToExecuteScript))
         return false;
 
     if (!isScriptForEventSupported())
@@ -219,7 +229,7 @@
     if (!client->charsetAttributeValue().isEmpty())
         m_characterEncoding = client->charsetAttributeValue();
     else
-        m_characterEncoding = document->charset();
+        m_characterEncoding = elementDocument->charset();
 
     if (client->hasSourceAttribute()) {
         if (!requestScript(client->sourceAttributeValue()))
@@ -231,20 +241,20 @@
         m_willBeParserExecuted = true;
     } else if (client->hasSourceAttribute() && m_parserInserted && !client->asyncAttributeValue()) {
         m_willBeParserExecuted = true;
-    } else if (!client->hasSourceAttribute() && m_parserInserted && !document->haveStylesheetsAndImportsLoaded()) {
+    } else if (!client->hasSourceAttribute() && m_parserInserted && !elementDocument->haveStylesheetsAndImportsLoaded()) {
         m_willBeParserExecuted = true;
         m_readyToBeParserExecuted = true;
     } else if (client->hasSourceAttribute() && !client->asyncAttributeValue() && !m_forceAsync) {
         m_willExecuteInOrder = true;
-        document->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::IN_ORDER_EXECUTION);
+        executingDocument->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::IN_ORDER_EXECUTION);
         m_cachedScript->addClient(this);
     } else if (client->hasSourceAttribute()) {
-        document->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::ASYNC_EXECUTION);
+        executingDocument->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::ASYNC_EXECUTION);
         m_cachedScript->addClient(this);
     } else {
         // Reset line numbering for nested writes.
-        TextPosition position = document->isInDocumentWrite() ? TextPosition() : scriptStartPosition;
-        KURL scriptURL = (!document->isInDocumentWrite() && m_parserInserted) ? document->url() : KURL();
+        TextPosition position = elementDocument->isInDocumentWrite() ? TextPosition() : scriptStartPosition;
+        KURL scriptURL = (!elementDocument->isInDocumentWrite() && m_parserInserted) ? elementDocument->url() : KURL();
         executeScript(ScriptSourceCode(scriptContent(), scriptURL, position));
     }
 
@@ -255,28 +265,28 @@
 {
     ASSERT(m_element);
 
-    RefPtr<Document> originalDocument = m_element->document();
+    RefPtr<Document> elementDocument = m_element->document();
     if (!m_element->dispatchBeforeLoadEvent(sourceUrl))
         return false;
-    if (!m_element->inDocument() || m_element->document() != originalDocument)
+    if (!m_element->inDocument() || m_element->document() != elementDocument)
         return false;
 
     ASSERT(!m_cachedScript);
     if (!stripLeadingAndTrailingHTMLSpaces(sourceUrl).isEmpty()) {
-        FetchRequest request(ResourceRequest(m_element->document()->completeURL(sourceUrl)), m_element->localName());
+        FetchRequest request(ResourceRequest(elementDocument->completeURL(sourceUrl)), m_element->localName());
 
         String crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossoriginAttr);
         if (!crossOriginMode.isNull()) {
             StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials;
-            request.setPotentiallyCrossOriginEnabled(m_element->document()->securityOrigin(), allowCredentials);
+            request.setPotentiallyCrossOriginEnabled(elementDocument->securityOrigin(), allowCredentials);
         }
         request.setCharset(scriptCharset());
 
-        bool isValidScriptNonce = m_element->document()->contentSecurityPolicy()->allowScriptNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr));
+        bool isValidScriptNonce = elementDocument->contentSecurityPolicy()->allowScriptNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr));
         if (isValidScriptNonce)
             request.setContentSecurityCheck(DoNotCheckContentSecurityPolicy);
 
-        m_cachedScript = m_element->document()->fetcher()->requestScript(request);
+        m_cachedScript = elementDocument->fetcher()->requestScript(request);
         m_isExternalScript = true;
     }
 
@@ -305,24 +315,25 @@
     if (sourceCode.isEmpty())
         return;
 
-    RefPtr<Document> document = m_element->document();
-    Frame* frame = document->frame();
+    RefPtr<Document> executingDocument = this->executingDocument();
+    RefPtr<Document> elementDocument = m_element->document();
+    Frame* frame = executingDocument->frame();
 
-    bool shouldBypassMainWorldContentSecurityPolicy = (frame && frame->script()->shouldBypassMainWorldContentSecurityPolicy()) || document->contentSecurityPolicy()->allowScriptNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr));
+    bool shouldBypassMainWorldContentSecurityPolicy = (frame && frame->script()->shouldBypassMainWorldContentSecurityPolicy()) || elementDocument->contentSecurityPolicy()->allowScriptNonce(m_element->fastGetAttribute(HTMLNames::nonceAttr));
 
-    if (!m_isExternalScript && (!shouldBypassMainWorldContentSecurityPolicy && !document->contentSecurityPolicy()->allowInlineScript(document->url(), m_startLineNumber)))
+    if (!m_isExternalScript && (!shouldBypassMainWorldContentSecurityPolicy && !elementDocument->contentSecurityPolicy()->allowInlineScript(elementDocument->url(), m_startLineNumber)))
         return;
 
     if (m_isExternalScript && m_cachedScript && !m_cachedScript->mimeTypeAllowedByNosniff()) {
-        document->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Refused to execute script from '" + m_cachedScript->url().elidedString() + "' because its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and strict MIME type checking is enabled.");
+        executingDocument->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Refused to execute script from '" + m_cachedScript->url().elidedString() + "' because its MIME type ('" + m_cachedScript->mimeType() + "') is not executable, and strict MIME type checking is enabled.");
         return;
     }
 
     if (frame) {
-        IgnoreDestructiveWriteCountIncrementer ignoreDesctructiveWriteCountIncrementer(m_isExternalScript ? document.get() : 0);
+        IgnoreDestructiveWriteCountIncrementer ignoreDesctructiveWriteCountIncrementer(m_isExternalScript ? executingDocument.get() : 0);
 
         if (isHTMLScriptLoader(m_element))
-            document->pushCurrentScript(toHTMLScriptElement(m_element));
+            executingDocument->pushCurrentScript(toHTMLScriptElement(m_element));
 
         // Create a script from the script element node, using the script
         // block's source and the script block's type.
@@ -330,8 +341,8 @@
         frame->script()->executeScriptInMainWorld(sourceCode);
 
         if (isHTMLScriptLoader(m_element)) {
-            ASSERT(document->currentScript() == m_element);
-            document->popCurrentScript();
+            ASSERT(executingDocument->currentScript() == m_element);
+            executingDocument->popCurrentScript();
         }
     }
 }
@@ -362,6 +373,9 @@
 {
     ASSERT(!m_willBeParserExecuted);
 
+    RefPtr<Document> executingDocument = this->executingDocument();
+    RefPtr<Document> elementDocument = m_element->document();
+
     // Resource possibly invokes this notifyFinished() more than
     // once because ScriptLoader doesn't unsubscribe itself from
     // Resource here and does it in execute() instead.
@@ -369,15 +383,15 @@
     ASSERT_UNUSED(resource, resource == m_cachedScript);
     if (!m_cachedScript)
         return;
-    if (!m_element->document()->fetcher()->canAccess(m_cachedScript.get())) {
+    if (!elementDocument->fetcher()->canAccess(m_cachedScript.get())) {
         dispatchErrorEvent();
         return;
     }
 
     if (m_willExecuteInOrder)
-        m_element->document()->scriptRunner()->notifyScriptReady(this, ScriptRunner::IN_ORDER_EXECUTION);
+        executingDocument->scriptRunner()->notifyScriptReady(this, ScriptRunner::IN_ORDER_EXECUTION);
     else
-        m_element->document()->scriptRunner()->notifyScriptReady(this, ScriptRunner::ASYNC_EXECUTION);
+        executingDocument->scriptRunner()->notifyScriptReady(this, ScriptRunner::ASYNC_EXECUTION);
 
     m_cachedScript = 0;
 }
diff --git a/Source/core/dom/ScriptLoader.h b/Source/core/dom/ScriptLoader.h
index dc244a6..c9139c1 100644
--- a/Source/core/dom/ScriptLoader.h
+++ b/Source/core/dom/ScriptLoader.h
@@ -82,6 +82,7 @@
     void stopLoadRequest();
 
     ScriptLoaderClient* client() const;
+    Document* executingDocument() const;
 
     // ResourceClient
     virtual void notifyFinished(Resource*) OVERRIDE;
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index d16d727..05d6e80 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -45,11 +45,6 @@
     return adoptRef(new Text(document, data, CreateText));
 }
 
-PassRefPtr<Text> Text::create(ScriptExecutionContext* context, const String& data)
-{
-    return adoptRef(new Text(toDocument(context), data, CreateText));
-}
-
 PassRefPtr<Text> Text::createEditingText(Document* document, const String& data)
 {
     return adoptRef(new Text(document, data, CreateEditingText));
@@ -264,12 +259,12 @@
 RenderText* Text::createTextRenderer(RenderStyle* style)
 {
     if (isSVGText(this) || isSVGShadowText(this))
-        return new (document()->renderArena()) RenderSVGInlineText(this, dataImpl());
+        return new RenderSVGInlineText(this, dataImpl());
 
     if (style->hasTextCombine())
-        return new (document()->renderArena()) RenderCombineText(this, dataImpl());
+        return new RenderCombineText(this, dataImpl());
 
-    return new (document()->renderArena()) RenderText(this, dataImpl());
+    return new RenderText(this, dataImpl());
 }
 
 void Text::attach(const AttachContext& context)
diff --git a/Source/core/dom/Text.h b/Source/core/dom/Text.h
index 95c502b..1ca47b8 100644
--- a/Source/core/dom/Text.h
+++ b/Source/core/dom/Text.h
@@ -35,7 +35,6 @@
     static const unsigned defaultLengthLimit = 1 << 16;
 
     static PassRefPtr<Text> create(Document*, const String&);
-    static PassRefPtr<Text> create(ScriptExecutionContext*, const String&);
     static PassRefPtr<Text> createWithLengthLimit(Document*, const String&, unsigned positionInString, unsigned lengthLimit = defaultLengthLimit);
     static PassRefPtr<Text> createEditingText(Document*, const String&);
 
diff --git a/Source/core/dom/Text.idl b/Source/core/dom/Text.idl
index a770f78..8ed5b8d 100644
--- a/Source/core/dom/Text.idl
+++ b/Source/core/dom/Text.idl
@@ -18,7 +18,7 @@
  */
 [
     Constructor([Default=NullString] optional DOMString data),
-    ConstructorCallWith=ScriptExecutionContext,
+    ConstructorCallWith=Document,
     CustomToV8
 ] interface Text : CharacterData {
 
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp
index 6afde25..042539e 100644
--- a/Source/core/dom/TreeScope.cpp
+++ b/Source/core/dom/TreeScope.cpp
@@ -55,7 +55,7 @@
 
 struct SameSizeAsTreeScope {
     virtual ~SameSizeAsTreeScope();
-    void* pointers[8];
+    void* pointers[9];
     int ints[1];
 };
 
@@ -162,6 +162,29 @@
     m_idTargetObserverRegistry->notifyObservers(elementId);
 }
 
+Element* TreeScope::getElementByName(const AtomicString& name) const
+{
+    if (name.isEmpty())
+        return 0;
+    if (!m_elementsByName)
+        return 0;
+    return m_elementsByName->getElementByName(name.impl(), this);
+}
+
+void TreeScope::addElementByName(const AtomicString& name, Element* element)
+{
+    if (!m_elementsByName)
+        m_elementsByName = adoptPtr(new DocumentOrderedMap);
+    m_elementsByName->add(name.impl(), element);
+}
+
+void TreeScope::removeElementByName(const AtomicString& name, Element* element)
+{
+    if (!m_elementsByName)
+        return;
+    m_elementsByName->remove(name.impl(), element);
+}
+
 Node* TreeScope::ancestorInThisScope(Node* node) const
 {
     while (node) {
diff --git a/Source/core/dom/TreeScope.h b/Source/core/dom/TreeScope.h
index 54144ab..8edba5e 100644
--- a/Source/core/dom/TreeScope.h
+++ b/Source/core/dom/TreeScope.h
@@ -56,11 +56,17 @@
 
     Element* adjustedFocusedElement();
     Element* getElementById(const AtomicString&) const;
-    bool hasElementWithId(StringImpl* id) const;
+    bool hasElementWithId(const AtomicString&) const;
     bool containsMultipleElementsWithId(const AtomicString& id) const;
     void addElementById(const AtomicString& elementId, Element*);
     void removeElementById(const AtomicString& elementId, Element*);
 
+    Element* getElementByName(const AtomicString&) const;
+    bool hasElementWithName(const AtomicString&) const;
+    bool containsMultipleElementsWithName(const AtomicString&) const;
+    void addElementByName(const AtomicString&, Element*);
+    void removeElementByName(const AtomicString&, Element*);
+
     Document* documentScope() const { return m_documentScope; }
 
     Node* ancestorInThisScope(Node*) const;
@@ -166,6 +172,7 @@
     int m_guardRefCount;
 
     OwnPtr<DocumentOrderedMap> m_elementsById;
+    OwnPtr<DocumentOrderedMap> m_elementsByName;
     OwnPtr<DocumentOrderedMap> m_imageMapsByName;
     OwnPtr<DocumentOrderedMap> m_labelsByForAttribute;
 
@@ -174,15 +181,27 @@
     mutable RefPtr<DOMSelection> m_selection;
 };
 
-inline bool TreeScope::hasElementWithId(StringImpl* id) const
+inline bool TreeScope::hasElementWithId(const AtomicString& id) const
 {
-    ASSERT(id);
-    return m_elementsById && m_elementsById->contains(id);
+    ASSERT(id.impl());
+    return m_elementsById && m_elementsById->contains(id.impl());
 }
 
 inline bool TreeScope::containsMultipleElementsWithId(const AtomicString& id) const
 {
-    return m_elementsById && m_elementsById->containsMultiple(id.impl());
+    return m_elementsById && m_elementsById->mightContainMultiple(id.impl());
+}
+
+inline bool TreeScope::hasElementWithName(const AtomicString& id) const
+{
+    ASSERT(id.impl());
+    return m_elementsByName && m_elementsByName->contains(id.impl());
+}
+
+inline bool TreeScope::containsMultipleElementsWithName(const AtomicString& name) const
+{
+    ASSERT(name.impl());
+    return m_elementsByName && m_elementsByName->mightContainMultiple(name.impl());
 }
 
 Node* nodeFromPoint(Document*, int x, int y, LayoutPoint* localPoint = 0);
diff --git a/Source/core/dom/TreeWalker.idl b/Source/core/dom/TreeWalker.idl
index bfb435b..dd545b8 100644
--- a/Source/core/dom/TreeWalker.idl
+++ b/Source/core/dom/TreeWalker.idl
@@ -19,7 +19,9 @@
  */
 
 // Introduced in DOM Level 2:
-interface TreeWalker {
+[
+    CustomToV8
+] interface TreeWalker {
     readonly attribute Node root;
     readonly attribute unsigned long whatToShow;
     readonly attribute NodeFilter filter;
diff --git a/Source/core/dom/shadow/ContentDistributor.cpp b/Source/core/dom/shadow/ContentDistributor.cpp
index 5d002a2..61d315b 100644
--- a/Source/core/dom/shadow/ContentDistributor.cpp
+++ b/Source/core/dom/shadow/ContentDistributor.cpp
@@ -85,6 +85,11 @@
 {
 }
 
+void ScopeContentDistribution::setInsertionPointAssignedTo(PassRefPtr<InsertionPoint> insertionPoint)
+{
+    m_insertionPointAssignedTo = insertionPoint;
+}
+
 void ScopeContentDistribution::invalidateInsertionPointList()
 {
     m_insertionPointListIsValid = false;
@@ -139,7 +144,6 @@
 
 ContentDistributor::ContentDistributor()
     : m_needsSelectFeatureSet(false)
-    , m_validity(Undetermined)
 {
 }
 
@@ -152,8 +156,10 @@
     return m_nodeToInsertionPoint.get(key);
 }
 
-void ContentDistributor::populate(Node* node, ContentDistribution& pool)
+void ContentDistributor::populate(Node* node, Vector<Node*>& pool)
 {
+    node->lazyReattachIfAttached();
+
     if (!isActiveInsertionPoint(node)) {
         pool.append(node);
         return;
@@ -171,16 +177,12 @@
 
 void ContentDistributor::distribute(Element* host)
 {
-    ASSERT(needsDistribution());
-    ASSERT(m_nodeToInsertionPoint.isEmpty());
-    ASSERT(!host->containingShadowRoot() || host->containingShadowRoot()->owner()->distributor().isValid());
-
-    m_validity = Valid;
-
-    ContentDistribution pool;
+    Vector<Node*> pool;
     for (Node* node = host->firstChild(); node; node = node->nextSibling())
         populate(node, pool);
 
+    host->setNeedsStyleRecalc();
+
     Vector<bool> distributed(pool.size());
     distributed.fill(false);
 
@@ -200,8 +202,8 @@
                         firstActiveShadowInsertionPoint = toHTMLShadowElement(point);
                 } else {
                     distributeSelectionsTo(point, pool, distributed);
-                    if (ElementShadow* shadow = point->parentNode()->isElementNode() ? toElement(point->parentNode())->shadow() : 0)
-                        shadow->invalidateDistribution();
+                    if (ElementShadow* shadow = shadowOfParentForDistribution(point))
+                        shadow->setNeedsDistributionRecalc();
                 }
             }
         }
@@ -219,46 +221,13 @@
             root->olderShadowRoot()->ensureScopeDistribution()->setInsertionPointAssignedTo(shadowElement);
         } else {
             distributeSelectionsTo(shadowElement, pool, distributed);
-            if (ElementShadow* shadow = shadowElement->parentNode()->isElementNode() ? toElement(shadowElement->parentNode())->shadow() : 0)
-                shadow->invalidateDistribution();
         }
+        if (ElementShadow* shadow = shadowOfParentForDistribution(shadowElement))
+            shadow->setNeedsDistributionRecalc();
     }
 }
 
-bool ContentDistributor::invalidate(Element* host, Vector<Node*, 8>& nodesNeedingReattach)
-{
-    ASSERT(needsInvalidation());
-    bool needsReattach = (m_validity == Undetermined) || !m_nodeToInsertionPoint.isEmpty();
-
-    for (ShadowRoot* root = host->youngestShadowRoot(); root; root = root->olderShadowRoot()) {
-        if (ScopeContentDistribution* scope = root->scopeDistribution()) {
-            scope->setInsertionPointAssignedTo(0);
-            const Vector<RefPtr<InsertionPoint> >& insertionPoints = scope->ensureInsertionPointList(root);
-            for (size_t i = 0; i < insertionPoints.size(); ++i) {
-                needsReattach = true;
-                for (Node* child = insertionPoints[i]->firstChild(); child; child = child->nextSibling())
-                    nodesNeedingReattach.append(child);
-
-                insertionPoints[i]->clearDistribution();
-
-                // After insertionPoint's distribution is invalidated, its reprojection should also be invalidated.
-                if (!insertionPoints[i]->isActive())
-                    continue;
-
-                if (Element* parent = insertionPoints[i]->parentElement()) {
-                    if (ElementShadow* shadow = parent->shadow())
-                        shadow->invalidateDistribution();
-                }
-            }
-        }
-    }
-
-    m_validity = Invalidating;
-    m_nodeToInsertionPoint.clear();
-    return needsReattach;
-}
-
-void ContentDistributor::distributeSelectionsTo(InsertionPoint* insertionPoint, const ContentDistribution& pool, Vector<bool>& distributed)
+void ContentDistributor::distributeSelectionsTo(InsertionPoint* insertionPoint, const Vector<Node*>& pool, Vector<bool>& distributed)
 {
     ContentDistribution distribution;
     ContentSelectorQuery query(insertionPoint);
@@ -267,15 +236,16 @@
         if (distributed[i])
             continue;
 
-        if (!query.matches(pool.nodes(), i))
+        if (!query.matches(pool, i))
             continue;
 
-        Node* child = pool.at(i).get();
+        Node* child = pool[i];
         distribution.append(child);
         m_nodeToInsertionPoint.add(child, insertionPoint);
         distributed[i] = true;
     }
 
+    insertionPoint->lazyReattachIfAttached();
     insertionPoint->setDistribution(distribution);
 }
 
@@ -283,6 +253,7 @@
 {
     ContentDistribution distribution;
     for (Node* node = containerNode->firstChild(); node; node = node->nextSibling()) {
+        node->lazyReattachIfAttached();
         if (isActiveInsertionPoint(node)) {
             InsertionPoint* innerInsertionPoint = toInsertionPoint(node);
             if (innerInsertionPoint->hasDistribution()) {
@@ -302,45 +273,10 @@
         }
     }
 
+    insertionPoint->lazyReattachIfAttached();
     insertionPoint->setDistribution(distribution);
 }
 
-void ContentDistributor::ensureDistribution(Element* host)
-{
-    Vector<ElementShadow*, 8> elementShadows;
-    for (Element* current = host; current; current = current->shadowHost()) {
-        ElementShadow* elementShadow = current->shadow();
-        if (!elementShadow->distributor().needsDistribution())
-            break;
-
-        elementShadows.append(elementShadow);
-    }
-
-    for (size_t i = elementShadows.size(); i > 0; --i)
-        elementShadows[i - 1]->distributor().distribute(elementShadows[i - 1]->host());
-}
-
-
-void ContentDistributor::invalidateDistribution(Element* host)
-{
-    Vector<Node*, 8> nodesNeedingReattach;
-    bool didNeedInvalidation = needsInvalidation();
-    bool needsReattach = didNeedInvalidation ? invalidate(host, nodesNeedingReattach) : false;
-
-    if (needsReattach && host->attached()) {
-        for (Node* n = host->firstChild(); n; n = n->nextSibling())
-            n->lazyReattachIfAttached();
-        for (size_t i = 0; i < nodesNeedingReattach.size(); ++i)
-            nodesNeedingReattach[i]->lazyReattachIfAttached();
-        host->setNeedsStyleRecalc();
-    }
-
-    if (didNeedInvalidation) {
-        ASSERT(m_validity == Invalidating);
-        m_validity = Invalidated;
-    }
-}
-
 const SelectRuleFeatureSet& ContentDistributor::ensureSelectFeatureSet(ElementShadow* shadow)
 {
     if (!m_needsSelectFeatureSet)
@@ -374,7 +310,7 @@
 void ContentDistributor::didAffectSelector(Element* host, AffectedSelectorMask mask)
 {
     if (ensureSelectFeatureSet(host->shadow()).hasSelectorFor(mask))
-        invalidateDistribution(host);
+        host->shadow()->setNeedsDistributionRecalc();
 }
 
 void ContentDistributor::willAffectSelector(Element* host)
@@ -384,22 +320,17 @@
             break;
         shadow->distributor().setNeedsSelectFeatureSet();
     }
-
-    invalidateDistribution(host);
+    host->shadow()->setNeedsDistributionRecalc();
 }
 
-void ContentDistributor::setNeedsStyleRecalcIfDistributedTo(InsertionPoint* insertionPoint)
+void ContentDistributor::clearDistribution(Element* host)
 {
-    for (NodeInsertionPointMap::iterator i = m_nodeToInsertionPoint.begin(); i != m_nodeToInsertionPoint.end(); ++i) {
-        if (i->value == insertionPoint)
-            const_cast<Node*>(i->key)->setNeedsStyleRecalc(LocalStyleChange);
+    m_nodeToInsertionPoint.clear();
+
+    for (ShadowRoot* root = host->youngestShadowRoot(); root; root = root->olderShadowRoot()) {
+        if (ScopeContentDistribution* scope = root->scopeDistribution())
+            scope->setInsertionPointAssignedTo(0);
     }
 }
 
-void ContentDistributor::didShadowBoundaryChange(Element* host)
-{
-    setValidity(Undetermined);
-    invalidateDistribution(host);
-}
-
 }
diff --git a/Source/core/dom/shadow/ContentDistributor.h b/Source/core/dom/shadow/ContentDistributor.h
index ba8707f..e98b40b 100644
--- a/Source/core/dom/shadow/ContentDistributor.h
+++ b/Source/core/dom/shadow/ContentDistributor.h
@@ -74,8 +74,8 @@
 public:
     ScopeContentDistribution();
 
-    InsertionPoint* insertionPointAssignedTo() const { return m_insertionPointAssignedTo; }
-    void setInsertionPointAssignedTo(InsertionPoint* insertionPoint) { m_insertionPointAssignedTo = insertionPoint; }
+    InsertionPoint* insertionPointAssignedTo() const { return m_insertionPointAssignedTo.get(); }
+    void setInsertionPointAssignedTo(PassRefPtr<InsertionPoint>);
 
     void registerInsertionPoint(InsertionPoint*);
     void unregisterInsertionPoint(InsertionPoint*);
@@ -90,10 +90,8 @@
     void invalidateInsertionPointList();
     const Vector<RefPtr<InsertionPoint> >& ensureInsertionPointList(ShadowRoot*);
 
-    bool isUsedForRendering() const;
-
 private:
-    InsertionPoint* m_insertionPointAssignedTo;
+    RefPtr<InsertionPoint> m_insertionPointAssignedTo;
     unsigned m_numberOfShadowElementChildren;
     unsigned m_numberOfContentElementChildren;
     unsigned m_numberOfElementShadowChildren;
@@ -104,57 +102,34 @@
 class ContentDistributor {
     WTF_MAKE_NONCOPYABLE(ContentDistributor);
 public:
-    enum Validity {
-        Valid = 0,
-        Invalidated = 1,
-        Invalidating = 2,
-        Undetermined = 3
-    };
-
     ContentDistributor();
     ~ContentDistributor();
 
     InsertionPoint* findInsertionPointFor(const Node* key) const;
     const SelectRuleFeatureSet& ensureSelectFeatureSet(ElementShadow*);
 
-    void distributeSelectionsTo(InsertionPoint*, const ContentDistribution& pool, Vector<bool>& distributed);
+    void distributeSelectionsTo(InsertionPoint*, const Vector<Node*>& pool, Vector<bool>& distributed);
     void distributeNodeChildrenTo(InsertionPoint*, ContainerNode*);
 
-    void invalidateDistribution(Element* host);
-    void didShadowBoundaryChange(Element* host);
     void didAffectSelector(Element* host, AffectedSelectorMask);
     void willAffectSelector(Element* host);
-    void setNeedsStyleRecalcIfDistributedTo(InsertionPoint*);
 
-    static void ensureDistribution(Element*);
+    void distribute(Element* host);
+    void clearDistribution(Element* host);
 
 private:
-    void distribute(Element* host);
-    bool invalidate(Element* host, Vector<Node*, 8>& nodesNeedingReattach);
-    void populate(Node*, ContentDistribution&);
+    void populate(Node*, Vector<Node*>&);
 
     void collectSelectFeatureSetFrom(ShadowRoot*);
     bool needsSelectFeatureSet() const { return m_needsSelectFeatureSet; }
     void setNeedsSelectFeatureSet() { m_needsSelectFeatureSet = true; }
 
-    void setValidity(Validity validity) { m_validity = validity; }
-    bool isValid() const { return m_validity == Valid; }
-    bool needsDistribution() const;
-    bool needsInvalidation() const { return m_validity != Invalidated; }
-
     typedef HashMap<const Node*, RefPtr<InsertionPoint> > NodeInsertionPointMap;
     NodeInsertionPointMap m_nodeToInsertionPoint;
     SelectRuleFeatureSet m_selectFeatures;
-    unsigned m_needsSelectFeatureSet : 1;
-    unsigned m_validity : 2;
+    bool m_needsSelectFeatureSet;
 };
 
-inline bool ContentDistributor::needsDistribution() const
-{
-    // During the invalidation, re-distribution should be supressed.
-    return m_validity != Valid && m_validity != Invalidating;
-}
-
 }
 
 #endif
diff --git a/Source/core/dom/shadow/ContentSelectorQuery.cpp b/Source/core/dom/shadow/ContentSelectorQuery.cpp
index 99f2429..9bc2c49 100644
--- a/Source/core/dom/shadow/ContentSelectorQuery.cpp
+++ b/Source/core/dom/shadow/ContentSelectorQuery.cpp
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-bool ContentSelectorDataList::checkContentSelector(const CSSSelector* selector, const Vector<RefPtr<Node> >& siblings, int nth)
+bool ContentSelectorDataList::checkContentSelector(const CSSSelector* selector, const Vector<Node*>& siblings, int nth)
 {
-    Element* element = toElement(siblings[nth].get());
+    Element* element = toElement(siblings[nth]);
     SelectorChecker selectorChecker(element->document(), SelectorChecker::CollectingRules);
     SelectorChecker::SelectorCheckingContext context(selector, element, SelectorChecker::VisitedMatchEnabled);
     ShadowDOMSiblingTraversalStrategy strategy(siblings, nth);
@@ -50,7 +50,7 @@
         m_selectors.append(selector);
 }
 
-bool ContentSelectorDataList::matches(const Vector<RefPtr<Node> >& siblings, int nth) const
+bool ContentSelectorDataList::matches(const Vector<Node*>& siblings, int nth) const
 {
     unsigned selectorCount = m_selectors.size();
     for (unsigned i = 0; i < selectorCount; ++i) {
@@ -66,9 +66,9 @@
     m_selectors.initialize(insertionPoint->selectorList());
 }
 
-bool ContentSelectorQuery::matches(const Vector<RefPtr<Node> >& siblings, int nth) const
+bool ContentSelectorQuery::matches(const Vector<Node*>& siblings, int nth) const
 {
-    Node* node = siblings[nth].get();
+    Node* node = siblings[nth];
     ASSERT(node);
 
     switch (m_insertionPoint->matchTypeFor(node)) {
diff --git a/Source/core/dom/shadow/ContentSelectorQuery.h b/Source/core/dom/shadow/ContentSelectorQuery.h
index b37008a..a1d8191 100644
--- a/Source/core/dom/shadow/ContentSelectorQuery.h
+++ b/Source/core/dom/shadow/ContentSelectorQuery.h
@@ -44,10 +44,10 @@
 class ContentSelectorDataList {
 public:
     void initialize(const CSSSelectorList&);
-    bool matches(const Vector<RefPtr<Node> >& siblings, int nthNode) const;
+    bool matches(const Vector<Node*>& siblings, int nthNode) const;
 
 private:
-    static bool checkContentSelector(const CSSSelector*, const Vector<RefPtr<Node> >& siblings, int nthNode);
+    static bool checkContentSelector(const CSSSelector*, const Vector<Node*>& siblings, int nthNode);
 
     Vector<const CSSSelector*> m_selectors;
 };
@@ -57,7 +57,7 @@
 public:
     explicit ContentSelectorQuery(InsertionPoint*);
 
-    bool matches(const Vector<RefPtr<Node> >& siblings, int nthNode) const;
+    bool matches(const Vector<Node*>& siblings, int nthNode) const;
 
 private:
     InsertionPoint* m_insertionPoint;
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
index e1983e5..68fca88 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -38,8 +38,8 @@
     shadowRoot->setParentOrShadowHostNode(shadowHost);
     shadowRoot->setParentTreeScope(shadowHost->treeScope());
     m_shadowRoots.push(shadowRoot.get());
-    m_distributor.didShadowBoundaryChange(shadowHost);
     ChildNodeInsertionNotifier(shadowHost).notify(shadowRoot.get());
+    setNeedsDistributionRecalc();
 
     if (shadowHost->attached())
         shadowHost->lazyReattach();
@@ -68,14 +68,10 @@
         oldRoot->setNext(0);
         ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get());
     }
-
-    m_distributor.invalidateDistribution(shadowHost);
 }
 
 void ElementShadow::attach(const Node::AttachContext& context)
 {
-    ContentDistributor::ensureDistribution(host());
-
     Node::AttachContext childrenContext(context);
     childrenContext.resolvedStyle = 0;
 
@@ -104,4 +100,13 @@
     }
 }
 
+void ElementShadow::setNeedsDistributionRecalc()
+{
+    if (m_needsDistributionRecalc)
+        return;
+    m_needsDistributionRecalc = true;
+    host()->markAncestorsWithChildNeedsDistributionRecalc();
+    clearDistribution();
+}
+
 } // namespace
diff --git a/Source/core/dom/shadow/ElementShadow.h b/Source/core/dom/shadow/ElementShadow.h
index bc73e91..7a73f87 100644
--- a/Source/core/dom/shadow/ElementShadow.h
+++ b/Source/core/dom/shadow/ElementShadow.h
@@ -61,21 +61,34 @@
 
     void removeAllEventListeners();
 
-    void invalidateDistribution() { m_distributor.invalidateDistribution(host()); }
     void didAffectSelector(AffectedSelectorMask mask) { m_distributor.didAffectSelector(host(), mask); }
     void willAffectSelector() { m_distributor.willAffectSelector(host()); }
     const SelectRuleFeatureSet& ensureSelectFeatureSet() { return m_distributor.ensureSelectFeatureSet(this); }
 
+    // FIXME: Move all callers of this to APIs on ElementShadow and remove it.
     ContentDistributor& distributor() { return m_distributor; }
     const ContentDistributor& distributor() const { return m_distributor; }
 
+    void distributeIfNeeded()
+    {
+        if (m_needsDistributionRecalc)
+            m_distributor.distribute(host());
+        m_needsDistributionRecalc = false;
+    }
+    void clearDistribution() { m_distributor.clearDistribution(host()); }
+
+    void setNeedsDistributionRecalc();
+
 private:
-    ElementShadow() { }
+    ElementShadow()
+        : m_needsDistributionRecalc(false)
+    { }
 
     void removeAllShadowRoots();
 
     DoublyLinkedList<ShadowRoot> m_shadowRoots;
     ContentDistributor m_distributor;
+    bool m_needsDistributionRecalc;
 };
 
 inline Element* ElementShadow::host() const
@@ -93,11 +106,6 @@
     return 0;
 }
 
-inline void Element::ensureDistribution()
-{
-    ContentDistributor::ensureDistribution(this);
-}
-
 inline ElementShadow* ElementShadow::containingShadow() const
 {
     if (ShadowRoot* parentRoot = host()->containingShadowRoot())
diff --git a/Source/core/dom/shadow/InsertionPoint.cpp b/Source/core/dom/shadow/InsertionPoint.cpp
index 878d661..e04b64f 100644
--- a/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/Source/core/dom/shadow/InsertionPoint.cpp
@@ -54,8 +54,6 @@
 
 void InsertionPoint::attach(const AttachContext& context)
 {
-    if (ShadowRoot* shadowRoot = containingShadowRoot())
-        shadowRoot->host()->ensureDistribution();
     for (size_t i = 0; i < m_distribution.size(); ++i) {
         if (!m_distribution.at(i)->attached())
             m_distribution.at(i)->attach(context);
@@ -66,23 +64,26 @@
 
 void InsertionPoint::detach(const AttachContext& context)
 {
-    if (ShadowRoot* shadowRoot = containingShadowRoot())
-        shadowRoot->host()->ensureDistribution();
-
-    for (size_t i = 0; i < m_distribution.size(); ++i)
-        m_distribution.at(i)->detach(context);
+    for (size_t i = 0; i < m_distribution.size(); ++i) {
+        if (m_distribution.at(i)->attached())
+            m_distribution.at(i)->detach(context);
+    }
 
     HTMLElement::detach(context);
 }
 
+void InsertionPoint::lazyAttachDistribution(ShouldSetAttached shouldSetAttached)
+{
+    for (size_t i = 0; i < m_distribution.size(); ++i)
+        m_distribution.at(i)->lazyAttach(shouldSetAttached);
+}
+
 void InsertionPoint::willRecalcStyle(StyleChange change)
 {
     if (change < Inherit)
         return;
-    if (ShadowRoot* shadowRoot = containingShadowRoot()) {
-        shadowRoot->host()->ensureDistribution();
-        shadowRoot->owner()->distributor().setNeedsStyleRecalcIfDistributedTo(this);
-    }
+    for (size_t i = 0; i < m_distribution.size(); ++i)
+        m_distribution.at(i)->setNeedsStyleRecalc(LocalStyleChange);
 }
 
 bool InsertionPoint::shouldUseFallbackElements() const
@@ -104,13 +105,11 @@
     return true;
 }
 
-PassRefPtr<NodeList> InsertionPoint::getDistributedNodes() const
+PassRefPtr<NodeList> InsertionPoint::getDistributedNodes()
 {
-    if (ShadowRoot* shadowRoot = containingShadowRoot())
-        shadowRoot->host()->ensureDistribution();
+    document()->updateDistributionForNodeIfNeeded(this);
 
     Vector<RefPtr<Node> > nodes;
-
     for (size_t i = 0; i < m_distribution.size(); ++i)
         nodes.append(m_distribution.at(i));
 
@@ -125,9 +124,10 @@
 void InsertionPoint::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
     HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-    if (ShadowRoot* root = containingShadowRoot())
+    if (ShadowRoot* root = containingShadowRoot()) {
         if (ElementShadow* rootOwner = root->owner())
-            rootOwner->invalidateDistribution();
+            rootOwner->setNeedsDistributionRecalc();
+    }
 }
 
 Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* insertionPoint)
@@ -136,7 +136,7 @@
 
     if (ShadowRoot* root = containingShadowRoot()) {
         if (ElementShadow* rootOwner = root->owner()) {
-            rootOwner->distributor().didShadowBoundaryChange(root->host());
+            rootOwner->setNeedsDistributionRecalc();
             if (isActive() && !m_registeredWithShadowRoot && insertionPoint->treeScope()->rootNode() == root) {
                 m_registeredWithShadowRoot = true;
                 root->ensureScopeDistribution()->registerInsertionPoint(this);
@@ -155,10 +155,13 @@
     if (!root)
         root = insertionPoint->containingShadowRoot();
 
+    if (root) {
+        if (ElementShadow* rootOwner = root->owner())
+            rootOwner->setNeedsDistributionRecalc();
+    }
+
     // host can be null when removedFrom() is called from ElementShadow destructor.
     ElementShadow* rootOwner = root ? root->owner() : 0;
-    if (rootOwner)
-        rootOwner->invalidateDistribution();
 
     // Since this insertion point is no longer visible from the shadow subtree, it need to clean itself up.
     clearDistribution();
@@ -207,9 +210,6 @@
 
     while (current) {
         if (ElementShadow* shadow = shadowOfParentForDistribution(current)) {
-            shadow->host()->ensureDistribution();
-            if (ShadowRoot* root = current->containingShadowRoot())
-                root->host()->ensureDistribution();
             if (InsertionPoint* insertedTo = shadow->distributor().findInsertionPointFor(projectedNode)) {
                 current = insertedTo;
                 insertionPoint = insertedTo;
@@ -236,8 +236,6 @@
     const Node* current = node;
     while (true) {
         if (ElementShadow* shadow = shadowOfParentForDistribution(current)) {
-            if (ShadowRoot* root = current->containingShadowRoot())
-                root->host()->ensureDistribution();
             if (InsertionPoint* insertedTo = shadow->distributor().findInsertionPointFor(node)) {
                 current = insertedTo;
                 results.append(insertedTo);
diff --git a/Source/core/dom/shadow/InsertionPoint.h b/Source/core/dom/shadow/InsertionPoint.h
index 7100234..4fa3c5f 100644
--- a/Source/core/dom/shadow/InsertionPoint.h
+++ b/Source/core/dom/shadow/InsertionPoint.h
@@ -54,7 +54,7 @@
     void clearDistribution() { m_distribution.clear(); }
     bool isActive() const;
 
-    PassRefPtr<NodeList> getDistributedNodes() const;
+    PassRefPtr<NodeList> getDistributedNodes();
 
     virtual MatchType matchTypeFor(Node*) { return AlwaysMatches; }
     virtual const CSSSelectorList& selectorList() { return emptySelectorList(); }
@@ -77,6 +77,8 @@
 
     static const CSSSelectorList& emptySelectorList();
 
+    void lazyAttachDistribution(ShouldSetAttached);
+
 protected:
     InsertionPoint(const QualifiedName&, Document*);
     virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index a897eb9..b993e91 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -273,11 +273,11 @@
 
 void ShadowRoot::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    if (isOrphan())
-        return;
-
     ContainerNode::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-    owner()->invalidateDistribution();
+    if (InsertionPoint* point = insertionPoint()) {
+        if (ShadowRoot* root = point->containingShadowRoot())
+            root->owner()->setNeedsDistributionRecalc();
+    }
 }
 
 void ShadowRoot::registerScopedHTMLStyleChild()
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
index 82e5cd2..9491554 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -697,15 +697,19 @@
         return triStateOfStyle(EditingStyle::styleAtSelectionStart(selection).get());
 
     TriState state = FalseTriState;
+    bool nodeIsStart = true;
     for (Node* node = selection.start().deprecatedNode(); node; node = NodeTraversal::next(node)) {
-        RefPtr<CSSComputedStyleDeclaration> nodeStyle = CSSComputedStyleDeclaration::create(node);
-        if (nodeStyle) {
-            TriState nodeState = triStateOfStyle(nodeStyle.get(), node->isTextNode() ? EditingStyle::DoNotIgnoreTextOnlyProperties : EditingStyle::IgnoreTextOnlyProperties);
-            if (node == selection.start().deprecatedNode())
-                state = nodeState;
-            else if (state != nodeState && node->isTextNode()) {
-                state = MixedTriState;
-                break;
+        if (node->renderer() && node->rendererIsEditable()) {
+            RefPtr<CSSComputedStyleDeclaration> nodeStyle = CSSComputedStyleDeclaration::create(node);
+            if (nodeStyle) {
+                TriState nodeState = triStateOfStyle(nodeStyle.get(), node->isTextNode() ? EditingStyle::DoNotIgnoreTextOnlyProperties : EditingStyle::IgnoreTextOnlyProperties);
+                if (nodeIsStart) {
+                    state = nodeState;
+                    nodeIsStart = false;
+                } else if (state != nodeState && node->isTextNode()) {
+                    state = MixedTriState;
+                    break;
+                }
             }
         }
         if (node == selection.end().deprecatedNode())
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index 9bbc1f1..a8f90e5 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -62,6 +62,7 @@
 #include "core/editing/htmlediting.h"
 #include "core/editing/markup.h"
 #include "core/html/HTMLImageElement.h"
+#include "core/html/HTMLInputElement.h"
 #include "core/html/HTMLTextAreaElement.h"
 #include "core/loader/cache/ResourceFetcher.h"
 #include "core/page/EditorClient.h"
@@ -87,6 +88,16 @@
 using namespace WTF;
 using namespace Unicode;
 
+namespace {
+
+bool isSelectionInTextField(const VisibleSelection& selection)
+{
+    HTMLTextFormControlElement* textControl = enclosingTextFormControl(selection.start());
+    return textControl && textControl->hasTagName(inputTag) && toHTMLInputElement(textControl)->isTextField();
+}
+
+} // namespace
+
 // When an event handler has moved the selection outside of a text control
 // we should use the target control's selection for this editing operation.
 VisibleSelection Editor::selectionForCommand(Event* event)
@@ -2075,8 +2086,30 @@
     m_frame->selection()->setTypingStyle(typingStyle);
 }
 
+
+void Editor::textFieldDidBeginEditing(Element* e)
+{
+    if (isContinuousSpellCheckingEnabled()) {
+        Element* element = toHTMLTextFormControlElement(e)->innerTextElement();
+        VisibleSelection selection = VisibleSelection::selectionFromContentsOfNode(element);
+        markMisspellingsAndBadGrammar(selection);
+    }
+}
+
 void Editor::textFieldDidEndEditing(Element* e)
 {
+    // Remove markers when deactivating a selection in an <input type="text"/>.
+    // Prevent new ones from appearing too.
+    m_spellChecker->cancelCheck();
+    HTMLTextFormControlElement* textFormControlElement = toHTMLTextFormControlElement(e);
+    HTMLElement* innerText = textFormControlElement->innerTextElement();
+    DocumentMarker::MarkerTypes markerTypes(DocumentMarker::Spelling);
+    if (isGrammarCheckingEnabled() || unifiedTextCheckerEnabled())
+        markerTypes.add(DocumentMarker::Grammar);
+    for (Node* node = innerText; node; node = NodeTraversal::next(node, innerText)) {
+        m_frame->document()->markers()->removeMarkers(node, markerTypes);
+    }
+
     if (client())
         client()->textFieldDidEndEditing(e);
 }
@@ -2252,7 +2285,12 @@
         // When typing we check spelling elsewhere, so don't redo it here.
         // If this is a change in selection resulting from a delete operation,
         // oldSelection may no longer be in the document.
-        if (shouldCheckSpellingAndGrammar && closeTyping && oldSelection.isContentEditable() && oldSelection.start().deprecatedNode() && oldSelection.start().anchorNode()->inDocument()) {
+        if (shouldCheckSpellingAndGrammar
+            && closeTyping
+            && oldSelection.isContentEditable()
+            && oldSelection.start().deprecatedNode()
+            && oldSelection.start().anchorNode()->inDocument()
+            && !isSelectionInTextField(oldSelection)) {
             VisiblePosition oldStart(oldSelection.visibleStart());
             VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary));
             if (oldAdjacentWords != newAdjacentWords) {
diff --git a/Source/core/editing/Editor.h b/Source/core/editing/Editor.h
index e78c9c0..60cd398 100644
--- a/Source/core/editing/Editor.h
+++ b/Source/core/editing/Editor.h
@@ -313,6 +313,7 @@
     bool markedTextMatchesAreHighlighted() const;
     void setMarkedTextMatchesAreHighlighted(bool);
 
+    void textFieldDidBeginEditing(Element*);
     void textFieldDidEndEditing(Element*);
     void textDidChangeInTextField(Element*);
     bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*);
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index 17bdd23..1661a07 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -259,7 +259,7 @@
     if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focusedElement->rendererIsEditable()))
         return 0;
     int height = std::min<int>(toRenderBox(renderer)->clientHeight(), frame->view()->visibleHeight());
-    return static_cast<unsigned>(max(max<int>(height * Scrollbar::minFractionToStepWhenPaging(), height - Scrollbar::maxOverlapBetweenPages()), 1));
+    return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFractionToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1));
 }
 
 static RefPtr<Range> unionDOMRanges(Range* a, Range* b)
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index 9603d24..97c1fd8 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -191,8 +191,6 @@
 
 void SpellChecker::cancelCheck()
 {
-    if (!m_requestQueue.isEmpty())
-        m_requestQueue.clear();
     if (m_processingRequest)
         m_processingRequest->didCancel();
 }
diff --git a/Source/core/editing/VisiblePosition.cpp b/Source/core/editing/VisiblePosition.cpp
index 0aafd6c..38ad01f 100644
--- a/Source/core/editing/VisiblePosition.cpp
+++ b/Source/core/editing/VisiblePosition.cpp
@@ -50,6 +50,11 @@
     init(pos, affinity);
 }
 
+VisiblePosition::VisiblePosition(const PositionWithAffinity& positionWithAffinity)
+{
+    init(positionWithAffinity.position(), positionWithAffinity.affinity());
+}
+
 void VisiblePosition::init(const Position& position, EAffinity affinity)
 {
     m_affinity = affinity;
diff --git a/Source/core/editing/VisiblePosition.h b/Source/core/editing/VisiblePosition.h
index 4b2dd42..85b6bac 100644
--- a/Source/core/editing/VisiblePosition.h
+++ b/Source/core/editing/VisiblePosition.h
@@ -54,6 +54,7 @@
     // otherwise it will be converted to DOWNSTREAM
     VisiblePosition() : m_affinity(VP_DEFAULT_AFFINITY) { }
     VisiblePosition(const Position&, EAffinity = VP_DEFAULT_AFFINITY);
+    explicit VisiblePosition(const PositionWithAffinity&);
 
     void clear() { m_deepPosition.clear(); }
 
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index f31895c..a259177 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -643,7 +643,7 @@
         targetNode = editableElement;
     }
 
-    return targetNode->renderer()->positionForPoint(selectionEndPoint);
+    return VisiblePosition(targetNode->renderer()->positionForPoint(selectionEndPoint));
 }
 
 
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
index 025745f..1895013 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -963,7 +963,7 @@
         Node* node = renderer->node();
         if (node && editingIgnoresContent(node))
             return positionInParentBeforeNode(node);
-        return renderer->positionForPoint(pointInLine);
+        return VisiblePosition(renderer->positionForPoint(pointInLine));
     }
 
     // Could not find a previous line. This means we must already be on the first line.
@@ -1021,7 +1021,7 @@
         Node* node = renderer->node();
         if (node && editingIgnoresContent(node))
             return positionInParentBeforeNode(node);
-        return renderer->positionForPoint(pointInLine);
+        return VisiblePosition(renderer->positionForPoint(pointInLine));
     }
 
     // Could not find a next line. This means we must already be on the last line.
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 756ee45..5a399f1 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -52,6 +52,7 @@
 #include "core/rendering/RenderObject.h"
 #include "wtf/Assertions.h"
 #include "wtf/StdLibExtras.h"
+#include "wtf/text/StringBuilder.h"
 #include "wtf/unicode/CharacterNames.h"
 
 using namespace std;
@@ -355,27 +356,32 @@
 
 String stringWithRebalancedWhitespace(const String& string, bool startIsStartOfParagraph, bool endIsEndOfParagraph)
 {
-    Vector<UChar> rebalancedString;
-    append(rebalancedString, string);
+    unsigned length = string.length();
+
+    StringBuilder rebalancedString;
+    rebalancedString.reserveCapacity(length);
 
     bool previousCharacterWasSpace = false;
-    for (size_t i = 0; i < rebalancedString.size(); i++) {
-        if (!isWhitespace(rebalancedString[i])) {
+    for (size_t i = 0; i < length; i++) {
+        UChar c = string[i];
+        if (!isWhitespace(c)) {
+            rebalancedString.append(c);
             previousCharacterWasSpace = false;
             continue;
         }
 
-        if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i + 1 == rebalancedString.size() && endIsEndOfParagraph)) {
-            rebalancedString[i] = noBreakSpace;
+        if (previousCharacterWasSpace || (!i && startIsStartOfParagraph) || (i + 1 == length && endIsEndOfParagraph)) {
+            rebalancedString.append(noBreakSpace);
             previousCharacterWasSpace = false;
         } else {
-            rebalancedString[i] = ' ';
+            rebalancedString.append(' ');
             previousCharacterWasSpace = true;
         }
-
     }
 
-    return String::adopt(rebalancedString);
+    ASSERT(rebalancedString.length() == length);
+
+    return rebalancedString.toString();
 }
 
 bool isTableStructureNode(const Node *node)
diff --git a/Source/core/fileapi/BlobRegistry.cpp b/Source/core/fileapi/BlobRegistry.cpp
index 1d825b5..b25f7b4 100644
--- a/Source/core/fileapi/BlobRegistry.cpp
+++ b/Source/core/fileapi/BlobRegistry.cpp
@@ -117,6 +117,21 @@
     return *map;
 }
 
+static void saveToOriginMap(SecurityOrigin* origin, const KURL& url)
+{
+    // If the blob URL contains null origin, as in the context with unique
+    // security origin or file URL, save the mapping between url and origin so
+    // that the origin can be retrived when doing security origin check.
+    if (origin && BlobURL::getOrigin(url) == "null")
+        originMap()->add(url.string(), origin);
+}
+
+static void removeFromOriginMap(const KURL& url)
+{
+    if (BlobURL::getOrigin(url) == "null")
+        originMap()->remove(url.string());
+}
+
 static void registerBlobURLTask(void* context)
 {
     OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
@@ -139,6 +154,46 @@
     }
 }
 
+static void registerBlobURLFromTask(void* context)
+{
+    OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+    if (WebBlobRegistry* registry = blobRegistry())
+        registry->registerBlobURL(blobRegistryContext->url, blobRegistryContext->srcURL);
+}
+
+void BlobRegistry::registerBlobURL(SecurityOrigin* origin, const KURL& url, const KURL& srcURL)
+{
+    saveToOriginMap(origin, url);
+
+    if (isMainThread()) {
+        if (WebBlobRegistry* registry = blobRegistry())
+            registry->registerBlobURL(url, srcURL);
+    } else {
+        OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url, srcURL));
+        callOnMainThread(&registerBlobURLFromTask, context.leakPtr());
+    }
+}
+
+static void unregisterBlobURLTask(void* context)
+{
+    OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+    if (WebBlobRegistry* registry = blobRegistry())
+        registry->unregisterBlobURL(blobRegistryContext->url);
+}
+
+void BlobRegistry::unregisterBlobURL(const KURL& url)
+{
+    removeFromOriginMap(url);
+
+    if (isMainThread()) {
+        if (WebBlobRegistry* registry = blobRegistry())
+            registry->unregisterBlobURL(url);
+    } else {
+        OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url));
+        callOnMainThread(&unregisterBlobURLTask, context.leakPtr());
+    }
+}
+
 static void registerStreamURLTask(void* context)
 {
     OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
@@ -157,27 +212,23 @@
     }
 }
 
-static void registerBlobURLFromTask(void* context)
+static void registerStreamURLFromTask(void* context)
 {
     OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
     if (WebBlobRegistry* registry = blobRegistry())
-        registry->registerBlobURL(blobRegistryContext->url, blobRegistryContext->srcURL);
+        registry->registerStreamURL(blobRegistryContext->url, blobRegistryContext->srcURL);
 }
 
-void BlobRegistry::registerBlobURL(SecurityOrigin* origin, const KURL& url, const KURL& srcURL)
+void BlobRegistry::registerStreamURL(SecurityOrigin* origin, const KURL& url, const KURL& srcURL)
 {
-    // If the blob URL contains null origin, as in the context with unique
-    // security origin or file URL, save the mapping between url and origin so
-    // that the origin can be retrived when doing security origin check.
-    if (origin && BlobURL::getOrigin(url) == "null")
-        originMap()->add(url.string(), origin);
+    saveToOriginMap(origin, url);
 
     if (isMainThread()) {
         if (WebBlobRegistry* registry = blobRegistry())
-            registry->registerBlobURL(url, srcURL);
+            registry->registerStreamURL(url, srcURL);
     } else {
         OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url, srcURL));
-        callOnMainThread(&registerBlobURLFromTask, context.leakPtr());
+        callOnMainThread(&registerStreamURLFromTask, context.leakPtr());
     }
 }
 
@@ -221,24 +272,23 @@
     }
 }
 
-static void unregisterBlobURLTask(void* context)
+static void unregisterStreamURLTask(void* context)
 {
     OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
     if (WebBlobRegistry* registry = blobRegistry())
-        registry->unregisterBlobURL(blobRegistryContext->url);
+        registry->unregisterStreamURL(blobRegistryContext->url);
 }
 
-void BlobRegistry::unregisterBlobURL(const KURL& url)
+void BlobRegistry::unregisterStreamURL(const KURL& url)
 {
-    if (BlobURL::getOrigin(url) == "null")
-        originMap()->remove(url.string());
+    removeFromOriginMap(url);
 
     if (isMainThread()) {
         if (WebBlobRegistry* registry = blobRegistry())
-            registry->unregisterBlobURL(url);
+            registry->unregisterStreamURL(url);
     } else {
         OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url));
-        callOnMainThread(&unregisterBlobURLTask, context.leakPtr());
+        callOnMainThread(&unregisterStreamURLTask, context.leakPtr());
     }
 }
 
diff --git a/Source/core/fileapi/BlobRegistry.h b/Source/core/fileapi/BlobRegistry.h
index 5bed50b..45ac4b9 100644
--- a/Source/core/fileapi/BlobRegistry.h
+++ b/Source/core/fileapi/BlobRegistry.h
@@ -42,14 +42,23 @@
 class RawData;
 class SecurityOrigin;
 
+// A bridging class for calling WebKit::WebBlobRegistry methods on the main
+// thread. Each method gets the WebBlobRegistry implementation instance and
+// calls the corresponding method (the same name) on it using callOnMainThread()
+// if necessary.
 class BlobRegistry {
 public:
+    // Methods for controlling Blobs.
     static void registerBlobURL(const KURL&, PassOwnPtr<BlobData>);
-    static void registerStreamURL(const KURL&, const String&);
     static void registerBlobURL(SecurityOrigin*, const KURL&, const KURL& srcURL);
+    static void unregisterBlobURL(const KURL&);
+
+    // Methods for controlling Streams.
+    static void registerStreamURL(const KURL&, const String&);
+    static void registerStreamURL(SecurityOrigin*, const KURL&, const KURL& srcURL);
     static void addDataToStream(const KURL&, PassRefPtr<RawData>);
     static void finalizeStream(const KURL&);
-    static void unregisterBlobURL(const KURL&);
+    static void unregisterStreamURL(const KURL&);
 };
 
 } // namespace WebCore
diff --git a/Source/core/fileapi/Stream.cpp b/Source/core/fileapi/Stream.cpp
index 2400e2b..9dab48e 100644
--- a/Source/core/fileapi/Stream.cpp
+++ b/Source/core/fileapi/Stream.cpp
@@ -64,7 +64,7 @@
 
 Stream::~Stream()
 {
-    BlobRegistry::unregisterBlobURL(m_internalURL);
+    BlobRegistry::unregisterStreamURL(m_internalURL);
 }
 
 } // namespace WebCore
diff --git a/Source/core/generate_inspector_protocol_version.target.darwin-arm.mk b/Source/core/generate_inspector_protocol_version.target.darwin-arm.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.darwin-arm.mk
+++ b/Source/core/generate_inspector_protocol_version.target.darwin-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_inspector_protocol_version.target.darwin-mips.mk b/Source/core/generate_inspector_protocol_version.target.darwin-mips.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.darwin-mips.mk
+++ b/Source/core/generate_inspector_protocol_version.target.darwin-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_inspector_protocol_version.target.darwin-x86.mk b/Source/core/generate_inspector_protocol_version.target.darwin-x86.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.darwin-x86.mk
+++ b/Source/core/generate_inspector_protocol_version.target.darwin-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_inspector_protocol_version.target.linux-arm.mk b/Source/core/generate_inspector_protocol_version.target.linux-arm.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.linux-arm.mk
+++ b/Source/core/generate_inspector_protocol_version.target.linux-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_inspector_protocol_version.target.linux-mips.mk b/Source/core/generate_inspector_protocol_version.target.linux-mips.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.linux-mips.mk
+++ b/Source/core/generate_inspector_protocol_version.target.linux-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_inspector_protocol_version.target.linux-x86.mk b/Source/core/generate_inspector_protocol_version.target.linux-x86.mk
index 0ad8d92..4e020a9 100644
--- a/Source/core/generate_inspector_protocol_version.target.linux-x86.mk
+++ b/Source/core/generate_inspector_protocol_version.target.linux-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorProtocolVersion":
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/generate-inspector-protocol-version $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Validate inspector protocol for backwards compatibility and generate version file ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h" ../devtools/protocol.json
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/generate-inspector-protocol-version -o "$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h" ../devtools/protocol.json
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorProtocolVersion.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorProtocolVersion.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.darwin-arm.mk b/Source/core/generate_test_support_idls.target.darwin-arm.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.darwin-arm.mk
+++ b/Source/core/generate_test_support_idls.target.darwin-arm.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.darwin-mips.mk b/Source/core/generate_test_support_idls.target.darwin-mips.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.darwin-mips.mk
+++ b/Source/core/generate_test_support_idls.target.darwin-mips.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.darwin-x86.mk b/Source/core/generate_test_support_idls.target.darwin-x86.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.darwin-x86.mk
+++ b/Source/core/generate_test_support_idls.target.darwin-x86.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.linux-arm.mk b/Source/core/generate_test_support_idls.target.linux-arm.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.linux-arm.mk
+++ b/Source/core/generate_test_support_idls.target.linux-arm.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.linux-mips.mk b/Source/core/generate_test_support_idls.target.linux-mips.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.linux-mips.mk
+++ b/Source/core/generate_test_support_idls.target.linux-mips.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/generate_test_support_idls.target.linux-x86.mk b/Source/core/generate_test_support_idls.target.linux-x86.mk
index aa1c784..f0ea789 100644
--- a/Source/core/generate_test_support_idls.target.linux-x86.mk
+++ b/Source/core/generate_test_support_idls.target.linux-x86.mk
@@ -14,37 +14,37 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "Settings":
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/page/make_settings.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/page/Settings.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp" "$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h" -- page/make_settings.pl page/Settings.in
 
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
-$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
+$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h: $(gyp_shared_intermediate_dir)/blink/SettingsMacros.h ;
 
 ### Rules for action "InternalRuntimeFlags":
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_internal_runtime_flags.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/InternalRuntimeFlags.idl.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_InternalRuntimeFlags ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_internal_runtime_flags.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl ;
+$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h: $(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/SettingsMacros.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InternalSettingsGenerated.h \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.idl \
-	$(gyp_shared_intermediate_dir)/webkit/InternalRuntimeFlags.h
+	$(gyp_shared_intermediate_dir)/blink/SettingsMacros.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InternalSettingsGenerated.h \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.idl \
+	$(gyp_shared_intermediate_dir)/blink/InternalRuntimeFlags.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/html/BaseButtonInputType.cpp b/Source/core/html/BaseButtonInputType.cpp
index 868e235..fda94da 100644
--- a/Source/core/html/BaseButtonInputType.cpp
+++ b/Source/core/html/BaseButtonInputType.cpp
@@ -51,7 +51,7 @@
 
     virtual RenderText* createTextRenderer(RenderStyle*) OVERRIDE
     {
-        return new (document()->renderArena()) RenderTextFragment(this, dataImpl());
+        return new RenderTextFragment(this, dataImpl());
     }
 
 public:
@@ -88,7 +88,7 @@
 
 RenderObject* BaseButtonInputType::createRenderer(RenderStyle*) const
 {
-    return new (element()->document()->renderArena()) RenderButton(element());
+    return new RenderButton(element());
 }
 
 bool BaseButtonInputType::storesValueSeparateFromAttribute()
diff --git a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
index 94b8ea7..ac5c46f 100644
--- a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -321,10 +321,11 @@
 {
     ASSERT(element()->shadow());
 
-    // Element must not be attached here, because if it was attached
+    // Element must not have a renderer here, because if it did
     // DateTimeEditElement::customStyleForRenderer() is called in appendChild()
     // before the field wrapper element is created.
-    ASSERT(!element()->attached());
+    // FIXME: This code should not depend on such craziness.
+    ASSERT(!element()->renderer());
 
     Document* document = element()->document();
     ContainerNode* container = element()->userAgentShadowRoot();
@@ -378,7 +379,7 @@
         return;
     if (direction == FocusDirectionBackward) {
         if (element()->document()->page())
-            element()->document()->page()->focusController()->advanceFocus(direction, 0);
+            element()->document()->page()->focusController()->advanceFocus(direction);
     } else if (direction == FocusDirectionNone || direction == FocusDirectionMouse) {
         edit->focusByOwner(oldFocusedElement);
     } else
@@ -430,11 +431,6 @@
     return element()->value().isEmpty() && edit && edit->anyEditableFieldsHaveValues();
 }
 
-bool BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable(KeyboardEvent*) const
-{
-    return element()->isFocusable();
-}
-
 AtomicString BaseMultipleFieldsDateAndTimeInputType::localeIdentifier() const
 {
     return element()->computeInheritedLanguage();
diff --git a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.h b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.h
index 0c03377..0f990e6 100644
--- a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.h
+++ b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.h
@@ -97,7 +97,6 @@
     virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE FINAL;
     virtual bool hasBadInput() const OVERRIDE;
     virtual bool hasCustomFocusLogic() const OVERRIDE FINAL;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE FINAL;
     virtual void minOrMaxAttributeChanged() OVERRIDE FINAL;
     virtual void readonlyAttributeChanged() OVERRIDE FINAL;
     virtual void requiredAttributeChanged() OVERRIDE FINAL;
diff --git a/Source/core/html/FileInputType.cpp b/Source/core/html/FileInputType.cpp
index c8820eb..b63e46d 100644
--- a/Source/core/html/FileInputType.cpp
+++ b/Source/core/html/FileInputType.cpp
@@ -159,7 +159,7 @@
 
 RenderObject* FileInputType::createRenderer(RenderStyle*) const
 {
-    return new (element()->document()->renderArena()) RenderFileUploadControl(element());
+    return new RenderFileUploadControl(element());
 }
 
 bool FileInputType::canSetStringValue() const
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index 1ea7351..efbacc2 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -160,10 +160,10 @@
     return HTMLElement::isMouseFocusable();
 }
 
-bool HTMLAnchorElement::isKeyboardFocusable(KeyboardEvent* event) const
+bool HTMLAnchorElement::isKeyboardFocusable() const
 {
     if (!isLink())
-        return HTMLElement::isKeyboardFocusable(event);
+        return HTMLElement::isKeyboardFocusable();
 
     if (!isFocusable())
         return false;
@@ -282,8 +282,14 @@
     if (name == hrefAttr) {
         bool wasLink = isLink();
         setIsLink(!value.isNull());
-        if (wasLink != isLink())
+        if (wasLink != isLink()) {
             didAffectSelector(AffectedSelectorLink | AffectedSelectorVisited | AffectedSelectorEnabled);
+            if (wasLink && treeScope()->adjustedFocusedElement() == this) {
+                // We might want to call blur(), but it's dangerous to dispatch
+                // events here.
+                document()->setNeedsFocusedElementCheck();
+            }
+        }
         if (isLink()) {
             String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
             if (document()->isDNSPrefetchEnabled()) {
@@ -553,7 +559,7 @@
 
 void HTMLAnchorElement::sendPings(const KURL& destinationURL)
 {
-    if (!hasAttribute(pingAttr) || !document()->settings()->hyperlinkAuditingEnabled())
+    if (!hasAttribute(pingAttr) || !document()->settings() || !document()->settings()->hyperlinkAuditingEnabled())
         return;
 
     SpaceSplitString pingURLs(getAttribute(pingAttr), false);
diff --git a/Source/core/html/HTMLAnchorElement.h b/Source/core/html/HTMLAnchorElement.h
index 3687904..a118e5d 100644
--- a/Source/core/html/HTMLAnchorElement.h
+++ b/Source/core/html/HTMLAnchorElement.h
@@ -110,7 +110,7 @@
 private:
     virtual bool supportsFocus() const;
     virtual bool isMouseFocusable() const;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual void defaultEventHandler(Event*);
     virtual void setActive(bool active = true, bool pause = false);
     virtual void accessKeyAction(bool sendMouseEvents);
diff --git a/Source/core/html/HTMLAppletElement.cpp b/Source/core/html/HTMLAppletElement.cpp
index 94c8b9f..dd37461 100644
--- a/Source/core/html/HTMLAppletElement.cpp
+++ b/Source/core/html/HTMLAppletElement.cpp
@@ -80,7 +80,7 @@
     if (!canEmbedJava())
         return RenderObject::createObject(this, style);
 
-    return new (document()->renderArena()) RenderApplet(this);
+    return new RenderApplet(this);
 }
 
 RenderWidget* HTMLAppletElement::renderWidgetForJSBindings() const
diff --git a/Source/core/html/HTMLAppletElement.h b/Source/core/html/HTMLAppletElement.h
index 179317b..03ebbdb 100644
--- a/Source/core/html/HTMLAppletElement.h
+++ b/Source/core/html/HTMLAppletElement.h
@@ -43,9 +43,6 @@
     virtual void updateWidget(PluginCreationOption) OVERRIDE;
 
     bool canEmbedJava() const;
-
-    virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
-    virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true; }
 };
 
 }
diff --git a/Source/core/html/HTMLAreaElement.cpp b/Source/core/html/HTMLAreaElement.cpp
index c105381..780e412 100644
--- a/Source/core/html/HTMLAreaElement.cpp
+++ b/Source/core/html/HTMLAreaElement.cpp
@@ -191,7 +191,7 @@
     return toHTMLMapElement(mapElement)->imageElement();
 }
 
-bool HTMLAreaElement::isKeyboardFocusable(KeyboardEvent*) const
+bool HTMLAreaElement::isKeyboardFocusable() const
 {
     return isFocusable();
 }
diff --git a/Source/core/html/HTMLAreaElement.h b/Source/core/html/HTMLAreaElement.h
index dd02949..f00dde1 100644
--- a/Source/core/html/HTMLAreaElement.h
+++ b/Source/core/html/HTMLAreaElement.h
@@ -52,7 +52,7 @@
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual bool supportsFocus() const;
     virtual String target() const;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool isMouseFocusable() const;
     virtual bool rendererIsFocusable() const OVERRIDE;
     virtual void updateFocusAppearance(bool /*restorePreviousSelection*/);
diff --git a/Source/core/html/HTMLAttributeNames.in b/Source/core/html/HTMLAttributeNames.in
index cc3c0cd..7ca6ac1 100644
--- a/Source/core/html/HTMLAttributeNames.in
+++ b/Source/core/html/HTMLAttributeNames.in
@@ -267,6 +267,7 @@
 onwebkittransitionend
 open
 optimum
+part
 pattern
 placeholder
 pluginspage
diff --git a/Source/core/html/HTMLBRElement.cpp b/Source/core/html/HTMLBRElement.cpp
index 7113519..a869c87 100644
--- a/Source/core/html/HTMLBRElement.cpp
+++ b/Source/core/html/HTMLBRElement.cpp
@@ -76,7 +76,7 @@
     if (style->hasContent())
         return RenderObject::createObject(this, style);
 
-    return new (document()->renderArena()) RenderBR(this);
+    return new RenderBR(this);
 }
 
 }
diff --git a/Source/core/html/HTMLButtonElement.cpp b/Source/core/html/HTMLButtonElement.cpp
index 4ab7d19..0f55e0e 100644
--- a/Source/core/html/HTMLButtonElement.cpp
+++ b/Source/core/html/HTMLButtonElement.cpp
@@ -60,7 +60,7 @@
 
 RenderObject* HTMLButtonElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderButton(this);
+    return new RenderButton(this);
 }
 
 const AtomicString& HTMLButtonElement::formControlType() const
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp
index 898ccd6..55b386c 100644
--- a/Source/core/html/HTMLCanvasElement.cpp
+++ b/Source/core/html/HTMLCanvasElement.cpp
@@ -75,6 +75,7 @@
     , m_hasCreatedImageBuffer(false)
     , m_didClearImageBuffer(false)
     , m_accelerationDisabled(false)
+    , m_externallyAllocatedMemory(0)
 {
     ASSERT(hasTagName(canvasTag));
     ScriptWrappable::init(this);
@@ -92,6 +93,7 @@
 
 HTMLCanvasElement::~HTMLCanvasElement()
 {
+    setExternallyAllocatedMemory(0);
     HashSet<CanvasObserver*>::iterator end = m_observers.end();
     for (HashSet<CanvasObserver*>::iterator it = m_observers.begin(); it != end; ++it)
         (*it)->canvasDestroyed(this);
@@ -111,7 +113,7 @@
     Frame* frame = document()->frame();
     if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript)) {
         m_rendererIsCanvas = true;
-        return new (document()->renderArena()) RenderHTMLCanvas(this);
+        return new RenderHTMLCanvas(this);
     }
 
     m_rendererIsCanvas = false;
@@ -351,6 +353,7 @@
     m_hasCreatedImageBuffer = false;
     m_contextStateSaver.clear();
     m_imageBuffer.clear();
+    setExternallyAllocatedMemory(0);
     clearCopiedImage();
 }
 
@@ -488,6 +491,7 @@
     m_imageBuffer = ImageBuffer::create(size(), m_deviceScaleFactor, renderingMode, opacityMode);
     if (!m_imageBuffer)
         return;
+    setExternallyAllocatedMemory(4 * width() * height());
     m_imageBuffer->context()->setImageInterpolationQuality(DefaultInterpolationQuality);
     if (document()->settings() && !document()->settings()->antialiased2dCanvasEnabled())
         m_imageBuffer->context()->setShouldAntialias(false);
@@ -502,6 +506,12 @@
         scheduleLayerUpdate();
 }
 
+void HTMLCanvasElement::setExternallyAllocatedMemory(intptr_t externallyAllocatedMemory)
+{
+    v8::V8::AdjustAmountOfExternalAllocatedMemory(externallyAllocatedMemory - m_externallyAllocatedMemory);
+    m_externallyAllocatedMemory = externallyAllocatedMemory;
+}
+
 GraphicsContext* HTMLCanvasElement::drawingContext() const
 {
     return buffer() ? m_imageBuffer->context() : 0;
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
index 3d31d77..0589e4c 100644
--- a/Source/core/html/HTMLCanvasElement.h
+++ b/Source/core/html/HTMLCanvasElement.h
@@ -150,6 +150,8 @@
 
     bool paintsIntoCanvasBuffer() const;
 
+    void setExternallyAllocatedMemory(intptr_t);
+
     HashSet<CanvasObserver*> m_observers;
 
     IntSize m_size;
@@ -162,6 +164,8 @@
     bool m_accelerationDisabled;
     FloatRect m_dirtyRect;
 
+    intptr_t m_externallyAllocatedMemory;
+
     float m_deviceScaleFactor; // FIXME: This is always 1 and should probable be deleted
     bool m_originClean;
 
diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp
index 613c57a..7bf3bed 100644
--- a/Source/core/html/HTMLCollection.cpp
+++ b/Source/core/html/HTMLCollection.cpp
@@ -29,6 +29,7 @@
 #include "core/dom/NodeRareData.h"
 #include "core/dom/NodeTraversal.h"
 #include "core/html/HTMLElement.h"
+#include "core/html/HTMLNameCollection.h"
 #include "core/html/HTMLObjectElement.h"
 #include "core/html/HTMLOptionElement.h"
 
@@ -221,10 +222,12 @@
     case DocAll:
     case NodeChildren:
         return true;
-    case FormControls:
     case DocumentNamedItems:
-    case TableRows:
+        return static_cast<const DocumentNameCollection*>(htmlCollection)->nodeMatches(element);
     case WindowNamedItems:
+        return static_cast<const WindowNameCollection*>(htmlCollection)->nodeMatches(element);
+    case FormControls:
+    case TableRows:
     case ChildNodeListType:
     case ClassNodeListType:
     case NameNodeListType:
@@ -507,21 +510,6 @@
         || element->hasLocalName(selectTag);
 }
 
-bool HTMLCollection::checkForNameMatch(Element* element, bool checkName, const AtomicString& name) const
-{
-    if (!element->isHTMLElement())
-        return false;
-
-    HTMLElement* e = toHTMLElement(element);
-    if (!checkName)
-        return e->getIdAttribute() == name;
-
-    if (type() == DocAll && !nameShouldBeVisibleInDocumentAll(e))
-        return false;
-
-    return e->getNameAttribute() == name && e->getIdAttribute() != name;
-}
-
 inline Element* firstMatchingChildElement(const HTMLCollection* nodeList, ContainerNode* root)
 {
     Element* element = ElementTraversal::firstWithin(root);
@@ -588,26 +576,42 @@
     // that are allowed a name attribute.
 
     ContainerNode* root = rootContainerNode();
-    if (!root)
+    if (name.isEmpty() || !root)
         return 0;
 
-    unsigned arrayOffset = 0;
-    unsigned i = 0;
-    for (Element* element = traverseFirstElement(arrayOffset, root); element; element = traverseNextElement(arrayOffset, element, root)) {
-        if (checkForNameMatch(element, /* checkName */ false, name)) {
-            setItemCache(element, i, arrayOffset);
-            return element;
+    if (!overridesItemAfter() && root->isInTreeScope()) {
+        TreeScope* treeScope = root->treeScope();
+        Element* candidate = 0;
+        if (treeScope->hasElementWithId(name)) {
+            if (!treeScope->containsMultipleElementsWithId(name))
+                candidate = treeScope->getElementById(name);
+        } else if (treeScope->hasElementWithName(name)) {
+            if (!treeScope->containsMultipleElementsWithName(name)) {
+                candidate = treeScope->getElementByName(name);
+                if (candidate && type() == DocAll && (!candidate->isHTMLElement() || !nameShouldBeVisibleInDocumentAll(toHTMLElement(candidate))))
+                    candidate = 0;
+            }
+        } else {
+            return 0;
         }
-        i++;
+
+        if (candidate
+            && isMatchingElement(this, candidate)
+            && (shouldOnlyIncludeDirectChildren() ? candidate->parentNode() == root : candidate->isDescendantOf(root)))
+            return candidate;
     }
 
-    i = 0;
-    for (Element* element = traverseFirstElement(arrayOffset, root); element; element = traverseNextElement(arrayOffset, element, root)) {
-        if (checkForNameMatch(element, /* checkName */ true, name)) {
-            setItemCache(element, i, arrayOffset);
-            return element;
-        }
-        i++;
+    // The pathological case. We need to walk the entire subtree.
+    updateNameCache();
+
+    if (Vector<Element*>* idResults = idCache(name)) {
+        if (idResults->size())
+            return idResults->at(0);
+    }
+
+    if (Vector<Element*>* nameResults = nameCache(name)) {
+        if (nameResults->size())
+            return nameResults->at(0);
     }
 
     return 0;
@@ -640,22 +644,8 @@
 
 bool HTMLCollection::hasNamedItem(const AtomicString& name) const
 {
-    if (name.isEmpty())
-        return false;
-
-    updateNameCache();
-
-    if (Vector<Element*>* cache = idCache(name)) {
-        if (!cache->isEmpty())
-            return true;
-    }
-
-    if (Vector<Element*>* cache = nameCache(name)) {
-        if (!cache->isEmpty())
-            return true;
-    }
-
-    return false;
+    // FIXME: We can do better when there are multiple elements of the same name.
+    return namedItem(name);
 }
 
 void HTMLCollection::namedItems(const AtomicString& name, Vector<RefPtr<Node> >& result) const
diff --git a/Source/core/html/HTMLCollection.h b/Source/core/html/HTMLCollection.h
index 585cd9e..e11029d 100644
--- a/Source/core/html/HTMLCollection.h
+++ b/Source/core/html/HTMLCollection.h
@@ -77,7 +77,6 @@
     void appendNameCache(const AtomicString& name, Element* element) const { append(m_nameCache, name, element); }
 
 private:
-    bool checkForNameMatch(Element*, bool checkName, const AtomicString& name) const;
     Element* traverseNextElement(unsigned& offsetInArray, Element* previous, ContainerNode* root) const;
 
     virtual bool isLiveNodeList() const OVERRIDE { ASSERT_NOT_REACHED(); return true; }
diff --git a/Source/core/html/HTMLDetailsElement.cpp b/Source/core/html/HTMLDetailsElement.cpp
index 4b6e3fd..c0e1f9e 100644
--- a/Source/core/html/HTMLDetailsElement.cpp
+++ b/Source/core/html/HTMLDetailsElement.cpp
@@ -57,7 +57,7 @@
 
 RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderBlock(this);
+    return new RenderBlock(this);
 }
 
 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot* root)
diff --git a/Source/core/html/HTMLDetailsElement.h b/Source/core/html/HTMLDetailsElement.h
index ea0ffbe..a9178f9 100644
--- a/Source/core/html/HTMLDetailsElement.h
+++ b/Source/core/html/HTMLDetailsElement.h
@@ -38,7 +38,7 @@
     virtual RenderObject* createRenderer(RenderStyle*);
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-
+    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
     virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
 
     bool m_isOpen;
diff --git a/Source/core/html/HTMLDocument.cpp b/Source/core/html/HTMLDocument.cpp
index 33f5417..abbbe00 100644
--- a/Source/core/html/HTMLDocument.cpp
+++ b/Source/core/html/HTMLDocument.cpp
@@ -220,44 +220,6 @@
 // not part of the DOM
 // --------------------------------------------------------------------------
 
-void HTMLDocument::addItemToMap(HashCountedSet<StringImpl*>& map, const AtomicString& name)
-{
-    if (name.isEmpty())
-        return;
-    map.add(name.impl());
-    if (Frame* f = frame())
-        f->script()->namedItemAdded(this, name);
-}
-
-void HTMLDocument::removeItemFromMap(HashCountedSet<StringImpl*>& map, const AtomicString& name)
-{
-    if (name.isEmpty())
-        return;
-    map.remove(name.impl());
-    if (Frame* f = frame())
-        f->script()->namedItemRemoved(this, name);
-}
-
-void HTMLDocument::addNamedItem(const AtomicString& name)
-{
-    addItemToMap(m_namedItemCounts, name);
-}
-
-void HTMLDocument::removeNamedItem(const AtomicString& name)
-{
-    removeItemFromMap(m_namedItemCounts, name);
-}
-
-void HTMLDocument::addExtraNamedItem(const AtomicString& name)
-{
-    addItemToMap(m_extraNamedItemCounts, name);
-}
-
-void HTMLDocument::removeExtraNamedItem(const AtomicString& name)
-{
-    removeItemFromMap(m_extraNamedItemCounts, name);
-}
-
 static void addLocalNameToSet(HashSet<StringImpl*>* set, const QualifiedName& qName)
 {
     set->add(qName.localName().impl());
@@ -325,6 +287,20 @@
     return !isPossibleHTMLAttr || !htmlCaseInsensitiveAttributesSet->contains(attributeName.localName().impl());
 }
 
+void HTMLDocument::addNamedDocumentItem(const AtomicString& key, Element* element)
+{
+    m_documentNamedItem.add(key.impl(), element);
+    if (Frame* frame = this->frame())
+        frame->script()->namedItemAdded(this, key);
+}
+
+void HTMLDocument::removeNamedDocumentItem(const AtomicString& key, Element* element)
+{
+    m_documentNamedItem.remove(key.impl(), element);
+    if (Frame* frame = this->frame())
+        frame->script()->namedItemRemoved(this, key);
+}
+
 void HTMLDocument::clear()
 {
     // FIXME: This does nothing, and that seems unlikely to be correct.
diff --git a/Source/core/html/HTMLDocument.h b/Source/core/html/HTMLDocument.h
index 6a8dc27..0714b6d 100644
--- a/Source/core/html/HTMLDocument.h
+++ b/Source/core/html/HTMLDocument.h
@@ -63,13 +63,14 @@
 
     void clear();
 
-    void addNamedItem(const AtomicString& name);
-    void removeNamedItem(const AtomicString& name);
-    bool hasNamedItem(StringImpl* name);
+    void captureEvents() { }
+    void releaseEvents() { }
 
-    void addExtraNamedItem(const AtomicString& name);
-    void removeExtraNamedItem(const AtomicString& name);
-    bool hasExtraNamedItem(StringImpl* name);
+    DocumentOrderedMap& windowNamedItemMap() { return m_windowNamedItem; }
+
+    void addNamedDocumentItem(const AtomicString&, Element*);
+    void removeNamedDocumentItem(const AtomicString&, Element*);
+    DocumentOrderedMap& documentNamedItemMap() { return m_documentNamedItem; }
 
     static bool isCaseSensitiveAttribute(const QualifiedName&);
 
@@ -78,25 +79,11 @@
 
 private:
     HTMLBodyElement* bodyAsHTMLBodyElement() const;
-    void addItemToMap(HashCountedSet<StringImpl*>&, const AtomicString&);
-    void removeItemFromMap(HashCountedSet<StringImpl*>&, const AtomicString&);
 
-    HashCountedSet<StringImpl*> m_namedItemCounts;
-    HashCountedSet<StringImpl*> m_extraNamedItemCounts;
+    DocumentOrderedMap m_documentNamedItem;
+    DocumentOrderedMap m_windowNamedItem;
 };
 
-inline bool HTMLDocument::hasNamedItem(StringImpl* name)
-{
-    ASSERT(name);
-    return m_namedItemCounts.contains(name);
-}
-
-inline bool HTMLDocument::hasExtraNamedItem(StringImpl* name)
-{
-    ASSERT(name);
-    return m_extraNamedItemCounts.contains(name);
-}
-
 inline HTMLDocument* toHTMLDocument(Document* document)
 {
     ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument());
diff --git a/Source/core/html/HTMLDocument.idl b/Source/core/html/HTMLDocument.idl
index 860900f..574f21b 100644
--- a/Source/core/html/HTMLDocument.idl
+++ b/Source/core/html/HTMLDocument.idl
@@ -36,6 +36,9 @@
 
     [DeprecateAs=DocumentClear] void clear();
 
+    [DeprecateAs=CaptureEvents] void captureEvents();
+    [DeprecateAs=ReleaseEvents] void releaseEvents();
+
     [TreatNullAs=NullString] attribute DOMString dir;
     [TreatNullAs=NullString] attribute DOMString designMode;
     readonly attribute DOMString compatMode;
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 747a9cf..b1538f4 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -287,9 +287,14 @@
         dirAttributeChanged(value);
     else if (name == tabindexAttr) {
         int tabindex = 0;
-        if (value.isEmpty())
+        if (value.isEmpty()) {
             clearTabIndexExplicitlyIfNeeded();
-        else if (parseHTMLInteger(value, tabindex)) {
+            if (treeScope()->adjustedFocusedElement() == this) {
+                // We might want to call blur(), but it's dangerous to dispatch
+                // events here.
+                document()->setNeedsFocusedElementCheck();
+            }
+        } else if (parseHTMLInteger(value, tabindex)) {
             // Clamp tabindex to the range of 'short' to match Firefox's behavior.
             setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short>::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max()))));
         }
@@ -770,7 +775,7 @@
 RenderObject* HTMLElement::createRenderer(RenderStyle* style)
 {
     if (hasLocalName(wbrTag))
-        return new (document()->renderArena()) RenderWordBreak(this);
+        return new RenderWordBreak(this);
     return RenderObject::createObject(this, style);
 }
 
diff --git a/Source/core/html/HTMLElement.idl b/Source/core/html/HTMLElement.idl
index 1156124..9a5f8de 100644
--- a/Source/core/html/HTMLElement.idl
+++ b/Source/core/html/HTMLElement.idl
@@ -21,9 +21,6 @@
 [
     CustomToV8
 ] interface HTMLElement : Element {
-             // iht.com relies on id returning the empty string when no id is present.
-             // Other browsers do this as well. So we don't convert null to JS null.
-             [Reflect] attribute DOMString id;
              [Reflect] attribute DOMString title;
              [Reflect] attribute DOMString lang;
              attribute boolean             translate;
diff --git a/Source/core/html/HTMLEmbedElement.cpp b/Source/core/html/HTMLEmbedElement.cpp
index 7ada15b..e0c1e7e 100644
--- a/Source/core/html/HTMLEmbedElement.cpp
+++ b/Source/core/html/HTMLEmbedElement.cpp
@@ -165,9 +165,8 @@
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
     // FIXME: beforeLoad could have detached the renderer!  Just like in the <object> case above.
-    loader->requestObject(this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);
+    requestObject(m_url, m_serviceType, paramNames, paramValues);
 }
 
 bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
diff --git a/Source/core/html/HTMLEmbedElement.h b/Source/core/html/HTMLEmbedElement.h
index a5acdc8..bd3a002 100644
--- a/Source/core/html/HTMLEmbedElement.h
+++ b/Source/core/html/HTMLEmbedElement.h
@@ -50,8 +50,6 @@
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
     void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues);
-
-    virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
 };
 
 }
diff --git a/Source/core/html/HTMLFieldSetElement.cpp b/Source/core/html/HTMLFieldSetElement.cpp
index c79aa6c..b3f3e9c 100644
--- a/Source/core/html/HTMLFieldSetElement.cpp
+++ b/Source/core/html/HTMLFieldSetElement.cpp
@@ -87,7 +87,7 @@
 
 RenderObject* HTMLFieldSetElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderFieldset(this);
+    return new RenderFieldset(this);
 }
 
 HTMLLegendElement* HTMLFieldSetElement::legend() const
diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
index 29a6c6a..4958a8d 100644
--- a/Source/core/html/HTMLFormControlElement.cpp
+++ b/Source/core/html/HTMLFormControlElement.cpp
@@ -157,6 +157,11 @@
     didAffectSelector(AffectedSelectorDisabled | AffectedSelectorEnabled);
     if (renderer() && renderer()->style()->hasAppearance())
         renderer()->theme()->stateChanged(renderer(), EnabledState);
+    if (isDisabledFormControl() && treeScope()->adjustedFocusedElement() == this) {
+        // We might want to call blur(), but it's dangerous to dispatch events
+        // here.
+        document()->setNeedsFocusedElementCheck();
+    }
 }
 
 void HTMLFormControlElement::requiredAttributeChanged()
@@ -316,7 +321,7 @@
     return HTMLElement::rendererIsFocusable();
 }
 
-bool HTMLFormControlElement::isKeyboardFocusable(KeyboardEvent*) const
+bool HTMLFormControlElement::isKeyboardFocusable() const
 {
     // Skip tabIndex check in a parent class.
     return isFocusable();
diff --git a/Source/core/html/HTMLFormControlElement.h b/Source/core/html/HTMLFormControlElement.h
index d6848c9..a58d61c 100644
--- a/Source/core/html/HTMLFormControlElement.h
+++ b/Source/core/html/HTMLFormControlElement.h
@@ -118,7 +118,7 @@
 
     virtual bool supportsFocus() const OVERRIDE;
     virtual bool rendererIsFocusable() const OVERRIDE;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool shouldShowFocusRingOnMouseFocus() const;
     virtual bool shouldHaveFocusAppearance() const OVERRIDE;
     virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusDirection) OVERRIDE;
diff --git a/Source/core/html/HTMLFormElement.h b/Source/core/html/HTMLFormElement.h
index a0bd172..817575f 100644
--- a/Source/core/html/HTMLFormElement.h
+++ b/Source/core/html/HTMLFormElement.h
@@ -140,8 +140,6 @@
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
-    virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
-
     virtual void copyNonAttributePropertiesFromElement(const Element&) OVERRIDE;
 
     void submit(Event*, bool activateSubmitButton, bool processingUserGesture, FormSubmissionTrigger);
diff --git a/Source/core/html/HTMLFrameElement.cpp b/Source/core/html/HTMLFrameElement.cpp
index 712877d..70a67cc 100644
--- a/Source/core/html/HTMLFrameElement.cpp
+++ b/Source/core/html/HTMLFrameElement.cpp
@@ -54,7 +54,7 @@
 
 RenderObject* HTMLFrameElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderFrame(this);
+    return new RenderFrame(this);
 }
 
 static inline HTMLFrameSetElement* containingFrameSetElement(Node* node)
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index 4094b5b..6f1a431 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -90,7 +90,7 @@
         url = blankURL();
     }
 
-    if (!parentFrame->loader()->subframeLoader()->loadOrRedirectSubframe(this, url, m_frameName, lockBackForwardList))
+    if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList))
         return;
     if (!contentFrame() || scriptURL.isEmpty())
         return;
diff --git a/Source/core/html/HTMLFrameElementBase.h b/Source/core/html/HTMLFrameElementBase.h
index f5c5be9..e3d9fd6 100644
--- a/Source/core/html/HTMLFrameElementBase.h
+++ b/Source/core/html/HTMLFrameElementBase.h
@@ -36,8 +36,8 @@
 
     virtual ScrollbarMode scrollingMode() const { return m_scrolling; }
 
-    int marginWidth() const { return m_marginWidth; }
-    int marginHeight() const { return m_marginHeight; }
+    virtual int marginWidth() const { return m_marginWidth; }
+    virtual int marginHeight() const { return m_marginHeight; }
 
     int width();
     int height();
@@ -49,6 +49,8 @@
 
     bool isURLAllowed() const;
 
+    virtual bool allowScrollingInContentFrame() { return scrollingMode() != ScrollbarAlwaysOff; }
+
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp
index a8bfa6e..3835575 100644
--- a/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -23,9 +23,13 @@
 
 #include "core/dom/ExceptionCode.h"
 #include "core/loader/FrameLoader.h"
+#include "core/loader/FrameLoaderClient.h"
 #include "core/page/Frame.h"
+#include "core/page/FrameView.h"
 #include "core/rendering/RenderPart.h"
 #include "core/svg/SVGDocument.h"
+#include "weborigin/SecurityOrigin.h"
+#include "weborigin/SecurityPolicy.h"
 
 namespace WebCore {
 
@@ -103,9 +107,9 @@
     m_sandboxFlags = flags;
 }
 
-bool HTMLFrameOwnerElement::isKeyboardFocusable(KeyboardEvent* event) const
+bool HTMLFrameOwnerElement::isKeyboardFocusable() const
 {
-    return m_contentFrame && HTMLElement::isKeyboardFocusable(event);
+    return m_contentFrame && HTMLElement::isKeyboardFocusable();
 }
 
 SVGDocument* HTMLFrameOwnerElement::getSVGDocument(ExceptionCode& ec) const
@@ -118,4 +122,55 @@
     return 0;
 }
 
+bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const AtomicString& frameName, bool lockBackForwardList)
+{
+    RefPtr<Frame> parentFrame = document()->frame();
+    if (contentFrame()) {
+        contentFrame()->navigationScheduler()->scheduleLocationChange(document()->securityOrigin(), url.string(), parentFrame->loader()->outgoingReferrer(), lockBackForwardList);
+        return true;
+    }
+
+    if (!document()->securityOrigin()->canDisplay(url)) {
+        FrameLoader::reportLocalLoadFailed(parentFrame.get(), url.string());
+        return false;
+    }
+
+    String referrer = SecurityPolicy::generateReferrerHeader(document()->referrerPolicy(), url, parentFrame->loader()->outgoingReferrer());
+    RefPtr<Frame> childFrame = parentFrame->loader()->client()->createFrame(url, frameName, this, referrer, allowScrollingInContentFrame(), marginWidth(), marginHeight());
+
+    if (!childFrame)  {
+        parentFrame->loader()->checkCallImplicitClose();
+        return false;
+    }
+
+    // All new frames will have m_isComplete set to true at this point due to synchronously loading
+    // an empty document in FrameLoader::init(). But many frames will now be starting an
+    // asynchronous load of url, so we set m_isComplete to false and then check if the load is
+    // actually completed below. (Note that we set m_isComplete to false even for synchronous
+    // loads, so that checkCompleted() below won't bail early.)
+    // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed.
+    childFrame->loader()->started();
+
+    RenderObject* renderObject = renderer();
+    FrameView* view = childFrame->view();
+    if (renderObject && renderObject->isWidget() && view)
+        toRenderWidget(renderObject)->setWidget(view);
+
+    parentFrame->loader()->checkCallImplicitClose();
+
+    // Some loads are performed synchronously (e.g., about:blank and loads
+    // cancelled by returning a null ResourceRequest from requestFromDelegate).
+    // In these cases, the synchronous load would have finished
+    // before we could connect the signals, so make sure to send the
+    // completed() signal for the child by hand and mark the load as being
+    // complete.
+    // FIXME: In this case the Frame will have finished loading before
+    // it's being added to the child list. It would be a good idea to
+    // create the child first, then invoke the loader separately.
+    if (childFrame->loader()->state() == FrameStateComplete && !childFrame->loader()->policyDocumentLoader())
+        childFrame->loader()->checkCompleted();
+    return true;
+}
+
+
 } // namespace WebCore
diff --git a/Source/core/html/HTMLFrameOwnerElement.h b/Source/core/html/HTMLFrameOwnerElement.h
index 21c5c95..d8bd923 100644
--- a/Source/core/html/HTMLFrameOwnerElement.h
+++ b/Source/core/html/HTMLFrameOwnerElement.h
@@ -61,8 +61,14 @@
     HTMLFrameOwnerElement(const QualifiedName& tagName, Document*);
     void setSandboxFlags(SandboxFlags);
 
+    bool loadOrRedirectSubframe(const KURL&, const AtomicString& frameName, bool lockBackForwardList);
+
+    virtual bool allowScrollingInContentFrame() { return true; }
+    virtual int marginWidth() const { return -1; }
+    virtual int marginHeight() const { return -1; }
+
 private:
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool isFrameOwnerElement() const OVERRIDE { return true; }
 
     Frame* m_contentFrame;
diff --git a/Source/core/html/HTMLFrameSetElement.cpp b/Source/core/html/HTMLFrameSetElement.cpp
index a0e74fd..d806c61 100644
--- a/Source/core/html/HTMLFrameSetElement.cpp
+++ b/Source/core/html/HTMLFrameSetElement.cpp
@@ -159,7 +159,7 @@
     if (style->hasContent())
         return RenderObject::createObject(this, style);
 
-    return new (document()->renderArena()) RenderFrameSet(this);
+    return new RenderFrameSet(this);
 }
 
 void HTMLFrameSetElement::attach(const AttachContext& context)
diff --git a/Source/core/html/HTMLIFrameElement.cpp b/Source/core/html/HTMLIFrameElement.cpp
index 239bc50..fc757bb 100644
--- a/Source/core/html/HTMLIFrameElement.cpp
+++ b/Source/core/html/HTMLIFrameElement.cpp
@@ -77,14 +77,7 @@
 
 void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
-    if (name == nameAttr) {
-        if (inDocument() && document()->isHTMLDocument() && !isInShadowTree()) {
-            HTMLDocument* document = toHTMLDocument(this->document());
-            document->removeExtraNamedItem(m_name);
-            document->addExtraNamedItem(value);
-        }
-        m_name = value;
-    } else if (name == sandboxAttr) {
+    if (name == sandboxAttr) {
         String invalidTokens;
         setSandboxFlags(value.isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(value, invalidTokens));
         if (!invalidTokens.isNull())
@@ -104,22 +97,7 @@
 
 RenderObject* HTMLIFrameElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderIFrame(this);
-}
-
-Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode* insertionPoint)
-{
-    InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument() && document()->isHTMLDocument() && !insertionPoint->isInShadowTree())
-        toHTMLDocument(document())->addExtraNamedItem(m_name);
-    return result;
-}
-
-void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
-{
-    HTMLFrameElementBase::removedFrom(insertionPoint);
-    if (insertionPoint->inDocument() && document()->isHTMLDocument() && !insertionPoint->isInShadowTree())
-        toHTMLDocument(document())->removeExtraNamedItem(m_name);
+    return new RenderIFrame(this);
 }
 
 bool HTMLIFrameElement::shouldDisplaySeamlessly() const
diff --git a/Source/core/html/HTMLIFrameElement.h b/Source/core/html/HTMLIFrameElement.h
index 9aa74ae..d7306f4 100644
--- a/Source/core/html/HTMLIFrameElement.h
+++ b/Source/core/html/HTMLIFrameElement.h
@@ -41,9 +41,6 @@
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
-
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     virtual RenderObject* createRenderer(RenderStyle*);
 
@@ -52,7 +49,6 @@
     virtual bool loadedNonEmptyDocument() const OVERRIDE { return m_didLoadNonEmptyDocument; }
     virtual void didLoadNonEmptyDocument() OVERRIDE { m_didLoadNonEmptyDocument = true; }
 
-    AtomicString m_name;
     bool m_didLoadNonEmptyDocument;
 };
 
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 709a0ee..1e53ef1 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -28,6 +28,7 @@
 #include "bindings/v8/ScriptEventListener.h"
 #include "core/dom/Attribute.h"
 #include "core/dom/EventNames.h"
+#include "core/html/HTMLDocument.h"
 #include "core/html/HTMLFormElement.h"
 #include "core/html/parser/HTMLParserIdioms.h"
 #include "core/loader/cache/CachedImage.h"
@@ -122,8 +123,22 @@
         BlendMode blendOp = BlendModeNormal;
         if (!parseCompositeAndBlendOperator(value, m_compositeOperator, blendOp))
             m_compositeOperator = CompositeSourceOver;
-    } else
+    } else {
+        if (name == nameAttr) {
+            bool willHaveName = !value.isNull();
+            if (hasName() != willHaveName && inDocument() && !isInShadowTree() && document()->isHTMLDocument()) {
+                HTMLDocument* document = toHTMLDocument(this->document());
+                const AtomicString& id = getIdAttribute();
+                if (!id.isEmpty()) {
+                    if (willHaveName)
+                        document->addNamedDocumentItem(id, this);
+                    else
+                        document->removeNamedDocumentItem(id, this);
+                }
+            }
+        }
         HTMLElement::parseAttribute(name, value);
+    }
 }
 
 String HTMLImageElement::altText() const
@@ -143,7 +158,7 @@
     if (style->hasContent())
         return RenderObject::createObject(this, style);
 
-    RenderImage* image = new (document()->renderArena()) RenderImage(this);
+    RenderImage* image = new RenderImage(this);
     image->setImageResource(RenderImageResource::create());
     return image;
 }
@@ -357,4 +372,12 @@
     return document()->completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
 }
 
+Image* HTMLImageElement::imageContents()
+{
+    if (!m_imageLoader.imageComplete())
+        return 0;
+
+    return m_imageLoader.image()->image();
+}
+
 }
diff --git a/Source/core/html/HTMLImageElement.h b/Source/core/html/HTMLImageElement.h
index c4f9e31..2630353 100644
--- a/Source/core/html/HTMLImageElement.h
+++ b/Source/core/html/HTMLImageElement.h
@@ -101,8 +101,8 @@
 
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void removedFrom(ContainerNode*) OVERRIDE;
-    virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
-    virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true; }
+
+    virtual Image* imageContents() OVERRIDE;
 
     HTMLImageLoader m_imageLoader;
     HTMLFormElement* m_form;
diff --git a/Source/core/html/HTMLImport.cpp b/Source/core/html/HTMLImport.cpp
index e55f843..a6c0886 100644
--- a/Source/core/html/HTMLImport.cpp
+++ b/Source/core/html/HTMLImport.cpp
@@ -35,13 +35,6 @@
 
 namespace WebCore {
 
-bool HTMLImport::haveChildrenLoaded()
-{
-    if (HTMLImportsController* controller = this->controller())
-        return controller->haveChildrenLoaded(this);
-    return true;
-}
-
 Frame* HTMLImport::frame()
 {
     return master()->frame();
@@ -52,4 +45,106 @@
     return controller()->document();
 }
 
+void HTMLImport::appendChild(HTMLImport* child)
+{
+    ASSERT(child->parent() == this);
+    ASSERT(!child->hasChildren());
+
+    if (isBlocked())
+        child->block();
+    m_children.append(child);
+    blockAfter(child);
+}
+
+bool HTMLImport::areChilrenLoaded() const
+{
+    for (size_t i = 0; i < m_children.size(); ++i) {
+        if (!m_children[i]->isLoaded())
+            return false;
+    }
+
+    return true;
+}
+
+bool HTMLImport::arePredecessorsLoaded() const
+{
+    HTMLImport* parent = this->parent();
+    if (!parent)
+        return true;
+
+    for (size_t i = 0; i < parent->m_children.size(); ++i) {
+        HTMLImport* sibling = parent->m_children[i];
+        if (sibling == this)
+            break;
+        if (!sibling->isLoaded())
+            return false;
+    }
+
+    return true;
+}
+
+void HTMLImport::block()
+{
+    m_blocked = true;
+}
+
+void HTMLImport::unblock()
+{
+    bool wasBlocked = m_blocked;
+    m_blocked = false;
+    if (wasBlocked)
+        didUnblock();
+}
+
+void HTMLImport::didUnblock()
+{
+    ASSERT(!isBlocked());
+    if (!isProcessing())
+        return;
+
+    if (Document* document = this->document())
+        document->didLoadAllImports();
+}
+
+bool HTMLImport::unblock(HTMLImport* import)
+{
+    ASSERT(import->arePredecessorsLoaded());
+    ASSERT(import->isBlocked() || import->areChilrenLoaded());
+
+    if (import->isBlocked()) {
+        for (size_t i = 0; i < import->m_children.size(); ++i) {
+            if (!unblock(import->m_children[i]))
+                return false;
+        }
+    }
+
+    import->unblock();
+    return import->isLoaded();
+}
+
+void HTMLImport::block(HTMLImport* import)
+{
+    import->block();
+    for (size_t i = 0; i < import->m_children.size(); ++i)
+        block(import->m_children[i]);
+}
+
+void HTMLImport::blockAfter(HTMLImport* child)
+{
+    ASSERT(child->parent() == this);
+
+    for (size_t i = 0; i < m_children.size(); ++i) {
+        HTMLImport* sibling = m_children[m_children.size() - i - 1];
+        if (sibling == child)
+            break;
+        HTMLImport::block(sibling);
+    }
+
+    this->block();
+
+    if (HTMLImport* parent = this->parent())
+        parent->blockAfter(this);
+}
+
+
 } // namespace WebCore
diff --git a/Source/core/html/HTMLImport.h b/Source/core/html/HTMLImport.h
index 910ad65..ecdfd5f 100644
--- a/Source/core/html/HTMLImport.h
+++ b/Source/core/html/HTMLImport.h
@@ -31,25 +31,54 @@
 #ifndef HTMLImport_h
 #define HTMLImport_h
 
+#include "wtf/Vector.h"
+
 namespace WebCore {
 
+class Frame;
 class Document;
 class Frame;
 class HTMLImportsController;
 
 class HTMLImport {
 public:
+    static bool unblock(HTMLImport*);
+
     virtual ~HTMLImport() { }
 
-    bool haveChildrenLoaded();
     Frame* frame();
     Document* master();
 
+    bool isLoaded() const { return !isBlocked() && !isProcessing(); }
+    bool isBlocked() const { return m_blocked; }
+    void appendChild(HTMLImport*);
+
     virtual HTMLImportsController* controller() = 0;
-    virtual HTMLImport* parent() = 0;
-    virtual Document* document() = 0;
+    virtual HTMLImport* parent() const = 0;
+    virtual Document* document() const = 0;
     virtual void wasDetachedFromDocument() = 0;
     virtual void didFinishParsing() = 0;
+    virtual bool isProcessing() const = 0;
+
+protected:
+    HTMLImport()
+        : m_blocked(false)
+    { }
+
+private:
+    static void block(HTMLImport*);
+
+    void blockAfter(HTMLImport* child);
+    void block();
+    void unblock();
+    void didUnblock();
+
+    bool arePredecessorsLoaded() const;
+    bool areChilrenLoaded() const;
+    bool hasChildren() const { return !m_children.isEmpty(); }
+
+    Vector<HTMLImport*> m_children;
+    bool m_blocked; // If any of decendants or predecessors is in processing, it is blocked.
 };
 
 } // namespace WebCore
diff --git a/Source/core/html/HTMLImportsController.cpp b/Source/core/html/HTMLImportsController.cpp
index 7ba3f7e..daa957d 100644
--- a/Source/core/html/HTMLImportsController.cpp
+++ b/Source/core/html/HTMLImportsController.cpp
@@ -38,7 +38,7 @@
 #include "core/loader/DocumentWriter.h"
 #include "core/loader/cache/CachedScript.h"
 #include "core/loader/cache/ResourceFetcher.h"
-#include "core/page/ContentSecurityPolicy.h"
+#include "core/page/ContentSecurityPolicyResponseHeaders.h"
 #include "weborigin/SecurityOrigin.h"
 
 namespace WebCore {
@@ -110,6 +110,7 @@
 {
     RefPtr<HTMLImportLoader> loader = adoptRef(new HTMLImportLoader(parent, url, resource));
     loader->controller()->addImport(loader);
+    parent->appendChild(loader.get());
     return loader.release();
 }
 
@@ -170,8 +171,8 @@
         m_resource = 0;
     }
 
-    if (HTMLImportsController* controller = this->controller())
-        controller->didLoad(this);
+    ASSERT(!document() || !document()->parsing());
+    controller()->scheduleUnblock();
 }
 
 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceResponse& response)
@@ -208,7 +209,7 @@
 
 Document* HTMLImportLoader::importedDocument() const
 {
-    if (m_state != StateReady)
+    if (m_state == StateError)
         return 0;
     return m_importedDocument.get();
 }
@@ -225,12 +226,12 @@
     return m_parent ? m_parent->controller() : 0;
 }
 
-HTMLImport* HTMLImportLoader::parent()
+HTMLImport* HTMLImportLoader::parent() const
 {
     return m_parent;
 }
 
-Document* HTMLImportLoader::document()
+Document* HTMLImportLoader::document() const
 {
     return m_importedDocument.get();
 }
@@ -247,6 +248,12 @@
     setState(finishParsing());
 }
 
+bool HTMLImportLoader::isProcessing() const
+{
+    if (!m_importedDocument)
+        return !isDone();
+    return m_importedDocument->parsing();
+}
 
 void HTMLImportsController::provideTo(Document* master)
 {
@@ -258,6 +265,7 @@
 
 HTMLImportsController::HTMLImportsController(Document* master)
     : m_master(master)
+    , m_unblockTimer(this, &HTMLImportsController::unblockTimerFired)
 {
 }
 
@@ -286,14 +294,6 @@
     m_master->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
 }
 
-void HTMLImportsController::didLoad(HTMLImportLoader* loadedImport)
-{
-    for (HTMLImport* ancestorToNotify = loadedImport->parent(); ancestorToNotify; ancestorToNotify = ancestorToNotify->parent()) {
-        if (haveChildrenLoaded(ancestorToNotify))
-            ancestorToNotify->document()->didLoadAllImports();
-    }
-}
-
 PassRefPtr<HTMLImportLoader> HTMLImportsController::findLinkFor(const KURL& url) const
 {
     for (size_t i = 0; i < m_imports.size(); ++i) {
@@ -314,31 +314,17 @@
     return m_master->fetcher();
 }
 
-bool HTMLImportsController::haveChildrenLoaded(HTMLImport* parent) const
-{
-    for (size_t i = 0; i < m_imports.size(); ++i) {
-        if (!m_imports[i]->isDone()) {
-            for (HTMLImport* ancestor = m_imports[i]->parent(); ancestor; ancestor = ancestor->parent()) {
-                if (ancestor == parent)
-                    return false;
-            }
-        }
-    }
-
-    return true;
-}
-
 HTMLImportsController* HTMLImportsController::controller()
 {
     return this;
 }
 
-HTMLImport* HTMLImportsController::parent()
+HTMLImport* HTMLImportsController::parent() const
 {
     return 0;
 }
 
-Document* HTMLImportsController::document()
+Document* HTMLImportsController::document() const
 {
     return m_master;
 }
@@ -352,4 +338,24 @@
 {
 }
 
+bool HTMLImportsController::isProcessing() const
+{
+    return m_master->parsing();
+}
+
+void HTMLImportsController::scheduleUnblock()
+{
+    if (m_unblockTimer.isActive())
+        return;
+    m_unblockTimer.startOneShot(0);
+}
+
+void HTMLImportsController::unblockTimerFired(Timer<HTMLImportsController>*)
+{
+    do {
+        m_unblockTimer.stop();
+        HTMLImport::unblock(this);
+    } while (m_unblockTimer.isActive());
+}
+
 } // namespace WebCore
diff --git a/Source/core/html/HTMLImportsController.h b/Source/core/html/HTMLImportsController.h
index 3e959d0..3d4cee5 100644
--- a/Source/core/html/HTMLImportsController.h
+++ b/Source/core/html/HTMLImportsController.h
@@ -36,6 +36,7 @@
 #include "core/loader/cache/CachedRawResource.h"
 #include "core/loader/cache/ResourcePtr.h"
 #include "core/platform/Supplementable.h"
+#include "core/platform/Timer.h"
 #include "wtf/FastAllocBase.h"
 #include "wtf/PassOwnPtr.h"
 #include "wtf/Vector.h"
@@ -91,10 +92,11 @@
 
     // HTMLImport
     virtual HTMLImportsController* controller() OVERRIDE;
-    virtual HTMLImport* parent() OVERRIDE;
-    virtual Document* document() OVERRIDE;
+    virtual HTMLImport* parent() const OVERRIDE;
+    virtual Document* document() const OVERRIDE;
     virtual void wasDetachedFromDocument() OVERRIDE;
     virtual void didFinishParsing() OVERRIDE;
+    virtual bool isProcessing() const OVERRIDE;
 
 private:
     HTMLImportLoader(HTMLImport*, const KURL&, const ResourcePtr<CachedScript>&);
@@ -129,23 +131,26 @@
 
     // HTMLImport
     virtual HTMLImportsController* controller() OVERRIDE;
-    virtual HTMLImport* parent() OVERRIDE;
-    virtual Document* document() OVERRIDE;
+    virtual HTMLImport* parent() const OVERRIDE;
+    virtual Document* document() const OVERRIDE;
     virtual void wasDetachedFromDocument() OVERRIDE;
     virtual void didFinishParsing() OVERRIDE;
+    virtual bool isProcessing() const OVERRIDE;
 
     void addImport(PassRefPtr<HTMLImportLoader>);
     void showSecurityErrorMessage(const String&);
     PassRefPtr<HTMLImportLoader> findLinkFor(const KURL&) const;
     SecurityOrigin* securityOrigin() const;
     ResourceFetcher* fetcher() const;
-    bool haveChildrenLoaded(HTMLImport* parent) const;
-    void didLoad(HTMLImportLoader*);
+
+    void scheduleUnblock();
+    void unblockTimerFired(Timer<HTMLImportsController>*);
 
 private:
     void clear();
 
     Document* m_master;
+    Timer<HTMLImportsController> m_unblockTimer;
 
     // List of import which has been loaded or being loaded.
     typedef Vector<RefPtr<HTMLImportLoader> > ImportList;
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 6c8b487..cae1f57 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -365,9 +365,9 @@
     return m_inputType->hasCustomFocusLogic();
 }
 
-bool HTMLInputElement::isKeyboardFocusable(KeyboardEvent* event) const
+bool HTMLInputElement::isKeyboardFocusable() const
 {
-    return m_inputType->isKeyboardFocusable(event);
+    return m_inputType->isKeyboardFocusable();
 }
 
 bool HTMLInputElement::shouldShowFocusRingOnMouseFocus() const
@@ -375,11 +375,6 @@
     return m_inputType->shouldShowFocusRingOnMouseFocus();
 }
 
-bool HTMLInputElement::isTextFormControlKeyboardFocusable(KeyboardEvent* event) const
-{
-    return HTMLTextFormControlElement::isKeyboardFocusable(event);
-}
-
 void HTMLInputElement::updateFocusAppearance(bool restorePreviousSelection)
 {
     if (isTextField()) {
@@ -393,6 +388,15 @@
         HTMLTextFormControlElement::updateFocusAppearance(restorePreviousSelection);
 }
 
+void HTMLInputElement::beginEditing()
+{
+    if (!isTextField())
+        return;
+
+    if (Frame* frame = document()->frame())
+        frame->editor()->textFieldDidBeginEditing(this);
+}
+
 void HTMLInputElement::endEditing()
 {
     if (!isTextField())
@@ -502,9 +506,6 @@
             document()->updateFocusAppearanceSoon(true /* restore selection */);
     }
 
-    if (ElementShadow* elementShadow = shadowOfParentForDistribution(this))
-        elementShadow->invalidateDistribution();
-
     setChangedSinceLastFormControlChangeEvent(false);
 
     addToRadioButtonGroup();
diff --git a/Source/core/html/HTMLInputElement.h b/Source/core/html/HTMLInputElement.h
index e718c3c..18da1fe 100644
--- a/Source/core/html/HTMLInputElement.h
+++ b/Source/core/html/HTMLInputElement.h
@@ -250,7 +250,6 @@
 
     // Functions for InputType classes.
     void setValueInternal(const String&, TextFieldEventBehavior);
-    bool isTextFormControlKeyboardFocusable(KeyboardEvent*) const;
     bool valueAttributeWasUpdatedAfterParsing() const { return m_valueAttributeWasUpdatedAfterParsing; }
 
     void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(caretOffset, caretOffset, SelectionHasNoDirection); }
@@ -276,6 +275,7 @@
 
     virtual const AtomicString& name() const OVERRIDE;
 
+    void beginEditing();
     void endEditing();
 
     static Vector<FileChooserFileInfo> filesFromFileInputFormControlState(const FormControlState&);
@@ -309,7 +309,7 @@
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
     virtual bool hasCustomFocusLogic() const OVERRIDE;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE;
     virtual bool isEnumeratable() const;
     virtual bool supportLabels() const OVERRIDE;
diff --git a/Source/core/html/HTMLLabelElement.cpp b/Source/core/html/HTMLLabelElement.cpp
index 9f3d061..20e18c8 100644
--- a/Source/core/html/HTMLLabelElement.cpp
+++ b/Source/core/html/HTMLLabelElement.cpp
@@ -131,12 +131,12 @@
 
         processingClick = true;
 
-        // Click the corresponding control.
-        element->dispatchSimulatedClick(evt);
-
         document()->updateLayoutIgnorePendingStylesheets();
         if (element->isMouseFocusable())
-            element->focus();
+            element->focus(true, FocusDirectionMouse);
+
+        // Click the corresponding control.
+        element->dispatchSimulatedClick(evt);
 
         processingClick = false;
 
diff --git a/Source/core/html/HTMLLinkElement.cpp b/Source/core/html/HTMLLinkElement.cpp
index 374ba16..b2e4ae6 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -39,9 +39,11 @@
 #include "core/dom/EventSender.h"
 #include "core/html/HTMLImportsController.h"
 #include "core/loader/FrameLoader.h"
+#include "core/loader/FrameLoaderClient.h"
 #include "core/loader/cache/CachedCSSStyleSheet.h"
 #include "core/loader/cache/FetchRequest.h"
 #include "core/loader/cache/ResourceFetcher.h"
+#include "core/page/ContentSecurityPolicy.h"
 #include "core/page/Frame.h"
 #include "core/page/FrameView.h"
 #include "wtf/StdLibExtras.h"
@@ -563,8 +565,12 @@
     if (m_owner->relAttribute().iconType() != InvalidIcon && builder.url().isValid() && !builder.url().isEmpty()) {
         if (!m_owner->shouldLoadLink())
             return;
+        if (!document()->securityOrigin()->canDisplay(builder.url()))
+            return;
+        if (!document()->contentSecurityPolicy()->allowImageFromSource(builder.url()))
+            return;
         if (document()->frame())
-            document()->frame()->loader()->didChangeIcons(m_owner->relAttribute().iconType());
+            document()->frame()->loader()->client()->dispatchDidChangeIcons(m_owner->relAttribute().iconType());
     }
 
     if (!m_owner->loadLink(type, builder.url()))
diff --git a/Source/core/html/HTMLMarqueeElement.cpp b/Source/core/html/HTMLMarqueeElement.cpp
index ccd1f12..2b321e9 100644
--- a/Source/core/html/HTMLMarqueeElement.cpp
+++ b/Source/core/html/HTMLMarqueeElement.cpp
@@ -191,7 +191,7 @@
 
 RenderObject* HTMLMarqueeElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderMarquee(this);
+    return new RenderMarquee(this);
 }
 
 } // namespace WebCore
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 1f180db..f7fa25f 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -37,7 +37,7 @@
 #include "core/dom/EventNames.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/dom/ExceptionCodePlaceholder.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/NodeRenderingContext.h"
 #include "core/dom/shadow/ShadowRoot.h"
 #include "core/html/HTMLMediaSource.h"
@@ -495,7 +495,7 @@
 
 RenderObject* HTMLMediaElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderMedia(this);
+    return new RenderMedia(this);
 }
 
 bool HTMLMediaElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
@@ -3508,7 +3508,7 @@
 
 bool HTMLMediaElement::isFullscreen() const
 {
-    return FullscreenController::isActiveFullScreenElement(this);
+    return FullscreenElementStack::isActiveFullScreenElement(this);
 }
 
 void HTMLMediaElement::enterFullscreen()
@@ -3516,7 +3516,7 @@
     LOG(Media, "HTMLMediaElement::enterFullscreen");
 
     if (document()->settings() && document()->settings()->fullScreenEnabled())
-        FullscreenController::from(document())->requestFullScreenForElement(this, 0, FullscreenController::ExemptIFrameAllowFullScreenRequirement);
+        FullscreenElementStack::from(document())->requestFullScreenForElement(this, 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
 }
 
 void HTMLMediaElement::exitFullscreen()
@@ -3524,7 +3524,7 @@
     LOG(Media, "HTMLMediaElement::exitFullscreen");
 
     if (document()->settings() && document()->settings()->fullScreenEnabled() && isFullscreen())
-        FullscreenController::from(document())->webkitCancelFullScreen();
+        FullscreenElementStack::from(document())->webkitCancelFullScreen();
 }
 
 void HTMLMediaElement::didBecomeFullscreenElement()
diff --git a/Source/core/html/HTMLMeterElement.cpp b/Source/core/html/HTMLMeterElement.cpp
index 2af8a1a..45aaee9 100644
--- a/Source/core/html/HTMLMeterElement.cpp
+++ b/Source/core/html/HTMLMeterElement.cpp
@@ -59,7 +59,7 @@
     if (hasAuthorShadowRoot() || !document()->page()->theme()->supportsMeter(style->appearance()))
         return RenderObject::createObject(this, style);
 
-    return new (document()->renderArena()) RenderMeter(this);
+    return new RenderMeter(this);
 }
 
 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
diff --git a/Source/core/html/HTMLNameCollection.cpp b/Source/core/html/HTMLNameCollection.cpp
index 6e637b2..e141a8d 100644
--- a/Source/core/html/HTMLNameCollection.cpp
+++ b/Source/core/html/HTMLNameCollection.cpp
@@ -34,7 +34,7 @@
 using namespace HTMLNames;
 
 HTMLNameCollection::HTMLNameCollection(Node* document, CollectionType type, const AtomicString& name)
-    : HTMLCollection(document, type, OverridesItemAfter)
+    : HTMLCollection(document, type, DoesNotOverrideItemAfter)
     , m_name(name)
 {
 }
@@ -48,58 +48,47 @@
     ownerNode()->nodeLists()->removeCacheWithAtomicName(this, type(), m_name);
 }
 
-Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element* previous) const
+bool WindowNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
 {
-    ASSERT_UNUSED(offsetInArray, !offsetInArray);
-    ASSERT(previous != ownerNode());
+    return element->hasTagName(imgTag) || element->hasTagName(formTag) || element->hasTagName(appletTag)
+        || element->hasTagName(embedTag) || element->hasTagName(objectTag);
+}
 
-    Element* current;
-    if (!previous)
-        current = ElementTraversal::firstWithin(ownerNode());
-    else
-        current = ElementTraversal::next(previous, ownerNode());
+bool WindowNameCollection::nodeMatches(Element* element, const AtomicString& name)
+{
+    // Find only images, forms, applets, embeds and objects by name, but anything by id
+    if (nodeMatchesIfNameAttributeMatch(element) && element->getNameAttribute() == name)
+        return true;
+    return element->getIdAttribute() == name;
+}
 
-    for (; current; current = ElementTraversal::next(current, ownerNode())) {
-        switch (type()) {
-        case WindowNamedItems:
-            // find only images, forms, applets, embeds and objects by name,
-            // but anything by id
-            if (current->hasTagName(imgTag)
-                || current->hasTagName(formTag)
-                || current->hasTagName(appletTag)
-                || current->hasTagName(embedTag)
-                || current->hasTagName(objectTag)) {
-                if (current->getNameAttribute() == m_name)
-                    return current;
-            }
-            if (current->getIdAttribute() == m_name)
-                return current;
-            break;
-        case DocumentNamedItems:
-            // find images, forms, applets, embeds, objects and iframes by name,
-            // applets and object by id, and images by id but only if they have
-            // a name attribute (this very strange rule matches IE)
-            if (current->hasTagName(formTag) || current->hasTagName(embedTag) || current->hasTagName(iframeTag)) {
-                if (current->getNameAttribute() == m_name)
-                    return current;
-            } else if (current->hasTagName(appletTag)) {
-                if (current->getNameAttribute() == m_name || current->getIdAttribute() == m_name)
-                    return current;
-            } else if (current->hasTagName(objectTag)) {
-                if ((current->getNameAttribute() == m_name || current->getIdAttribute() == m_name)
-                    && static_cast<HTMLObjectElement*>(current)->isDocNamedItem())
-                    return current;
-            } else if (current->hasTagName(imgTag)) {
-                if (current->getNameAttribute() == m_name || (current->getIdAttribute() == m_name && current->hasName()))
-                    return current;
-            }
-            break;
-        default:
-            ASSERT_NOT_REACHED();
-        }
-    }
+bool DocumentNameCollection::nodeMatchesIfIdAttributeMatch(Element* element)
+{
+    // FIXME: we need to fix HTMLImageElement to update the hash map for us when name attribute has been removed.
+    return element->hasTagName(appletTag) || (element->hasTagName(objectTag) && toHTMLObjectElement(element)->isDocNamedItem())
+        || (element->hasTagName(imgTag) && element->hasName());
+}
 
-    return 0;
+bool DocumentNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
+{
+    return element->hasTagName(formTag) || element->hasTagName(embedTag) || element->hasTagName(iframeTag)
+        || element->hasTagName(appletTag) || (element->hasTagName(objectTag) && toHTMLObjectElement(element)->isDocNamedItem())
+        || element->hasTagName(imgTag);
+}
+
+bool DocumentNameCollection::nodeMatches(Element* element, const AtomicString& name)
+{
+    // Find images, forms, applets, embeds, objects and iframes by name, applets and object by id, and images by id
+    // but only if they have a name attribute (this very strange rule matches IE)
+    if (element->hasTagName(formTag) || element->hasTagName(embedTag) || element->hasTagName(iframeTag))
+        return element->getNameAttribute() == name;
+    if (element->hasTagName(appletTag))
+        return element->getNameAttribute() == name || element->getIdAttribute() == name;
+    if (element->hasTagName(objectTag))
+        return (element->getNameAttribute() == name || element->getIdAttribute() == name) && toHTMLObjectElement(element)->isDocNamedItem();
+    if (element->hasTagName(imgTag))
+        return element->getNameAttribute() == name || (element->getIdAttribute() == name && element->hasName());
+    return false;
 }
 
 }
diff --git a/Source/core/html/HTMLNameCollection.h b/Source/core/html/HTMLNameCollection.h
index a13039d..523c139 100644
--- a/Source/core/html/HTMLNameCollection.h
+++ b/Source/core/html/HTMLNameCollection.h
@@ -33,21 +33,56 @@
 
 class HTMLNameCollection : public HTMLCollection {
 public:
-    static PassRefPtr<HTMLNameCollection> create(Node* document, CollectionType type, const AtomicString& name)
-    {
-        return adoptRef(new HTMLNameCollection(document, type, name));
-    }
-
     ~HTMLNameCollection();
 
-private:
+protected:
     HTMLNameCollection(Node*, CollectionType, const AtomicString& name);
 
-    virtual Element* virtualItemAfter(unsigned& offsetInArray, Element*) const OVERRIDE;
-
     AtomicString m_name;
 };
 
+class WindowNameCollection : public HTMLNameCollection {
+public:
+    static PassRefPtr<WindowNameCollection> create(Node* document, CollectionType type, const AtomicString& name)
+    {
+        return adoptRef(new WindowNameCollection(document, type, name));
+    }
+
+    bool nodeMatches(Element* element) const { return nodeMatches(element, m_name); }
+
+    static bool nodeMatchesIfIdAttributeMatch(Element*) { return true; }
+    static bool nodeMatchesIfNameAttributeMatch(Element*);
+    static bool nodeMatches(Element*, const AtomicString&);
+
+private:
+    WindowNameCollection(Node* document, CollectionType type, const AtomicString& name)
+        : HTMLNameCollection(document, type, name)
+    {
+        ASSERT(type == WindowNamedItems);
+    }
+};
+
+class DocumentNameCollection : public HTMLNameCollection {
+public:
+    static PassRefPtr<DocumentNameCollection> create(Node* document, CollectionType type, const AtomicString& name)
+    {
+        return adoptRef(new DocumentNameCollection(document, type, name));
+    }
+
+    static bool nodeMatchesIfIdAttributeMatch(Element*);
+    static bool nodeMatchesIfNameAttributeMatch(Element*);
+    bool nodeMatches(Element* element) const { return nodeMatches(element, m_name); }
+
+    static bool nodeMatches(Element*, const AtomicString&);
+
+private:
+    DocumentNameCollection(Node* document, CollectionType type, const AtomicString& name)
+        : HTMLNameCollection(document, type, name)
+    {
+        ASSERT(type == DocumentNamedItems);
+    }
+};
+
 }
 
 #endif
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp
index d47ba1e..44c7f10 100644
--- a/Source/core/html/HTMLObjectElement.cpp
+++ b/Source/core/html/HTMLObjectElement.cpp
@@ -202,8 +202,9 @@
     // resource's URL to be given by a param named "src", "movie", "code" or "url"
     // if we know that resource points to a plug-in.
     if (url.isEmpty() && !urlParameter.isEmpty()) {
-        SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
-        if (loader->resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages()))
+        KURL completedURL = document()->completeURL(urlParameter);
+        bool useFallback;
+        if (shouldUsePlugin(completedURL, serviceType, false, useFallback))
             url = urlParameter;
     }
 }
@@ -307,8 +308,7 @@
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
-    bool success = beforeLoadAllowedLoad && hasValidClassId() && loader->requestObject(this, url, getNameAttribute(), serviceType, paramNames, paramValues);
+    bool success = beforeLoadAllowedLoad && hasValidClassId() && requestObject(url, serviceType, paramNames, paramValues);
     if (!success && fallbackContent)
         renderFallbackContent();
 }
@@ -427,14 +427,23 @@
             isNamedItem = false;
         child = child->nextSibling();
     }
-    if (isNamedItem != wasNamedItem && document()->isHTMLDocument()) {
+    if (isNamedItem != wasNamedItem && inDocument() && !isInShadowTree() && document()->isHTMLDocument()) {
         HTMLDocument* document = toHTMLDocument(this->document());
-        if (isNamedItem) {
-            document->addNamedItem(getNameAttribute());
-            document->addExtraNamedItem(getIdAttribute());
-        } else {
-            document->removeNamedItem(getNameAttribute());
-            document->removeExtraNamedItem(getIdAttribute());
+
+        const AtomicString& id = getIdAttribute();
+        if (!id.isEmpty()) {
+            if (isNamedItem)
+                document->addNamedDocumentItem(id, this);
+            else
+                document->removeNamedDocumentItem(id, this);
+        }
+
+        const AtomicString& name = getNameAttribute();
+        if (!name.isEmpty()) {
+            if (isNamedItem)
+                document->addNamedDocumentItem(name, this);
+            else
+                document->removeNamedDocumentItem(name, this);
         }
     }
     m_docNamedItem = isNamedItem;
diff --git a/Source/core/html/HTMLObjectElement.h b/Source/core/html/HTMLObjectElement.h
index 5b8d1d2..a18b7b7 100644
--- a/Source/core/html/HTMLObjectElement.h
+++ b/Source/core/html/HTMLObjectElement.h
@@ -101,14 +101,17 @@
     virtual void derefFormAssociatedElement() { deref(); }
     virtual HTMLFormElement* virtualForm() const;
 
-    virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return isDocNamedItem(); }
-    virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return isDocNamedItem(); }
-
     String m_classId;
     bool m_docNamedItem : 1;
     bool m_useFallbackContent : 1;
 };
 
+inline HTMLObjectElement* toHTMLObjectElement(Node* node)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::objectTag));
+    return static_cast<HTMLObjectElement*>(node);
+}
+
 }
 
 #endif
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index b2f2068..14ba749 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -200,9 +200,8 @@
     HTMLFrameOwnerElement::defaultEventHandler(event);
 }
 
-bool HTMLPlugInElement::isKeyboardFocusable(KeyboardEvent* event) const
+bool HTMLPlugInElement::isKeyboardFocusable() const
 {
-    UNUSED_PARAM(event);
     if (!document()->page())
         return false;
 
diff --git a/Source/core/html/HTMLPlugInElement.h b/Source/core/html/HTMLPlugInElement.h
index 75c8e36..f6a4563 100644
--- a/Source/core/html/HTMLPlugInElement.h
+++ b/Source/core/html/HTMLPlugInElement.h
@@ -87,7 +87,7 @@
     virtual bool supportsFocus() const OVERRIDE { return true; };
     virtual bool rendererIsFocusable() const OVERRIDE;
 
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool isPluginElement() const;
 
     mutable ScriptInstance m_instance;
diff --git a/Source/core/html/HTMLPlugInImageElement.cpp b/Source/core/html/HTMLPlugInImageElement.cpp
index 13b2a81..ff2ee7c 100644
--- a/Source/core/html/HTMLPlugInImageElement.cpp
+++ b/Source/core/html/HTMLPlugInImageElement.cpp
@@ -23,12 +23,18 @@
 
 #include "bindings/v8/ScriptController.h"
 #include "core/html/HTMLImageLoader.h"
+#include "core/html/PluginDocument.h"
 #include "core/loader/FrameLoader.h"
 #include "core/loader/FrameLoaderClient.h"
+#include "core/page/ContentSecurityPolicy.h"
 #include "core/page/Frame.h"
+#include "core/page/Page.h"
+#include "core/page/Settings.h"
 #include "core/platform/Logging.h"
 #include "core/platform/MIMETypeFromURL.h"
+#include "core/platform/MIMETypeRegistry.h"
 #include "core/platform/graphics/Image.h"
+#include "core/plugins/PluginData.h"
 #include "core/rendering/RenderEmbeddedObject.h"
 #include "core/rendering/RenderImage.h"
 #include "weborigin/SecurityOrigin.h"
@@ -129,12 +135,12 @@
         return RenderObject::createObject(this, style);
 
     if (isImageType()) {
-        RenderImage* image = new (document()->renderArena()) RenderImage(this);
+        RenderImage* image = new RenderImage(this);
         image->setImageResource(RenderImageResource::create());
         return image;
     }
 
-    return new (document()->renderArena()) RenderEmbeddedObject(this);
+    return new RenderEmbeddedObject(this);
 }
 
 void HTMLPlugInImageElement::willRecalcStyle(StyleChange)
@@ -209,12 +215,121 @@
     toHTMLPlugInImageElement(n)->updateWidgetIfNecessary();
 }
 
-void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url)
+bool HTMLPlugInImageElement::requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
 {
+    if (url.isEmpty() && mimeType.isEmpty())
+        return false;
+
+    // FIXME: None of this code should use renderers!
+    RenderEmbeddedObject* renderer = renderEmbeddedObject();
+    ASSERT(renderer);
+    if (!renderer)
+        return false;
+
+    KURL completedURL = document()->completeURL(url);
+
+    bool useFallback;
+    if (shouldUsePlugin(completedURL, mimeType, renderer->hasFallbackContent(), useFallback)) {
+        bool success = loadPlugin(completedURL, mimeType, paramNames, paramValues, useFallback);
+        return success;
+    }
+
+    // If the plug-in element already contains a subframe, loadOrRedirectSubframe will re-use it. Otherwise,
+    // it will create a new frame and set it as the RenderPart's widget, causing what was previously
+    // in the widget to be torn down.
+    return loadOrRedirectSubframe(completedURL, getNameAttribute(), true);
+}
+
+bool HTMLPlugInImageElement::loadPlugin(const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
+{
+    Frame* frame = document()->frame();
+
+    // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
+    // as opposed to third-party code such as Flash. The user agent decides whether or not they are
+    // permitted, rather than WebKit.
+    if (!frame->loader()->allowPlugins(AboutToInstantiatePlugin) && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType))
+        return false;
+
+    if (!pluginIsLoadable(url, mimeType))
+        return false;
+
+    RenderEmbeddedObject* renderer = renderEmbeddedObject();
+
+    // FIXME: This code should not depend on renderer!
+    if (!renderer || useFallback)
+        return false;
+
     LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
     LOG(Plugins, "   Loaded URL: %s", url.string().utf8().data());
-
     m_loadedUrl = url;
+
+    IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
+    bool loadManually = document()->isPluginDocument() && !frame->loader()->containsPlugins() && toPluginDocument(document())->shouldLoadPluginManually();
+    RefPtr<Widget> widget = frame->loader()->client()->createPlugin(contentSize, this, url, paramNames, paramValues, mimeType, loadManually);
+
+    if (!widget) {
+        if (!renderer->showsUnavailablePluginIndicator())
+            renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginMissing);
+        return false;
+    }
+
+    renderer->setWidget(widget);
+    frame->loader()->setContainsPlugins();
+    setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer);
+    return true;
+}
+
+bool HTMLPlugInImageElement::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
+{
+    // Allow other plug-ins to win over QuickTime because if the user has installed a plug-in that
+    // can handle TIFF (which QuickTime can also handle) they probably intended to override QT.
+    if (document()->frame()->page() && (mimeType == "image/tiff" || mimeType == "image/tif" || mimeType == "image/x-tiff")) {
+        const PluginData* pluginData = document()->frame()->page()->pluginData();
+        String pluginName = pluginData ? pluginData->pluginNameForMimeType(mimeType) : String();
+        if (!pluginName.isEmpty() && !pluginName.contains("QuickTime", false))
+            return true;
+    }
+
+    ObjectContentType objectType = document()->frame()->loader()->client()->objectContentType(url, mimeType, shouldPreferPlugInsForImages());
+    // If an object's content can't be handled and it has no fallback, let
+    // it be handled as a plugin to show the broken plugin icon.
+    useFallback = objectType == ObjectContentNone && hasFallback;
+    return objectType == ObjectContentNone || objectType == ObjectContentNetscapePlugin || objectType == ObjectContentOtherPlugin;
+
+}
+
+bool HTMLPlugInImageElement::pluginIsLoadable(const KURL& url, const String& mimeType)
+{
+    Frame* frame = document()->frame();
+    Settings* settings = frame->settings();
+    if (!settings)
+        return false;
+
+    if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
+        if (!settings->isJavaEnabled())
+            return false;
+    }
+
+    if (document()->isSandboxed(SandboxPlugins))
+        return false;
+
+    if (!document()->securityOrigin()->canDisplay(url)) {
+        FrameLoader::reportLocalLoadFailed(frame, url.string());
+        return false;
+    }
+
+    String declaredMimeType = document()->isPluginDocument() && document()->ownerElement() ?
+        document()->ownerElement()->fastGetAttribute(HTMLNames::typeAttr) :
+        fastGetAttribute(HTMLNames::typeAttr);
+    if (!document()->contentSecurityPolicy()->allowObjectFromSource(url)
+        || !document()->contentSecurityPolicy()->allowPluginType(mimeType, declaredMimeType, url)) {
+        renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginBlockedByContentSecurityPolicy);
+        return false;
+    }
+
+    if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
+        return false;
+    return true;
 }
 
 } // namespace WebCore
diff --git a/Source/core/html/HTMLPlugInImageElement.h b/Source/core/html/HTMLPlugInImageElement.h
index 771d080..65d11e0 100644
--- a/Source/core/html/HTMLPlugInImageElement.h
+++ b/Source/core/html/HTMLPlugInImageElement.h
@@ -74,9 +74,6 @@
     bool needsWidgetUpdate() const { return m_needsWidgetUpdate; }
     void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }
 
-    // Plug-in URL might not be the same as url() with overriding parameters.
-    void subframeLoaderWillCreatePlugIn(const KURL& plugInURL);
-
 protected:
     HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption);
 
@@ -96,6 +93,9 @@
 
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
+    bool requestObject(const String& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues);
+    bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback, bool& useFallback);
+
 private:
     virtual RenderObject* createRenderer(RenderStyle*);
     virtual void willRecalcStyle(StyleChange) OVERRIDE FINAL;
@@ -108,6 +108,9 @@
 
     void restartSimilarPlugIns();
 
+    bool loadPlugin(const KURL&, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
+    bool pluginIsLoadable(const KURL&, const String& mimeType);
+
     virtual bool isPlugInImageElement() const OVERRIDE { return true; }
 
     bool m_needsWidgetUpdate;
diff --git a/Source/core/html/HTMLProgressElement.cpp b/Source/core/html/HTMLProgressElement.cpp
index 4bf77c3..bd621b0 100644
--- a/Source/core/html/HTMLProgressElement.cpp
+++ b/Source/core/html/HTMLProgressElement.cpp
@@ -61,7 +61,7 @@
     if (!style->hasAppearance() || hasAuthorShadowRoot())
         return RenderObject::createObject(this, style);
 
-    return new (document()->renderArena()) RenderProgress(this);
+    return new RenderProgress(this);
 }
 
 RenderProgress* HTMLProgressElement::renderProgress() const
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 63e806c..c12cda9 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -331,8 +331,8 @@
 RenderObject* HTMLSelectElement::createRenderer(RenderStyle*)
 {
     if (usesMenuList())
-        return new (document()->renderArena()) RenderMenuList(this);
-    return new (document()->renderArena()) RenderListBox(this);
+        return new RenderMenuList(this);
+    return new RenderListBox(this);
 }
 
 bool HTMLSelectElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/html/HTMLSummaryElement.cpp b/Source/core/html/HTMLSummaryElement.cpp
index 6907751..4ef21db 100644
--- a/Source/core/html/HTMLSummaryElement.cpp
+++ b/Source/core/html/HTMLSummaryElement.cpp
@@ -49,7 +49,7 @@
 
 RenderObject* HTMLSummaryElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderBlock(this);
+    return new RenderBlock(this);
 }
 
 void HTMLSummaryElement::didAddUserAgentShadowRoot(ShadowRoot* root)
diff --git a/Source/core/html/HTMLSummaryElement.h b/Source/core/html/HTMLSummaryElement.h
index f0238f0..a3507db 100644
--- a/Source/core/html/HTMLSummaryElement.h
+++ b/Source/core/html/HTMLSummaryElement.h
@@ -38,7 +38,7 @@
 
     virtual RenderObject* createRenderer(RenderStyle*);
     virtual void defaultEventHandler(Event*);
-
+    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
     virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
     HTMLDetailsElement* detailsElement() const;
 
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index 5e06cf9..88d289f 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -206,7 +206,7 @@
 
 RenderObject* HTMLTextAreaElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderTextControlMultiLine(this);
+    return new RenderTextControlMultiLine(this);
 }
 
 bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
@@ -235,7 +235,7 @@
     return true;
 }
 
-bool HTMLTextAreaElement::isKeyboardFocusable(KeyboardEvent*) const
+bool HTMLTextAreaElement::isKeyboardFocusable() const
 {
     // If a given text area can be focused at all, then it will always be keyboard focusable.
     return isFocusable();
diff --git a/Source/core/html/HTMLTextAreaElement.h b/Source/core/html/HTMLTextAreaElement.h
index 3deace8..702de3a 100644
--- a/Source/core/html/HTMLTextAreaElement.h
+++ b/Source/core/html/HTMLTextAreaElement.h
@@ -104,7 +104,7 @@
     virtual void reset();
     virtual bool hasCustomFocusLogic() const OVERRIDE;
     virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual void updateFocusAppearance(bool restorePreviousSelection);
 
     virtual void accessKeyAction(bool sendMouseEvents);
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index 5d58b9d..b72896f 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -65,7 +65,7 @@
 
 RenderObject* HTMLVideoElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderVideo(this);
+    return new RenderVideo(this);
 }
 
 void HTMLVideoElement::attach(const AttachContext& context)
diff --git a/Source/core/html/HTMLViewSourceDocument.cpp b/Source/core/html/HTMLViewSourceDocument.cpp
index c9d5d7c..bfa9865 100644
--- a/Source/core/html/HTMLViewSourceDocument.cpp
+++ b/Source/core/html/HTMLViewSourceDocument.cpp
@@ -85,6 +85,7 @@
     table->parserAppendChild(m_tbody);
     m_tbody->lazyAttach();
     m_current = m_tbody;
+    m_lineNumber = 0;
 }
 
 void HTMLViewSourceDocument::addSource(const String& source, HTMLToken& token)
@@ -194,6 +195,9 @@
     // Create a cell that will hold the line number (it is generated in the stylesheet using counters).
     RefPtr<HTMLTableCellElement> td = HTMLTableCellElement::create(tdTag, this);
     td->setAttribute(classAttr, "webkit-line-number");
+    RefPtr<Text> t = Text::create(this, String::number(++m_lineNumber));
+    td->parserAppendChild(t);
+    t->lazyAttach();
     trow->parserAppendChild(td);
     td->lazyAttach();
 
diff --git a/Source/core/html/HTMLViewSourceDocument.h b/Source/core/html/HTMLViewSourceDocument.h
index 6fc8ccd..d35cad2 100644
--- a/Source/core/html/HTMLViewSourceDocument.h
+++ b/Source/core/html/HTMLViewSourceDocument.h
@@ -65,6 +65,7 @@
     RefPtr<Element> m_current;
     RefPtr<HTMLTableSectionElement> m_tbody;
     RefPtr<HTMLTableCellElement> m_td;
+    int m_lineNumber;
 };
 
 }
diff --git a/Source/core/html/ImageInputType.cpp b/Source/core/html/ImageInputType.cpp
index abfccc1..64ba937 100644
--- a/Source/core/html/ImageInputType.cpp
+++ b/Source/core/html/ImageInputType.cpp
@@ -103,7 +103,7 @@
 
 RenderObject* ImageInputType::createRenderer(RenderStyle*) const
 {
-    RenderImage* image = new (element()->document()->renderArena()) RenderImage(element());
+    RenderImage* image = new RenderImage(element());
     image->setImageResource(RenderImageResource::create());
     return image;
 }
diff --git a/Source/core/html/InputType.cpp b/Source/core/html/InputType.cpp
index 644d327..3fae879 100644
--- a/Source/core/html/InputType.cpp
+++ b/Source/core/html/InputType.cpp
@@ -526,9 +526,9 @@
     return true;
 }
 
-bool InputType::isKeyboardFocusable(KeyboardEvent* event) const
+bool InputType::isKeyboardFocusable() const
 {
-    return element()->isTextFormControlKeyboardFocusable(event);
+    return element()->isFocusable();
 }
 
 bool InputType::shouldShowFocusRingOnMouseFocus() const
diff --git a/Source/core/html/InputType.h b/Source/core/html/InputType.h
index a32b783..e8be8f1 100644
--- a/Source/core/html/InputType.h
+++ b/Source/core/html/InputType.h
@@ -193,7 +193,7 @@
     virtual bool shouldSubmitImplicitly(Event*);
     virtual PassRefPtr<HTMLFormElement> formForSubmission() const;
     virtual bool hasCustomFocusLogic() const;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const;
+    virtual bool isKeyboardFocusable() const;
     virtual bool shouldShowFocusRingOnMouseFocus() const;
     virtual bool shouldUseInputMethod() const;
     virtual void handleFocusEvent(Element* oldFocusedElement, FocusDirection);
diff --git a/Source/core/html/RadioInputType.cpp b/Source/core/html/RadioInputType.cpp
index 897abc7..19beb96 100644
--- a/Source/core/html/RadioInputType.cpp
+++ b/Source/core/html/RadioInputType.cpp
@@ -115,9 +115,9 @@
     dispatchSimulatedClickIfActive(event);
 }
 
-bool RadioInputType::isKeyboardFocusable(KeyboardEvent* event) const
+bool RadioInputType::isKeyboardFocusable() const
 {
-    if (!InputType::isKeyboardFocusable(event))
+    if (!InputType::isKeyboardFocusable())
         return false;
 
     // When using Spatial Navigation, every radio button should be focusable.
diff --git a/Source/core/html/RadioInputType.h b/Source/core/html/RadioInputType.h
index a5a9696..258a7f4 100644
--- a/Source/core/html/RadioInputType.h
+++ b/Source/core/html/RadioInputType.h
@@ -47,7 +47,7 @@
     virtual void handleClickEvent(MouseEvent*) OVERRIDE;
     virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
     virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
+    virtual bool isKeyboardFocusable() const OVERRIDE;
     virtual bool shouldSendChangeEventAfterCheckedChanged() OVERRIDE;
     virtual PassOwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
     virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE;
diff --git a/Source/core/html/RangeInputType.cpp b/Source/core/html/RangeInputType.cpp
index ebac793..0571747 100644
--- a/Source/core/html/RangeInputType.cpp
+++ b/Source/core/html/RangeInputType.cpp
@@ -256,7 +256,7 @@
 
 RenderObject* RangeInputType::createRenderer(RenderStyle*) const
 {
-    return new (element()->document()->renderArena()) RenderSlider(element());
+    return new RenderSlider(element());
 }
 
 Decimal RangeInputType::parseToNumber(const String& src, const Decimal& defaultValue) const
diff --git a/Source/core/html/SearchInputType.cpp b/Source/core/html/SearchInputType.cpp
index ae5b543..25a7d87 100644
--- a/Source/core/html/SearchInputType.cpp
+++ b/Source/core/html/SearchInputType.cpp
@@ -64,7 +64,7 @@
 
 RenderObject* SearchInputType::createRenderer(RenderStyle*) const
 {
-    return new (element()->document()->renderArena()) RenderSearchField(element());
+    return new RenderSearchField(element());
 }
 
 const AtomicString& SearchInputType::formControlType() const
diff --git a/Source/core/html/TextFieldInputType.cpp b/Source/core/html/TextFieldInputType.cpp
index 1cd61d6..a27c173 100644
--- a/Source/core/html/TextFieldInputType.cpp
+++ b/Source/core/html/TextFieldInputType.cpp
@@ -67,11 +67,6 @@
         m_innerSpinButton->removeSpinButtonOwner();
 }
 
-bool TextFieldInputType::isKeyboardFocusable(KeyboardEvent*) const
-{
-    return element()->isFocusable();
-}
-
 bool TextFieldInputType::shouldShowFocusRingOnMouseFocus() const
 {
     return true;
@@ -198,6 +193,12 @@
     }
 }
 
+void TextFieldInputType::handleFocusEvent(Element* oldFocusedNode, FocusDirection focusDirection)
+{
+    InputType::handleFocusEvent(oldFocusedNode, focusDirection);
+    element()->beginEditing();
+}
+
 void TextFieldInputType::handleBlurEvent()
 {
     InputType::handleBlurEvent();
@@ -211,7 +212,7 @@
 
 RenderObject* TextFieldInputType::createRenderer(RenderStyle*) const
 {
-    return new (element()->document()->renderArena()) RenderTextControlSingleLine(element());
+    return new RenderTextControlSingleLine(element());
 }
 
 bool TextFieldInputType::needsContainer() const
diff --git a/Source/core/html/TextFieldInputType.h b/Source/core/html/TextFieldInputType.h
index 79a0187..fd13350 100644
--- a/Source/core/html/TextFieldInputType.h
+++ b/Source/core/html/TextFieldInputType.h
@@ -66,6 +66,7 @@
     virtual void disabledAttributeChanged() OVERRIDE;
     virtual void readonlyAttributeChanged() OVERRIDE;
     virtual bool supportsReadOnly() const OVERRIDE;
+    virtual void handleFocusEvent(Element* oldFocusedNode, FocusDirection) OVERRIDE;
     virtual void handleBlurEvent() OVERRIDE;
     virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavior) OVERRIDE;
     virtual void updateInnerTextValue() OVERRIDE;
@@ -78,7 +79,6 @@
     virtual void didSetValueByUserEdit(ValueChangeState);
 
 private:
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
     virtual bool shouldShowFocusRingOnMouseFocus() const OVERRIDE;
     virtual bool isTextField() const OVERRIDE;
     virtual bool valueMissing(const String&) const OVERRIDE;
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index 1624836..e29bce5 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -34,6 +34,7 @@
 #include "core/html/canvas/CanvasRenderingContext2D.h"
 
 #include "CSSPropertyNames.h"
+#include "core/accessibility/AXObjectCache.h"
 #include "core/css/CSSFontSelector.h"
 #include "core/css/CSSParser.h"
 #include "core/css/StylePropertySet.h"
@@ -60,6 +61,7 @@
 #include "core/platform/graphics/TextRun.h"
 #include "core/platform/graphics/transforms/AffineTransform.h"
 #include "core/rendering/RenderLayer.h"
+#include "core/rendering/RenderTheme.h"
 #include "weborigin/SecurityOrigin.h"
 
 #include "wtf/CheckedArithmetic.h"
@@ -2337,4 +2339,73 @@
     return attributes.release();
 }
 
+void CanvasRenderingContext2D::drawSystemFocusRing(Element* element)
+{
+    if (!focusRingCallIsValid(m_path, element))
+        return;
+
+    updateFocusRingAccessibility(m_path, element);
+    if (element->focused())
+        drawFocusRing(m_path, element);
+}
+
+bool CanvasRenderingContext2D::drawCustomFocusRing(Element* element)
+{
+    if (!focusRingCallIsValid(m_path, element))
+        return false;
+
+    updateFocusRingAccessibility(m_path, element);
+
+    // Return true if the application should draw the focus ring. The spec allows us to
+    // override this for accessibility, but currently Blink doesn't take advantage of this.
+    return element->focused();
+}
+
+bool CanvasRenderingContext2D::focusRingCallIsValid(const Path& path, Element* element)
+{
+    if (!state().m_invertibleCTM)
+        return false;
+    if (path.isEmpty())
+        return false;
+    if (!element->isDescendantOf(canvas()))
+        return false;
+
+    return true;
+}
+
+void CanvasRenderingContext2D::updateFocusRingAccessibility(const Path& path, Element* element)
+{
+    // If accessibility is already enabled in this frame, associate this path's
+    // bounding box with the accessible object. Do this even if the element
+    // isn't focused because assistive technology might try to explore the object's
+    // location before it gets focus.
+    if (AXObjectCache* axObjectCache = element->document()->existingAXObjectCache()) {
+        if (AccessibilityObject* obj = axObjectCache->getOrCreate(element)) {
+            IntRect canvasRect = canvas()->renderer()->absoluteBoundingBoxRect();
+            LayoutRect rect = LayoutRect(path.boundingRect());
+            rect.moveBy(canvasRect.location());
+            obj->setElementRect(rect);
+        }
+    }
+}
+
+void CanvasRenderingContext2D::drawFocusRing(const Path& path, Element* element)
+{
+    GraphicsContext* c = drawingContext();
+    if (!c)
+        return;
+
+    c->save();
+    c->setAlpha(1.0);
+    c->clearShadow();
+    c->setCompositeOperation(CompositeSourceOver, BlendModeNormal);
+
+    RefPtr<RenderStyle> style(RenderStyle::createDefaultStyle());
+    Color focusRingColor = RenderTheme::focusRingColor();
+    c->drawFocusRing(path, style->outlineWidth(), style->outlineOffset(), focusRingColor);
+    didDraw(path.boundingRect());
+
+    c->restore();
+}
+
 } // namespace WebCore
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
index 6ec4525..80b91bc 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
@@ -48,6 +48,7 @@
 class CanvasPattern;
 class CanvasStyle;
 class DOMPath;
+class Element;
 class FloatRect;
 class GraphicsContext;
 class HTMLCanvasElement;
@@ -226,6 +227,9 @@
 
     PassRefPtr<Canvas2DContextAttributes> getContextAttributes() const;
 
+    void drawSystemFocusRing(Element*);
+    bool drawCustomFocusRing(Element*);
+
 private:
     struct State : FontSelectorClient {
         State();
@@ -321,6 +325,10 @@
     PassRefPtr<ImageData> getImageData(ImageBuffer::CoordinateSystem, float sx, float sy, float sw, float sh, ExceptionCode&) const;
     void putImageData(ImageData*, ImageBuffer::CoordinateSystem, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight, ExceptionCode&);
 
+    bool focusRingCallIsValid(const Path&, Element*);
+    void updateFocusRingAccessibility(const Path&, Element*);
+    void drawFocusRing(const Path&, Element*);
+
     virtual bool is2d() const OVERRIDE { return true; }
     virtual bool isAccelerated() const OVERRIDE;
     virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; }
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.idl b/Source/core/html/canvas/CanvasRenderingContext2D.idl
index ed6cbc4..799b6c4 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.idl
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.idl
@@ -159,6 +159,10 @@
 
     [RaisesException] ImageData webkitGetImageDataHD(float sx, float sy, float sw, float sh);
 
+    // Focus rings
+    [EnabledAtRuntime=experimentalCanvasFeatures] void drawSystemFocusRing(Element element);
+    [EnabledAtRuntime=experimentalCanvasFeatures] boolean drawCustomFocusRing(Element element);
+
     readonly attribute float webkitBackingStorePixelRatio;
 
     attribute boolean webkitImageSmoothingEnabled;
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
index ea90d34..e03fd7b 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -1177,7 +1177,7 @@
 
 void WebGLRenderingContext::blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha)
 {
-    if (isContextLost() || !validateBlendEquation("blendEquation", modeRGB) || !validateBlendEquation("blendEquation", modeAlpha))
+    if (isContextLost() || !validateBlendEquation("blendEquationSeparate", modeRGB) || !validateBlendEquation("blendEquationSeparate", modeAlpha))
         return;
     m_context->blendEquationSeparate(modeRGB, modeAlpha);
 }
@@ -1193,7 +1193,7 @@
 void WebGLRenderingContext::blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha)
 {
     // Note: Alpha does not have the same restrictions as RGB.
-    if (isContextLost() || !validateBlendFuncFactors("blendFunc", srcRGB, dstRGB))
+    if (isContextLost() || !validateBlendFuncFactors("blendFuncSeparate", srcRGB, dstRGB))
         return;
     m_context->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
 }
@@ -1595,6 +1595,15 @@
 {
     if (isContextLost())
         return;
+    switch (mode) {
+    case GraphicsContext3D::FRONT_AND_BACK:
+    case GraphicsContext3D::FRONT:
+    case GraphicsContext3D::BACK:
+        break;
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "cullFace", "invalid mode");
+        return;
+    }
     m_context->cullFace(mode);
 }
 
@@ -1678,6 +1687,8 @@
 {
     if (isContextLost())
         return;
+    if (!validateStencilOrDepthFunc("depthFunc", func))
+        return;
     m_context->depthFunc(func);
 }
 
@@ -1967,6 +1978,14 @@
 {
     if (isContextLost())
         return;
+    switch (mode) {
+    case GraphicsContext3D::CW:
+    case GraphicsContext3D::CCW:
+        break;
+    default:
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "frontFace", "invalid mode");
+        return;
+    }
     m_context->frontFace(mode);
 }
 
@@ -2843,6 +2862,10 @@
 {
     if (isContextLost())
         return 0;
+    if (pname != GraphicsContext3D::VERTEX_ATTRIB_ARRAY_POINTER) {
+        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "getVertexAttribOffset", "invalid parameter name");
+        return 0;
+    }
     GC3Dsizeiptr result = m_context->getVertexAttribOffset(index, pname);
     return static_cast<long long>(result);
 }
@@ -3169,7 +3192,7 @@
 {
     if (isContextLost())
         return;
-    if (!validateStencilFunc("stencilFunc", func))
+    if (!validateStencilOrDepthFunc("stencilFunc", func))
         return;
     m_stencilFuncRef = ref;
     m_stencilFuncRefBack = ref;
@@ -3182,7 +3205,7 @@
 {
     if (isContextLost())
         return;
-    if (!validateStencilFunc("stencilFuncSeparate", func))
+    if (!validateStencilOrDepthFunc("stencilFuncSeparate", func))
         return;
     switch (face) {
     case GraphicsContext3D::FRONT_AND_BACK:
@@ -4934,7 +4957,7 @@
     return true;
 }
 
-bool WebGLRenderingContext::validateStencilFunc(const char* functionName, GC3Denum func)
+bool WebGLRenderingContext::validateStencilOrDepthFunc(const char* functionName, GC3Denum func)
 {
     switch (func) {
     case GraphicsContext3D::NEVER:
diff --git a/Source/core/html/canvas/WebGLRenderingContext.h b/Source/core/html/canvas/WebGLRenderingContext.h
index 4b7de61..d758090 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.h
+++ b/Source/core/html/canvas/WebGLRenderingContext.h
@@ -764,8 +764,8 @@
     // Helper function to validate if front/back stencilMask and stencilFunc settings are the same.
     bool validateStencilSettings(const char* functionName);
 
-    // Helper function to validate stencil func.
-    bool validateStencilFunc(const char* functionName, GC3Denum);
+    // Helper function to validate stencil or depth func.
+    bool validateStencilOrDepthFunc(const char* functionName, GC3Denum);
 
     // Helper function for texParameterf and texParameteri.
     void texParameter(GC3Denum target, GC3Denum pname, GC3Dfloat parami, GC3Dint paramf, bool isFloat);
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index c799a6f..1719851 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -207,7 +207,9 @@
 
 void HTMLDocumentParser::pumpTokenizerIfPossible(SynchronousMode mode)
 {
-    if (isStopped() || isWaitingForScripts())
+    if (isStopped())
+        return;
+    if (isWaitingForScripts())
         return;
 
     // Once a resume is scheduled, HTMLParserScheduler controls when we next pump.
@@ -271,7 +273,9 @@
 
         // If we're paused waiting for a script, we try to execute scripts before continuing.
         runScriptsForPausedTreeBuilder();
-        if (isWaitingForScripts() || isStopped())
+        if (isStopped())
+            return false;
+        if (isWaitingForScripts())
             return false;
     }
 
@@ -461,7 +465,11 @@
     while (!m_speculations.isEmpty()) {
         processParsedChunkFromBackgroundParser(m_speculations.takeFirst());
 
-        if (isWaitingForScripts() || isStopped())
+        // The order matters! If this isStopped(), isWaitingForScripts() can hit and ASSERT since
+        // m_document can be null which is used to decide the readiness.
+        if (isStopped())
+            break;
+        if (isWaitingForScripts())
             break;
 
         if (currentTime() - startTime > parserTimeLimit && !m_speculations.isEmpty()) {
diff --git a/Source/core/html/parser/HTMLResourcePreloader.cpp b/Source/core/html/parser/HTMLResourcePreloader.cpp
index 9e258ed..7c4f8b4 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -27,9 +27,9 @@
 #include "core/html/parser/HTMLResourcePreloader.h"
 
 #include "core/dom/Document.h"
+#include "core/html/HTMLImport.h"
 #include "core/loader/cache/FetchInitiatorInfo.h"
 #include "core/loader/cache/ResourceFetcher.h"
-
 #include "core/css/MediaList.h"
 #include "core/css/MediaQueryEvaluator.h"
 #include "core/rendering/RenderObject.h"
@@ -82,14 +82,17 @@
 
 void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
 {
-    ASSERT(m_document->frame());
-    ASSERT(m_document->renderer());
-    ASSERT(m_document->renderer()->style());
-    if (!preload->media().isEmpty() && !mediaAttributeMatches(m_document->frame(), m_document->renderer()->style(), preload->media()))
+    Document* executingDocument = m_document->import() ? m_document->import()->master() : m_document;
+    Document* loadingDocument = m_document;
+
+    ASSERT(executingDocument->frame());
+    ASSERT(executingDocument->renderer());
+    ASSERT(executingDocument->renderer()->style());
+    if (!preload->media().isEmpty() && !mediaAttributeMatches(executingDocument->frame(), executingDocument->renderer()->style(), preload->media()))
         return;
 
     FetchRequest request = preload->resourceRequest(m_document);
-    m_document->fetcher()->preload(preload->resourceType(), request, preload->charset());
+    loadingDocument->fetcher()->preload(preload->resourceType(), request, preload->charset());
 }
 
 
diff --git a/Source/core/html/shadow/DetailsMarkerControl.cpp b/Source/core/html/shadow/DetailsMarkerControl.cpp
index fa15d0c..6a5e4aa 100644
--- a/Source/core/html/shadow/DetailsMarkerControl.cpp
+++ b/Source/core/html/shadow/DetailsMarkerControl.cpp
@@ -46,7 +46,7 @@
 
 RenderObject* DetailsMarkerControl::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderDetailsMarker(this);
+    return new RenderDetailsMarker(this);
 }
 
 bool DetailsMarkerControl::rendererIsNeeded(const NodeRenderingContext& context)
diff --git a/Source/core/html/shadow/HTMLShadowElement.cpp b/Source/core/html/shadow/HTMLShadowElement.cpp
index b692d59..d7583e4 100644
--- a/Source/core/html/shadow/HTMLShadowElement.cpp
+++ b/Source/core/html/shadow/HTMLShadowElement.cpp
@@ -60,7 +60,7 @@
     if (!containingRoot)
         return 0;
 
-    containingRoot->host()->ensureDistribution();
+    document()->updateDistributionForNodeIfNeeded(this);
 
     ShadowRoot* older = containingRoot->olderShadowRoot();
     if (!older || !older->shouldExposeToBindings() || older->insertionPoint() != this)
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index 6cc16b1..44d62fe 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -33,7 +33,7 @@
 
 #include "core/dom/EventNames.h"
 #include "core/dom/ExceptionCodePlaceholder.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/MouseEvent.h"
 #include "core/html/DOMTokenList.h"
 #include "core/html/HTMLVideoElement.h"
@@ -581,10 +581,10 @@
         // video implementation without requiring them to implement their own full
         // screen behavior.
         if (document()->settings() && document()->settings()->fullScreenEnabled()) {
-            if (FullscreenController::isActiveFullScreenElement(toParentMediaElement(this)))
-                FullscreenController::from(document())->webkitCancelFullScreen();
+            if (FullscreenElementStack::isActiveFullScreenElement(toParentMediaElement(this)))
+                FullscreenElementStack::from(document())->webkitCancelFullScreen();
             else
-                FullscreenController::from(document())->requestFullScreenForElement(toParentMediaElement(this), 0, FullscreenController::ExemptIFrameAllowFullScreenRequirement);
+                FullscreenElementStack::from(document())->requestFullScreenForElement(toParentMediaElement(this), 0, FullscreenElementStack::ExemptIFrameAllowFullScreenRequirement);
         } else
             mediaController()->enterFullscreen();
         event->setDefaultHandled();
@@ -666,7 +666,7 @@
 
 RenderObject* MediaControlTextTrackContainerElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderTextTrackContainerElement(this);
+    return new RenderTextTrackContainerElement(this);
 }
 
 const AtomicString& MediaControlTextTrackContainerElement::textTrackContainerElementShadowPseudoId()
diff --git a/Source/core/html/shadow/MeterShadowElement.cpp b/Source/core/html/shadow/MeterShadowElement.cpp
index df0220b..5c9fca5 100644
--- a/Source/core/html/shadow/MeterShadowElement.cpp
+++ b/Source/core/html/shadow/MeterShadowElement.cpp
@@ -81,7 +81,7 @@
 
 RenderObject* MeterInnerElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderMeter(this);
+    return new RenderMeter(this);
 }
 
 inline MeterBarElement::MeterBarElement(Document* document)
diff --git a/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp b/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
index 5b5fae8..821c4d3 100644
--- a/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
+++ b/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
@@ -131,7 +131,7 @@
 
 RenderObject* PasswordGeneratorButtonElement::createRenderer(RenderStyle*)
 {
-    RenderImage* image = new (document()->renderArena()) RenderImage(this);
+    RenderImage* image = new RenderImage(this);
     image->setImageResource(RenderImageResource::create());
     return image;
 }
diff --git a/Source/core/html/shadow/PickerIndicatorElement.cpp b/Source/core/html/shadow/PickerIndicatorElement.cpp
index 3fedf69..96b4b5e 100644
--- a/Source/core/html/shadow/PickerIndicatorElement.cpp
+++ b/Source/core/html/shadow/PickerIndicatorElement.cpp
@@ -66,7 +66,7 @@
 
 RenderObject* PickerIndicatorElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderDetailsMarker(this);
+    return new RenderDetailsMarker(this);
 }
 
 void PickerIndicatorElement::defaultEventHandler(Event* event)
diff --git a/Source/core/html/shadow/ProgressShadowElement.cpp b/Source/core/html/shadow/ProgressShadowElement.cpp
index f51dd94..7720f2f 100644
--- a/Source/core/html/shadow/ProgressShadowElement.cpp
+++ b/Source/core/html/shadow/ProgressShadowElement.cpp
@@ -72,7 +72,7 @@
 
 RenderObject* ProgressInnerElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderProgress(this);
+    return new RenderProgress(this);
 }
 
 bool ProgressInnerElement::rendererIsNeeded(const NodeRenderingContext& context)
diff --git a/Source/core/html/shadow/SliderThumbElement.cpp b/Source/core/html/shadow/SliderThumbElement.cpp
index 24d35eb..e444df4 100644
--- a/Source/core/html/shadow/SliderThumbElement.cpp
+++ b/Source/core/html/shadow/SliderThumbElement.cpp
@@ -221,7 +221,7 @@
 
 RenderObject* SliderThumbElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSliderThumb(this);
+    return new RenderSliderThumb(this);
 }
 
 bool SliderThumbElement::isDisabledFormControl() const
@@ -449,7 +449,7 @@
 
 RenderObject* SliderContainerElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSliderContainer(this);
+    return new RenderSliderContainer(this);
 }
 
 const AtomicString& SliderContainerElement::shadowPseudoId() const
diff --git a/Source/core/html/shadow/TextControlInnerElements.cpp b/Source/core/html/shadow/TextControlInnerElements.cpp
index 366b7df..367c9bd 100644
--- a/Source/core/html/shadow/TextControlInnerElements.cpp
+++ b/Source/core/html/shadow/TextControlInnerElements.cpp
@@ -59,7 +59,7 @@
 
 RenderObject* TextControlInnerContainer::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderTextControlInnerContainer(this);
+    return new RenderTextControlInnerContainer(this);
 }
 
 TextControlInnerElement::TextControlInnerElement(Document* document)
@@ -113,7 +113,7 @@
 
 RenderObject* TextControlInnerTextElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderTextControlInnerBlock(this);
+    return new RenderTextControlInnerBlock(this);
 }
 
 PassRefPtr<RenderStyle> TextControlInnerTextElement::customStyleForRenderer()
diff --git a/Source/core/html/track/TextTrackCue.cpp b/Source/core/html/track/TextTrackCue.cpp
index 2798f80..d7c0a4f 100644
--- a/Source/core/html/track/TextTrackCue.cpp
+++ b/Source/core/html/track/TextTrackCue.cpp
@@ -180,7 +180,7 @@
 
 RenderObject* TextTrackCueBox::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderTextTrackCue(this);
+    return new RenderTextTrackCue(this);
 }
 
 // ----------------------------
diff --git a/Source/core/injected_canvas_script_source.target.darwin-arm.mk b/Source/core/injected_canvas_script_source.target.darwin-arm.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.darwin-arm.mk
+++ b/Source/core/injected_canvas_script_source.target.darwin-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_canvas_script_source.target.darwin-mips.mk b/Source/core/injected_canvas_script_source.target.darwin-mips.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.darwin-mips.mk
+++ b/Source/core/injected_canvas_script_source.target.darwin-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_canvas_script_source.target.darwin-x86.mk b/Source/core/injected_canvas_script_source.target.darwin-x86.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.darwin-x86.mk
+++ b/Source/core/injected_canvas_script_source.target.darwin-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_canvas_script_source.target.linux-arm.mk b/Source/core/injected_canvas_script_source.target.linux-arm.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.linux-arm.mk
+++ b/Source/core/injected_canvas_script_source.target.linux-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_canvas_script_source.target.linux-mips.mk b/Source/core/injected_canvas_script_source.target.linux-mips.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.linux-mips.mk
+++ b/Source/core/injected_canvas_script_source.target.linux-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_canvas_script_source.target.linux-x86.mk b/Source/core/injected_canvas_script_source.target.linux-x86.mk
index 8473a70..1e31c52 100644
--- a/Source/core/injected_canvas_script_source.target.linux-x86.mk
+++ b/Source/core/injected_canvas_script_source.target.linux-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptCanvasModuleSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h from inspector/InjectedScriptCanvasModuleSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptCanvasModuleSource_js inspector/InjectedScriptCanvasModuleSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptCanvasModuleSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptCanvasModuleSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.darwin-arm.mk b/Source/core/injected_script_source.target.darwin-arm.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.darwin-arm.mk
+++ b/Source/core/injected_script_source.target.darwin-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.darwin-mips.mk b/Source/core/injected_script_source.target.darwin-mips.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.darwin-mips.mk
+++ b/Source/core/injected_script_source.target.darwin-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.darwin-x86.mk b/Source/core/injected_script_source.target.darwin-x86.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.darwin-x86.mk
+++ b/Source/core/injected_script_source.target.darwin-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.linux-arm.mk b/Source/core/injected_script_source.target.linux-arm.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.linux-arm.mk
+++ b/Source/core/injected_script_source.target.linux-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.linux-mips.mk b/Source/core/injected_script_source.target.linux-mips.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.linux-mips.mk
+++ b/Source/core/injected_script_source.target.linux-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/injected_script_source.target.linux-x86.mk b/Source/core/injected_script_source.target.linux-x86.mk
index 77d9c26..e10dc02 100644
--- a/Source/core/injected_script_source.target.linux-x86.mk
+++ b/Source/core/injected_script_source.target.linux-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h"
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InjectedScriptSource.js $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h from inspector/InjectedScriptSource.js ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InjectedScriptSource_js inspector/InjectedScriptSource.js "$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InjectedScriptSource.h
+	$(gyp_shared_intermediate_dir)/blink/InjectedScriptSource.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index d18aa31..e07fa5d 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -66,7 +66,6 @@
 
 namespace CSSAgentState {
 static const char cssAgentEnabled[] = "cssAgentEnabled";
-static const char isSelectorProfiling[] = "isSelectorProfiling";
 }
 
 namespace WebCore {
@@ -79,60 +78,6 @@
     PseudoVisited = 1 << 3
 };
 
-struct RuleMatchData {
-    String selector;
-    String url;
-    unsigned lineNumber;
-    double startTime;
-};
-
-struct RuleMatchingStats {
-    RuleMatchingStats()
-        : lineNumber(0), totalTime(0.0), hits(0), matches(0)
-    {
-    }
-    RuleMatchingStats(const RuleMatchData& data, double totalTime, unsigned hits, unsigned matches)
-        : selector(data.selector), url(data.url), lineNumber(data.lineNumber), totalTime(totalTime), hits(hits), matches(matches)
-    {
-    }
-
-    String selector;
-    String url;
-    unsigned lineNumber;
-    double totalTime;
-    unsigned hits;
-    unsigned matches;
-};
-
-class SelectorProfile {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    SelectorProfile()
-        : m_totalMatchingTimeMs(0.0)
-    {
-    }
-    virtual ~SelectorProfile()
-    {
-    }
-
-    double totalMatchingTimeMs() const { return m_totalMatchingTimeMs; }
-
-    String makeKey();
-    void startSelector(const CSSStyleRule*);
-    void commitSelector(bool);
-    void commitSelectorTime();
-    PassRefPtr<TypeBuilder::CSS::SelectorProfile> toInspectorObject() const;
-
-private:
-
-    // Key is "selector?url:line".
-    typedef HashMap<String, RuleMatchingStats> RuleMatchingStatsMap;
-
-    double m_totalMatchingTimeMs;
-    RuleMatchingStatsMap m_ruleMatchingStats;
-    RuleMatchData m_currentMatchData;
-};
-
 class StyleSheetAppender {
 public:
     StyleSheetAppender(CSSStyleSheetToInspectorStyleSheet& cssStyleSheetToInspectorStyleSheet, Vector<CSSStyleSheet*>& result)
@@ -192,72 +137,6 @@
     return result;
 }
 
-inline String SelectorProfile::makeKey()
-{
-    return m_currentMatchData.selector + "?" + m_currentMatchData.url + ":" + String::number(m_currentMatchData.lineNumber);
-}
-
-inline void SelectorProfile::startSelector(const CSSStyleRule* rule)
-{
-    m_currentMatchData.selector = rule->selectorText();
-    CSSStyleSheet* styleSheet = rule->parentStyleSheet();
-    String url = emptyString();
-    if (styleSheet) {
-        url = InspectorStyleSheet::styleSheetURL(styleSheet);
-        if (url.isEmpty())
-            url = InspectorDOMAgent::documentURLString(styleSheet->ownerDocument());
-    }
-    m_currentMatchData.url = url;
-    m_currentMatchData.lineNumber = rule->styleRule()->sourceLine();
-    m_currentMatchData.startTime = WTF::currentTimeMS();
-}
-
-inline void SelectorProfile::commitSelector(bool matched)
-{
-    double matchTimeMs = WTF::currentTimeMS() - m_currentMatchData.startTime;
-    m_totalMatchingTimeMs += matchTimeMs;
-
-    RuleMatchingStatsMap::AddResult result = m_ruleMatchingStats.add(makeKey(), RuleMatchingStats(m_currentMatchData, matchTimeMs, 1, matched ? 1 : 0));
-    if (!result.isNewEntry) {
-        result.iterator->value.totalTime += matchTimeMs;
-        result.iterator->value.hits += 1;
-        if (matched)
-            result.iterator->value.matches += 1;
-    }
-}
-
-inline void SelectorProfile::commitSelectorTime()
-{
-    double processingTimeMs = WTF::currentTimeMS() - m_currentMatchData.startTime;
-    m_totalMatchingTimeMs += processingTimeMs;
-
-    RuleMatchingStatsMap::iterator it = m_ruleMatchingStats.find(makeKey());
-    if (it == m_ruleMatchingStats.end())
-        return;
-
-    it->value.totalTime += processingTimeMs;
-}
-
-PassRefPtr<TypeBuilder::CSS::SelectorProfile> SelectorProfile::toInspectorObject() const
-{
-    RefPtr<TypeBuilder::Array<TypeBuilder::CSS::SelectorProfileEntry> > selectorProfileData = TypeBuilder::Array<TypeBuilder::CSS::SelectorProfileEntry>::create();
-    for (RuleMatchingStatsMap::const_iterator it = m_ruleMatchingStats.begin(); it != m_ruleMatchingStats.end(); ++it) {
-        RefPtr<TypeBuilder::CSS::SelectorProfileEntry> entry = TypeBuilder::CSS::SelectorProfileEntry::create()
-            .setSelector(it->value.selector)
-            .setUrl(it->value.url)
-            .setLineNumber(it->value.lineNumber)
-            .setTime(it->value.totalTime)
-            .setHitCount(it->value.hits)
-            .setMatchCount(it->value.matches);
-        selectorProfileData->addItem(entry.release());
-    }
-
-    RefPtr<TypeBuilder::CSS::SelectorProfile> result = TypeBuilder::CSS::SelectorProfile::create()
-        .setTotalTime(totalMatchingTimeMs())
-        .setData(selectorProfileData);
-    return result.release();
-}
-
 class UpdateRegionLayoutTask {
 public:
     UpdateRegionLayoutTask(InspectorCSSAgent*);
@@ -865,7 +744,6 @@
     ASSERT(m_frontend);
     m_frontend = 0;
     resetNonPersistentData();
-    stopSelectorProfilerImpl(0, false);
 }
 
 void InspectorCSSAgent::discardAgent()
@@ -880,10 +758,6 @@
         ErrorString error;
         enable(&error);
     }
-    if (m_state->getBoolean(CSSAgentState::isSelectorProfiling)) {
-        String errorString;
-        startSelectorProfiler(&errorString);
-    }
 }
 
 void InspectorCSSAgent::reset()
@@ -1472,53 +1346,6 @@
     return hasItems ? mediaArray : 0;
 }
 
-void InspectorCSSAgent::startSelectorProfiler(ErrorString*)
-{
-    m_currentSelectorProfile = adoptPtr(new SelectorProfile());
-    m_state->setBoolean(CSSAgentState::isSelectorProfiling, true);
-}
-
-void InspectorCSSAgent::stopSelectorProfiler(ErrorString* errorString, RefPtr<TypeBuilder::CSS::SelectorProfile>& result)
-{
-    result = stopSelectorProfilerImpl(errorString, true);
-}
-
-PassRefPtr<TypeBuilder::CSS::SelectorProfile> InspectorCSSAgent::stopSelectorProfilerImpl(ErrorString*, bool needProfile)
-{
-    if (!m_state->getBoolean(CSSAgentState::isSelectorProfiling))
-        return 0;
-    m_state->setBoolean(CSSAgentState::isSelectorProfiling, false);
-    RefPtr<TypeBuilder::CSS::SelectorProfile> result;
-    if (m_frontend && needProfile)
-        result = m_currentSelectorProfile->toInspectorObject();
-    m_currentSelectorProfile.clear();
-    return result.release();
-}
-
-void InspectorCSSAgent::willMatchRule(StyleRule* rule, InspectorCSSOMWrappers& inspectorCSSOMWrappers, DocumentStyleSheetCollection* styleSheetCollection)
-{
-    if (m_currentSelectorProfile)
-        m_currentSelectorProfile->startSelector(inspectorCSSOMWrappers.getWrapperForRuleInSheets(rule, styleSheetCollection));
-}
-
-void InspectorCSSAgent::didMatchRule(bool matched)
-{
-    if (m_currentSelectorProfile)
-        m_currentSelectorProfile->commitSelector(matched);
-}
-
-void InspectorCSSAgent::willProcessRule(StyleRule* rule, StyleResolver* styleResolver)
-{
-    if (m_currentSelectorProfile)
-        m_currentSelectorProfile->startSelector(styleResolver->inspectorCSSOMWrappers().getWrapperForRuleInSheets(rule, styleResolver->document()->styleSheetCollection()));
-}
-
-void InspectorCSSAgent::didProcessRule()
-{
-    if (m_currentSelectorProfile)
-        m_currentSelectorProfile->commitSelectorTime();
-}
-
 InspectorStyleSheetForInlineStyle* InspectorCSSAgent::asInspectorStyleSheet(Element* element)
 {
     NodeToInspectorStyleSheet::iterator it = m_nodeToInspectorStyleSheet.find(element);
diff --git a/Source/core/inspector/InspectorCSSAgent.h b/Source/core/inspector/InspectorCSSAgent.h
index 29341ff..fda3fd6 100644
--- a/Source/core/inspector/InspectorCSSAgent.h
+++ b/Source/core/inspector/InspectorCSSAgent.h
@@ -58,7 +58,6 @@
 class NameNodeMap;
 class Node;
 class NodeList;
-class SelectorProfile;
 class StyleResolver;
 class StyleRule;
 class StyleSheetVisitor;
@@ -148,14 +147,6 @@
     virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<JSONArray>& forcedPseudoClasses);
     virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result);
 
-    virtual void startSelectorProfiler(ErrorString*);
-    virtual void stopSelectorProfiler(ErrorString*, RefPtr<TypeBuilder::CSS::SelectorProfile>&);
-
-    PassRefPtr<TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(ErrorString*, bool needProfile);
-    void willMatchRule(StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection*);
-    void didMatchRule(bool);
-    void willProcessRule(StyleRule*, StyleResolver*);
-    void didProcessRule();
     PassRefPtr<TypeBuilder::CSS::CSSMedia> buildMediaObject(const MediaList*, MediaListSource, const String&, CSSStyleSheet*);
     PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSMedia> > buildMediaListChain(CSSRule*);
 
@@ -224,8 +215,6 @@
     bool m_creatingViaInspectorStyleSheet;
     bool m_isSettingStyleSheetText;
 
-    OwnPtr<SelectorProfile> m_currentSelectorProfile;
-
     friend class ChangeRegionOversetTask;
     friend class StyleSheetBinder;
     friend class UpdateRegionLayoutTask;
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 9b73579..5de1f85 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -350,12 +350,8 @@
             unbind(contentDocument, nodesMap);
     }
 
-    if (node->isElementNode()) {
-        if (ElementShadow* shadow = toElement(node)->shadow()) {
-            for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = root->olderShadowRoot())
-                unbind(root, nodesMap);
-        }
-    }
+    for (ShadowRoot* root = node->youngestShadowRoot(); root; root = root->olderShadowRoot())
+        unbind(root, nodesMap);
 
     nodesMap->remove(node);
     if (m_domListener)
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 3e011ce..373f0ac 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -66,8 +66,11 @@
 static const char columnNumber[] = "columnNumber";
 static const char condition[] = "condition";
 static const char isAnti[] = "isAnti";
+static const char skipStackPattern[] = "skipStackPattern";
 };
 
+static const int numberOfStepsBeforeStepOut = 10;
+
 const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace";
 
 static String breakpointIdSuffix(InspectorDebuggerAgent::BreakpointSource source)
@@ -95,6 +98,7 @@
     , m_pausedScriptState(0)
     , m_javaScriptPauseScheduled(false)
     , m_listener(0)
+    , m_skipStepInCount(numberOfStepsBeforeStepOut)
 {
     // FIXME: make breakReason optional so that there was no need to init it with "other".
     clearBreakDetails();
@@ -122,6 +126,7 @@
 {
     m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, JSONObject::create());
     m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServer::DontPauseOnExceptions);
+    m_state->setString(DebuggerAgentState::skipStackPattern, "");
     m_instrumentingAgents->setInspectorDebuggerAgent(0);
 
     stopListeningScriptDebugServer();
@@ -158,6 +163,16 @@
     m_state->setBoolean(DebuggerAgentState::debuggerEnabled, false);
 }
 
+static PassOwnPtr<RegularExpression> compileSkipCallFramePattern(String patternText)
+{
+    if (patternText.isEmpty())
+        return nullptr;
+    OwnPtr<RegularExpression> result = adoptPtr(new RegularExpression(patternText, TextCaseSensitive));
+    if (!result->isValid())
+        result.clear();
+    return result.release();
+}
+
 void InspectorDebuggerAgent::restore()
 {
     if (enabled()) {
@@ -166,6 +181,7 @@
         long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptionsState);
         String error;
         setPauseOnExceptionsImpl(&error, pauseState);
+        m_cachedSkipStackRegExp = compileSkipCallFramePattern(m_state->getString(DebuggerAgentState::skipStackPattern));
     }
 }
 
@@ -393,22 +409,28 @@
     callFrames = currentCallFrames();
 }
 
-bool InspectorDebuggerAgent::shouldSkipPause(RefPtr<JavaScriptCallFrame>& topFrame)
+String InspectorDebuggerAgent::scriptURL(JavaScriptCallFrame* frame)
 {
+    String scriptIdString = String::number(frame->sourceID());
+    ScriptsMap::iterator it = m_scripts.find(scriptIdString);
+    if (it == m_scripts.end())
+        return String();
+    return it->value.url;
+}
+
+ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipExceptionPause(RefPtr<JavaScriptCallFrame>& topFrame)
+{
+    String topFrameScriptUrl = scriptURL(topFrame.get());
+    if (m_cachedSkipStackRegExp && !topFrameScriptUrl.isEmpty() && m_cachedSkipStackRegExp->match(topFrameScriptUrl) != -1)
+        return ScriptDebugListener::Continue;
+
     // Prepare top frame parameters;
     int topFrameLineNumber = topFrame->line();
     int topFrameColumnNumber = topFrame->column();
-    String topFrameScriptIdString = String::number(topFrame->sourceID());
-    String topFrameScriptUrl;
-    {
-        ScriptsMap::iterator it = m_scripts.find(topFrameScriptIdString);
-        if (it != m_scripts.end())
-            topFrameScriptUrl = it->value.url;
-    }
 
     // Match against breakpoints.
     if (topFrameScriptUrl.isEmpty())
-        return false;
+        return ScriptDebugListener::NoSkip;
 
     RefPtr<JSONObject> breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
     for (JSONObject::iterator it = breakpointsCookie->begin(); it != breakpointsCookie->end(); ++it) {
@@ -436,10 +458,30 @@
         if (!matches(topFrameScriptUrl, url, isRegex))
             continue;
 
-        return true;
+        return ScriptDebugListener::Continue;
     }
 
-    return false;
+    return ScriptDebugListener::NoSkip;
+}
+
+ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipBreakpointPause(RefPtr<JavaScriptCallFrame>& topFrame)
+{
+    return ScriptDebugListener::NoSkip;
+}
+
+ScriptDebugListener::SkipPauseRequest InspectorDebuggerAgent::shouldSkipStepPause(RefPtr<JavaScriptCallFrame>& topFrame)
+{
+    if (m_cachedSkipStackRegExp) {
+        String scriptUrl = scriptURL(topFrame.get());
+        if (!scriptUrl.isEmpty() && m_cachedSkipStackRegExp->match(scriptUrl) != -1) {
+            if (m_skipStepInCount > 0) {
+                --m_skipStepInCount;
+                return ScriptDebugListener::StepInto;
+            }
+            return ScriptDebugListener::StepOut;
+        }
+    }
+    return ScriptDebugListener::NoSkip;
 }
 
 PassRefPtr<TypeBuilder::Debugger::Location> InspectorDebuggerAgent::resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint& breakpoint, BreakpointSource source)
@@ -737,6 +779,21 @@
     injectedScript.setVariableValue(errorString, m_currentCallStack, callFrameId, functionObjectId, scopeNumber, variableName, newValueString);
 }
 
+void InspectorDebuggerAgent::skipStackFrames(ErrorString* errorString, const String* pattern)
+{
+    OwnPtr<RegularExpression> compiled;
+    String patternValue = pattern ? *pattern : "";
+    if (!patternValue.isEmpty()) {
+        compiled = compileSkipCallFramePattern(patternValue);
+        if (!compiled) {
+            *errorString = "Invalid regular expression";
+            return;
+        }
+    }
+    m_state->setString(DebuggerAgentState::skipStackPattern, patternValue);
+    m_cachedSkipStackRegExp = compiled.release();
+}
+
 void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directiveText)
 {
     if (scriptDebugServer().pauseOnExceptionsState() != ScriptDebugServer::DontPauseOnExceptions) {
@@ -834,6 +891,8 @@
     m_pausedScriptState = scriptState;
     m_currentCallStack = callFrames;
 
+    m_skipStepInCount = numberOfStepsBeforeStepOut;
+
     if (!exception.hasNoValue()) {
         InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
         if (!injectedScript.hasNoValue()) {
diff --git a/Source/core/inspector/InspectorDebuggerAgent.h b/Source/core/inspector/InspectorDebuggerAgent.h
index df71914..8c60acf 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.h
+++ b/Source/core/inspector/InspectorDebuggerAgent.h
@@ -55,6 +55,7 @@
 class ScriptCallStack;
 class ScriptDebugServer;
 class ScriptValue;
+class RegularExpression;
 
 typedef String ErrorString;
 
@@ -119,6 +120,7 @@
     void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown);
     virtual void setOverlayMessage(ErrorString*, const String*);
     virtual void setVariableValue(ErrorString*, int in_scopeNumber, const String& in_variableName, const RefPtr<JSONObject>& in_newValue, const String* in_callFrame, const String* in_functionObjectId);
+    virtual void skipStackFrames(ErrorString*, const String* pattern);
 
     void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data);
     void didFireTimer();
@@ -142,6 +144,10 @@
     void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource, const String& condition = String());
     void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource);
 
+    SkipPauseRequest shouldSkipExceptionPause(RefPtr<JavaScriptCallFrame>& topFrame);
+    SkipPauseRequest shouldSkipBreakpointPause(RefPtr<JavaScriptCallFrame>& topFrame);
+    SkipPauseRequest shouldSkipStepPause(RefPtr<JavaScriptCallFrame>& topFrame);
+
 protected:
     InspectorDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*);
 
@@ -153,8 +159,6 @@
     virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) = 0;
     virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL) = 0;
 
-    virtual bool shouldSkipPause(RefPtr<JavaScriptCallFrame>& topFrame);
-
     virtual void enable();
     virtual void disable();
     virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints);
@@ -182,6 +186,8 @@
 
     String sourceMapURLForScript(const Script&);
 
+    String scriptURL(JavaScriptCallFrame*);
+
     typedef HashMap<String, Script> ScriptsMap;
     typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpointIdsMap;
     typedef HashMap<String, std::pair<String, BreakpointSource> > DebugServerBreakpointToBreakpointIdAndSourceMap;
@@ -198,6 +204,9 @@
     RefPtr<JSONObject> m_breakAuxData;
     bool m_javaScriptPauseScheduled;
     Listener* m_listener;
+
+    int m_skipStepInCount;
+    OwnPtr<RegularExpression> m_cachedSkipStackRegExp;
 };
 
 } // namespace WebCore
diff --git a/Source/core/inspector/InspectorFrontendClient.h b/Source/core/inspector/InspectorFrontendClient.h
index 2116969..7ee3fa2 100644
--- a/Source/core/inspector/InspectorFrontendClient.h
+++ b/Source/core/inspector/InspectorFrontendClient.h
@@ -70,6 +70,9 @@
     virtual void requestFileSystems() = 0;
     virtual void addFileSystem() = 0;
     virtual void removeFileSystem(const String& fileSystemPath) = 0;
+    virtual void indexPath(int requestId, const String& fileSystemPath) = 0;
+    virtual void stopIndexing(int requestId) = 0;
+    virtual void searchInPath(int requestId, const String& fileSystemPath, const String& query) = 0;
 
     virtual bool isUnderTest() = 0;
 };
diff --git a/Source/core/inspector/InspectorFrontendHost.cpp b/Source/core/inspector/InspectorFrontendHost.cpp
index 770fbcc..2d24786 100644
--- a/Source/core/inspector/InspectorFrontendHost.cpp
+++ b/Source/core/inspector/InspectorFrontendHost.cpp
@@ -314,6 +314,24 @@
     return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated, KURL(ParsedURLString, rootURL), AsyncFileSystem::create());
 }
 
+void InspectorFrontendHost::indexPath(int requestId, const String& fileSystemPath)
+{
+    if (m_client)
+        m_client->indexPath(requestId, fileSystemPath);
+}
+
+void InspectorFrontendHost::stopIndexing(int requestId)
+{
+    if (m_client)
+        m_client->stopIndexing(requestId);
+}
+
+void InspectorFrontendHost::searchInPath(int requestId, const String& fileSystemPath, const String& query)
+{
+    if (m_client)
+        m_client->searchInPath(requestId, fileSystemPath, query);
+}
+
 bool InspectorFrontendHost::isUnderTest()
 {
     return m_client && m_client->isUnderTest();
diff --git a/Source/core/inspector/InspectorFrontendHost.h b/Source/core/inspector/InspectorFrontendHost.h
index 70968f4..603e72d 100644
--- a/Source/core/inspector/InspectorFrontendHost.h
+++ b/Source/core/inspector/InspectorFrontendHost.h
@@ -84,6 +84,9 @@
     void addFileSystem();
     void removeFileSystem(const String& fileSystemPath);
     PassRefPtr<DOMFileSystem> isolatedFileSystem(const String& fileSystemName, const String& rootURL);
+    void indexPath(int requestId, const String& fileSystemPath);
+    void stopIndexing(int requestId);
+    void searchInPath(int requestId, const String& fileSystemPath, const String& query);
 
     bool isUnderTest();
 
diff --git a/Source/core/inspector/InspectorFrontendHost.idl b/Source/core/inspector/InspectorFrontendHost.idl
index d3ca499..f764bf2 100644
--- a/Source/core/inspector/InspectorFrontendHost.idl
+++ b/Source/core/inspector/InspectorFrontendHost.idl
@@ -66,6 +66,9 @@
     void addFileSystem();
     void removeFileSystem(DOMString fileSystemPath);
     DOMFileSystem isolatedFileSystem(DOMString fileSystemId, DOMString registeredName);
+    void indexPath(long requestId, DOMString fileSystemPath);
+    void stopIndexing(long requestId);
+    void searchInPath(long requestId, DOMString fileSystemPath, DOMString query);
 
     boolean isUnderTest();
 
diff --git a/Source/core/inspector/InspectorInstrumentation.idl b/Source/core/inspector/InspectorInstrumentation.idl
index 1be3df8..7900bd4 100644
--- a/Source/core/inspector/InspectorInstrumentation.idl
+++ b/Source/core/inspector/InspectorInstrumentation.idl
@@ -229,18 +229,6 @@
     [Timeline, Resource, Inline=FastReturn]
     void didScheduleStyleRecalculation([Keep] Document*);
 
-    [CSS, Inline=FastReturn]
-    InspectorInstrumentationCookie willMatchRule(Document*, StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection*);
-
-    [CSS, Inline=FastReturn]
-    void didMatchRule(const InspectorInstrumentationCookie&, bool matched);
-
-    [CSS, Inline=FastReturn]
-    InspectorInstrumentationCookie willProcessRule(Document* document, [FastReturn] StyleRule* rule, StyleResolver* styleResolver);
-
-    [CSS, Inline=FastReturn]
-    void didProcessRule(const InspectorInstrumentationCookie&);
-
     [Resource, Inline=FastReturn]
     void applyUserAgentOverride(Frame*, String* userAgent);
 
@@ -330,7 +318,7 @@
     [Canvas, Page, CSS]
     void frameDetachedFromParent([Keep] Frame*);
 
-    [Page]
+    [Page, Inline=FastReturn]
     void childDocumentOpened([Keep] Document*);
 
     [Console, Resource, CSS, Database, DOM, LayerTree, Inspector, Canvas, Page]
diff --git a/Source/core/inspector/InspectorOverlay.cpp b/Source/core/inspector/InspectorOverlay.cpp
index d3c997a..25ea756 100644
--- a/Source/core/inspector/InspectorOverlay.cpp
+++ b/Source/core/inspector/InspectorOverlay.cpp
@@ -560,7 +560,8 @@
 void InspectorOverlay::drawOverridesMessage()
 {
     RefPtr<JSONObject> data = JSONObject::create();
-    data->setNumber("overrides", m_overrides);
+    if (!m_drawViewSize)
+        data->setNumber("overrides", m_overrides);
     data->setNumber("topOffset", m_overridesTopOffset);
     evaluateInOverlay("drawOverridesMessage", data.release());
 }
diff --git a/Source/core/inspector/InspectorProfilerAgent.cpp b/Source/core/inspector/InspectorProfilerAgent.cpp
index 4e1bdef..92efc78 100644
--- a/Source/core/inspector/InspectorProfilerAgent.cpp
+++ b/Source/core/inspector/InspectorProfilerAgent.cpp
@@ -111,7 +111,6 @@
 PassRefPtr<TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile)
 {
     return TypeBuilder::Profiler::ProfileHeader::create()
-        .setTypeId(TypeBuilder::Profiler::ProfileHeader::TypeId::CPU)
         .setUid(profile.uid())
         .setTitle(profile.title())
         .release();
@@ -161,9 +160,9 @@
         *errorString = "Profile wasn't found";
         return;
     }
-    profileObject = TypeBuilder::Profiler::CPUProfile::create();
-    profileObject->setHead(it->value->buildInspectorObjectForHead());
-    profileObject->setIdleTime(it->value->idleTime());
+    profileObject = TypeBuilder::Profiler::CPUProfile::create()
+        .setHead(it->value->buildInspectorObjectForHead())
+        .setIdleTime(it->value->idleTime());
     profileObject->setSamples(it->value->buildInspectorObjectForSamples());
 }
 
diff --git a/Source/core/inspector/ScriptDebugListener.h b/Source/core/inspector/ScriptDebugListener.h
index 9ab765b..f2e1ce7 100644
--- a/Source/core/inspector/ScriptDebugListener.h
+++ b/Source/core/inspector/ScriptDebugListener.h
@@ -70,7 +70,16 @@
     virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints) = 0;
     virtual void didContinue() = 0;
 
-    virtual bool shouldSkipPause(RefPtr<JavaScriptCallFrame>& topFrame) = 0;
+    enum SkipPauseRequest {
+        NoSkip,
+        Continue,
+        StepInto,
+        StepOut
+    };
+
+    virtual SkipPauseRequest shouldSkipExceptionPause(RefPtr<JavaScriptCallFrame>& topFrame) = 0;
+    virtual SkipPauseRequest shouldSkipBreakpointPause(RefPtr<JavaScriptCallFrame>& topFrame) = 0;
+    virtual SkipPauseRequest shouldSkipStepPause(RefPtr<JavaScriptCallFrame>& topFrame) = 0;
 };
 
 } // namespace WebCore
diff --git a/Source/core/inspector/ScriptProfile.cpp b/Source/core/inspector/ScriptProfile.cpp
index f1f76d3..ca8a4a2 100644
--- a/Source/core/inspector/ScriptProfile.cpp
+++ b/Source/core/inspector/ScriptProfile.cpp
@@ -77,8 +77,6 @@
         .setLineNumber(node->GetLineNumber())
         .setTotalTime(node->GetTotalTime())
         .setSelfTime(node->GetSelfTime())
-        .setNumberOfCalls(0)
-        .setVisible(true)
         .setCallUID(node->GetCallUid())
         .setChildren(children.release());
     result->setId(node->GetNodeId());
diff --git a/Source/core/inspector_instrumentation_sources.target.darwin-arm.mk b/Source/core/inspector_instrumentation_sources.target.darwin-arm.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.darwin-arm.mk
+++ b/Source/core/inspector_instrumentation_sources.target.darwin-arm.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_instrumentation_sources.target.darwin-mips.mk b/Source/core/inspector_instrumentation_sources.target.darwin-mips.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.darwin-mips.mk
+++ b/Source/core/inspector_instrumentation_sources.target.darwin-mips.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_instrumentation_sources.target.darwin-x86.mk b/Source/core/inspector_instrumentation_sources.target.darwin-x86.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.darwin-x86.mk
+++ b/Source/core/inspector_instrumentation_sources.target.darwin-x86.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_instrumentation_sources.target.linux-arm.mk b/Source/core/inspector_instrumentation_sources.target.linux-arm.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.linux-arm.mk
+++ b/Source/core/inspector_instrumentation_sources.target.linux-arm.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_instrumentation_sources.target.linux-mips.mk b/Source/core/inspector_instrumentation_sources.target.linux-mips.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.linux-mips.mk
+++ b/Source/core/inspector_instrumentation_sources.target.linux-mips.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_instrumentation_sources.target.linux-x86.mk b/Source/core/inspector_instrumentation_sources.target.linux-x86.mk
index 992ba6d..4930cde 100644
--- a/Source/core/inspector_instrumentation_sources.target.linux-x86.mk
+++ b/Source/core/inspector_instrumentation_sources.target.linux-x86.mk
@@ -14,30 +14,30 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "generateInspectorInstrumentation":
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInstrumentation.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector instrumentation code from InspectorInstrumentation.idl ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInstrumentation.py inspector/InspectorInstrumentation.idl --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
+$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorCanvasInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorConsoleInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorDatabaseInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverridesInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InstrumentingAgentsInl.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+	$(gyp_shared_intermediate_dir)/blink/InspectorCanvasInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorConsoleInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorDatabaseInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverridesInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InstrumentingAgentsInl.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.darwin-arm.mk b/Source/core/inspector_overlay_page.target.darwin-arm.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.darwin-arm.mk
+++ b/Source/core/inspector_overlay_page.target.darwin-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.darwin-mips.mk b/Source/core/inspector_overlay_page.target.darwin-mips.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.darwin-mips.mk
+++ b/Source/core/inspector_overlay_page.target.darwin-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.darwin-x86.mk b/Source/core/inspector_overlay_page.target.darwin-x86.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.darwin-x86.mk
+++ b/Source/core/inspector_overlay_page.target.darwin-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.linux-arm.mk b/Source/core/inspector_overlay_page.target.linux-arm.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.linux-arm.mk
+++ b/Source/core/inspector_overlay_page.target.linux-arm.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.linux-mips.mk b/Source/core/inspector_overlay_page.target.linux-mips.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.linux-mips.mk
+++ b/Source/core/inspector_overlay_page.target.linux-mips.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_overlay_page.target.linux-x86.mk b/Source/core/inspector_overlay_page.target.linux-x86.mk
index f7842aa..ca2f374 100644
--- a/Source/core/inspector_overlay_page.target.linux-x86.mk
+++ b/Source/core/inspector_overlay_page.target.linux-x86.mk
@@ -14,18 +14,18 @@
 GYP_TARGET_DEPENDENCIES :=
 
 ### Rules for action "ConvertFileToHeaderWithCharacterArray":
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
-	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h"
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/xxd.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/InspectorOverlayPage.html $(GYP_TARGET_DEPENDENCIES)
+	@echo "Gyp action: Generating $(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h from inspector/InspectorOverlayPage.html ($@)"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl InspectorOverlayPage_html inspector/InspectorOverlayPage.html "$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h"
 
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorOverlayPage.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorOverlayPage.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.darwin-arm.mk b/Source/core/inspector_protocol_sources.target.darwin-arm.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.darwin-arm.mk
+++ b/Source/core/inspector_protocol_sources.target.darwin-arm.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.darwin-mips.mk b/Source/core/inspector_protocol_sources.target.darwin-mips.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.darwin-mips.mk
+++ b/Source/core/inspector_protocol_sources.target.darwin-mips.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.darwin-x86.mk b/Source/core/inspector_protocol_sources.target.darwin-x86.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.darwin-x86.mk
+++ b/Source/core/inspector_protocol_sources.target.darwin-x86.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.linux-arm.mk b/Source/core/inspector_protocol_sources.target.linux-arm.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.linux-arm.mk
+++ b/Source/core/inspector_protocol_sources.target.linux-arm.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.linux-mips.mk b/Source/core/inspector_protocol_sources.target.linux-mips.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.linux-mips.mk
+++ b/Source/core/inspector_protocol_sources.target.linux-mips.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/inspector_protocol_sources.target.linux-x86.mk b/Source/core/inspector_protocol_sources.target.linux-x86.mk
index c003a0c..8e15db4 100644
--- a/Source/core/inspector_protocol_sources.target.linux-x86.mk
+++ b/Source/core/inspector_protocol_sources.target.linux-x86.mk
@@ -15,28 +15,28 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp
 
 ### Rules for action "generateInspectorProtocolBackendSources":
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspector.py $(LOCAL_PATH)/third_party/WebKit/Source/core/inspector/CodeGeneratorInspectorStrings.py $(LOCAL_PATH)/third_party/WebKit/Source/devtools/protocol.json $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating Inspector protocol backend sources from protocol.json ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/webkit"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python inspector/CodeGeneratorInspector.py ../devtools/protocol.json --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
+$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp ;
 
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.h \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.h
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorFrontend.h \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.h
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/loader/CrossOriginAccessControl.cpp b/Source/core/loader/CrossOriginAccessControl.cpp
index 1c8cb1c..6c4fbf0 100644
--- a/Source/core/loader/CrossOriginAccessControl.cpp
+++ b/Source/core/loader/CrossOriginAccessControl.cpp
@@ -166,6 +166,16 @@
     return true;
 }
 
+bool passesPreflightStatusCheck(const ResourceResponse& response, String& errorDescription)
+{
+    if (response.httpStatusCode() < 200 || response.httpStatusCode() >= 400) {
+        errorDescription = "Invalid HTTP status code " + String::number(response.httpStatusCode());
+        return false;
+    }
+
+    return true;
+}
+
 void parseAccessControlExposeHeadersAllowList(const String& headerValue, HTTPHeaderSet& headerSet)
 {
     Vector<String> headers;
diff --git a/Source/core/loader/CrossOriginAccessControl.h b/Source/core/loader/CrossOriginAccessControl.h
index c088f08..7324d6e 100644
--- a/Source/core/loader/CrossOriginAccessControl.h
+++ b/Source/core/loader/CrossOriginAccessControl.h
@@ -49,6 +49,7 @@
 ResourceRequest createAccessControlPreflightRequest(const ResourceRequest&, SecurityOrigin*);
 
 bool passesAccessControlCheck(const ResourceResponse&, StoredCredentials, SecurityOrigin*, String& errorDescription);
+bool passesPreflightStatusCheck(const ResourceResponse&, String& errorDescription);
 void parseAccessControlExposeHeadersAllowList(const String& headerValue, HTTPHeaderSet&);
 
 } // namespace WebCore
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 2c64711..5d64a09 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -31,6 +31,7 @@
 #include "core/loader/DocumentLoader.h"
 
 #include "FetchInitiatorTypeNames.h"
+#include "bindings/v8/ScriptController.h"
 #include "core/dom/DOMImplementation.h"
 #include "core/dom/Document.h"
 #include "core/dom/DocumentParser.h"
@@ -376,11 +377,18 @@
 
 void DocumentLoader::handleSubstituteDataLoadNow(DocumentLoaderTimer*)
 {
+    RefPtr<DocumentLoader> protect(this);
     KURL url = m_substituteData.responseURL();
     if (url.isEmpty())
         url = m_request.url();
     ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
     responseReceived(0, response);
+    if (isStopping())
+        return;
+    if (m_substituteData.content()->size())
+        dataReceived(0, m_substituteData.content()->data(), m_substituteData.content()->size());
+    if (isLoadingMainResource())
+        finishedLoading(0);
 }
 
 void DocumentLoader::startDataLoadTimer()
@@ -431,6 +439,8 @@
         return true;
     if (policy == NavigationPolicyIgnore)
         return false;
+    if (!DOMWindow::allowPopUp(m_frame) && !ScriptController::processingUserGesture())
+        return false;
     frameLoader()->client()->loadURLExternally(request, policy);
     return false;
 }
@@ -598,13 +608,6 @@
                 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url()));
         }
     }
-
-    if (!isStopping() && m_substituteData.isValid()) {
-        if (m_substituteData.content()->size())
-            dataReceived(0, m_substituteData.content()->data(), m_substituteData.content()->size());
-        if (isLoadingMainResource())
-            finishedLoading(0);
-    }
 }
 
 void DocumentLoader::stopLoadingForPolicyChange()
@@ -1028,9 +1031,20 @@
     if (document->isPluginDocument() && document->isSandboxed(SandboxPlugins))
         document = SinkDocument::create(DocumentInit(url, frame));
     bool shouldReuseDefaultView = frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument() && frame->document()->isSecureTransitionTo(url);
-    FrameLoader::ClearOptions options = shouldReuseDefaultView ? 0 : (FrameLoader::ClearWindowProperties | FrameLoader::ClearScriptObjects | FrameLoader::ClearWindowObject);
-    frame->loader()->clear(options);
-    frame->ensureDOMWindow();
+
+    RefPtr<DOMWindow> originalDOMWindow;
+    if (shouldReuseDefaultView)
+        originalDOMWindow = frame->domWindow();
+    frame->loader()->clear(!shouldReuseDefaultView, !shouldReuseDefaultView);
+
+    if (!shouldReuseDefaultView) {
+        frame->setDOMWindow(DOMWindow::create(frame));
+    } else {
+        // Note that the old Document is still attached to the DOMWindow; the
+        // setDocument() call below will detach the old Document.
+        ASSERT(originalDOMWindow);
+        frame->setDOMWindow(originalDOMWindow);
+    }
 
     frame->loader()->setOutgoingReferrer(url);
     frame->domWindow()->setDocument(document);
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 2787d98..5471fdb 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -286,6 +286,11 @@
             return;
         }
 
+        if (!passesPreflightStatusCheck(response, accessControlErrorDescription)) {
+            preflightFailure(identifier, response.url().string(), accessControlErrorDescription);
+            return;
+        }
+
         OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult = adoptPtr(new CrossOriginPreflightResultCacheItem(m_options.allowCredentials));
         if (!preflightResult->parse(response, accessControlErrorDescription)
             || !preflightResult->allowsCrossOriginMethod(m_actualRequest->httpMethod(), accessControlErrorDescription)
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 371a934..4784ca4 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -39,7 +39,6 @@
 #include "bindings/v8/DOMWrapperWorld.h"
 #include "bindings/v8/ScriptController.h"
 #include "bindings/v8/SerializedScriptValue.h"
-#include "core/accessibility/AXObjectCache.h"
 #include "core/dom/BeforeUnloadEvent.h"
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
@@ -70,6 +69,7 @@
 #include "core/page/Chrome.h"
 #include "core/page/ChromeClient.h"
 #include "core/page/ContentSecurityPolicy.h"
+#include "core/page/ContentSecurityPolicyResponseHeaders.h"
 #include "core/page/DOMWindow.h"
 #include "core/page/EventHandler.h"
 #include "core/page/Frame.h"
@@ -95,7 +95,7 @@
 
 using namespace HTMLNames;
 
-static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
+static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
 
 bool isBackForwardLoadType(FrameLoadType type)
 {
@@ -155,12 +155,10 @@
     , m_client(client)
     , m_history(frame)
     , m_notifer(frame)
-    , m_subframeLoader(frame)
     , m_icon(adoptPtr(new IconController(frame)))
     , m_mixedContentChecker(frame)
     , m_state(FrameStateProvisional)
     , m_loadType(FrameLoadTypeStandard)
-    , m_delegateIsHandlingProvisionalLoadError(false)
     , m_inStopAllLoaders(false)
     , m_didCallImplicitClose(true)
     , m_wasUnloadEventEmitted(false)
@@ -402,10 +400,10 @@
     if (!m_isComplete)
         closeURL();
 
-    clear(ClearScriptObjects | ClearWindowObject);
+    clear(false);
 }
 
-void FrameLoader::clear(ClearOptions options)
+void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView)
 {
     m_frame->editor()->clear();
 
@@ -421,7 +419,7 @@
     }
 
     // Do this after detaching the document so that the unload event works.
-    if (options & ClearWindowProperties) {
+    if (clearWindowProperties) {
         InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame->domWindow());
         m_frame->domWindow()->reset();
         m_frame->script()->clearWindowShell();
@@ -429,17 +427,16 @@
 
     m_frame->selection()->prepareForDestruction();
     m_frame->eventHandler()->clear();
-    if (m_frame->view())
+    if (clearFrameView && m_frame->view())
         m_frame->view()->clear();
 
     // Do not drop the DOMWindow (and Document) before the ScriptController and view are cleared
     // as some destructors might still try to access the document.
-    if (options & ClearWindowObject)
-        m_frame->clearDOMWindow();
+    m_frame->setDOMWindow(0);
 
     m_containsPlugins = false;
 
-    if (options & ClearScriptObjects)
+    if (clearScriptObjects)
         m_frame->script()->clearScriptObjects();
 
     m_frame->script()->enableEval();
@@ -804,10 +801,8 @@
     m_documentLoader->clearRedirectChain();
     m_documentLoader->setIsClientRedirect((m_startingClientRedirect && !isNewNavigation) || !UserGestureIndicator::processingUserGesture());
     m_documentLoader->setReplacesCurrentHistoryItem(!isNewNavigation);
-    if (m_documentLoader->isClientRedirect()) {
-        m_client->dispatchDidCompleteClientRedirect(oldURL);
+    if (m_documentLoader->isClientRedirect())
         m_documentLoader->appendRedirect(oldURL);
-    }
     m_documentLoader->appendRedirect(url);
 
     m_client->dispatchDidNavigateWithinPage();
@@ -1196,15 +1191,6 @@
 
     if (newState == FrameStateProvisional)
         m_frame->navigationScheduler()->cancel();
-    else if (newState == FrameStateComplete)
-        frameLoadCompleted();
-}
-
-void FrameLoader::clearProvisionalLoad()
-{
-    setProvisionalDocumentLoader(0);
-    m_progressTracker->progressCompleted();
-    setState(FrameStateComplete);
 }
 
 void FrameLoader::commitProvisionalLoad()
@@ -1346,50 +1332,8 @@
 
     switch (m_state) {
         case FrameStateProvisional: {
-            if (m_delegateIsHandlingProvisionalLoadError)
-                return;
-
-            RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader;
-            if (!pdl)
-                return;
-
-            // If we've received any errors we may be stuck in the provisional state and actually complete.
-            const ResourceError& error = pdl->mainDocumentError();
-            if (error.isNull())
-                return;
-
-            // Check all children first.
-            RefPtr<HistoryItem> item;
-            if (Page* page = m_frame->page())
-                if (isBackForwardLoadType(loadType()))
-                    // Reset the back forward list to the last committed history item at the top level.
-                    item = page->mainFrame()->loader()->history()->currentItem();
-
-            // Only reset if we aren't already going to a new provisional item.
-            bool shouldReset = !history()->provisionalItem();
-            if (!pdl->isLoadingInAPISense() || pdl->isStopping()) {
-                m_delegateIsHandlingProvisionalLoadError = true;
-                m_client->dispatchDidFailProvisionalLoad(error);
-                m_delegateIsHandlingProvisionalLoadError = false;
-
-                ASSERT(!pdl->isLoading());
-
-                // Finish resetting the load state, but only if another load hasn't been started by the
-                // delegate callback.
-                if (pdl == m_provisionalDocumentLoader)
-                    clearProvisionalLoad();
-                else if (activeDocumentLoader()) {
-                    KURL unreachableURL = activeDocumentLoader()->unreachableURL();
-                    if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url())
-                        shouldReset = false;
-                }
-            }
-            if (shouldReset && item)
-                if (Page* page = m_frame->page())
-                    page->backForward()->setCurrentItem(item.get());
             return;
         }
-
         case FrameStateCommittedPage: {
             DocumentLoader* dl = m_documentLoader.get();
             if (!dl || (dl->isLoadingInAPISense() && !dl->isStopping()))
@@ -1417,26 +1361,15 @@
             }
 
             const ResourceError& error = dl->mainDocumentError();
-
-            AXObjectCache::AXLoadingEvent loadingEvent;
-            if (!error.isNull()) {
+            if (!error.isNull())
                 m_client->dispatchDidFailLoad(error);
-                loadingEvent = AXObjectCache::AXLoadingFailed;
-            } else {
+            else
                 m_client->dispatchDidFinishLoad();
-                loadingEvent = AXObjectCache::AXLoadingFinished;
-            }
-
-            // Notify accessibility.
-            if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
-                cache->frameLoadingEventNotification(m_frame, loadingEvent);
-
             return;
         }
 
         case FrameStateComplete:
             m_loadType = FrameLoadTypeStandard;
-            frameLoadCompleted();
             return;
     }
 
@@ -1454,12 +1387,6 @@
         history()->restoreScrollPositionAndViewState();
 }
 
-void FrameLoader::frameLoadCompleted()
-{
-    // Note: Can be called multiple times.
-    history()->updateForFrameLoadCompleted();
-}
-
 void FrameLoader::detachChildren()
 {
     typedef Vector<RefPtr<Frame> > FrameVector;
@@ -1684,6 +1611,18 @@
     if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
         if (m_submittedFormURL == m_provisionalDocumentLoader->originalRequestCopy().url())
             m_submittedFormURL = KURL();
+
+        m_client->dispatchDidFailProvisionalLoad(error);
+        if (loader != m_provisionalDocumentLoader)
+            return;
+        setProvisionalDocumentLoader(0);
+        m_progressTracker->progressCompleted();
+        setState(FrameStateComplete);
+
+        // Reset the back forward list to the last committed history item at the top level.
+        RefPtr<HistoryItem> item = m_frame->page()->mainFrame()->loader()->history()->currentItem();
+        if (isBackForwardLoadType(loadType()) && !history()->provisionalItem() && item)
+            m_frame->page()->backForward()->setCurrentItem(item.get());
     }
 
     checkCompleted();
@@ -1880,15 +1819,7 @@
         m_provisionalDocumentLoader->appendRedirect(m_frame->document()->url());
     m_provisionalDocumentLoader->appendRedirect(m_provisionalDocumentLoader->request().url());
     m_client->dispatchDidStartProvisionalLoad();
-    if (m_provisionalDocumentLoader->isClientRedirect())
-        m_client->dispatchDidCompleteClientRedirect(m_frame->document()->url());
     ASSERT(m_provisionalDocumentLoader);
-
-    if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) {
-        AXObjectCache::AXLoadingEvent loadingEvent = loadType() == FrameLoadTypeReload ? AXObjectCache::AXLoadingReloaded : AXObjectCache::AXLoadingStarted;
-        cache->frameLoadingEventNotification(m_frame, loadingEvent);
-    }
-
     m_provisionalDocumentLoader->startLoadingMainResource();
 }
 
@@ -2202,11 +2133,6 @@
     }
 }
 
-void FrameLoader::didChangeIcons(IconType type)
-{
-    m_client->dispatchDidChangeIcons(type);
-}
-
 void FrameLoader::dispatchDidCommitLoad()
 {
     m_client->dispatchDidCommitLoad();
diff --git a/Source/core/loader/FrameLoader.h b/Source/core/loader/FrameLoader.h
index bd12a43..361640f 100644
--- a/Source/core/loader/FrameLoader.h
+++ b/Source/core/loader/FrameLoader.h
@@ -40,7 +40,6 @@
 #include "core/loader/MixedContentChecker.h"
 #include "core/loader/ResourceLoadNotifier.h"
 #include "core/loader/ResourceLoaderOptions.h"
-#include "core/loader/SubframeLoader.h"
 #include "core/loader/cache/CachePolicy.h"
 #include "core/page/LayoutMilestones.h"
 #include "core/platform/Timer.h"
@@ -86,7 +85,6 @@
 
     HistoryController* history() const { return &m_history; }
     ResourceLoadNotifier* notifier() const { return &m_notifer; }
-    SubframeLoader* subframeLoader() const { return &m_subframeLoader; }
     IconController* icon() const { return m_icon.get(); }
     MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChecker; }
 
@@ -114,16 +112,8 @@
     void stopLoading(UnloadEventPolicy);
     bool closeURL();
     void cancelAndClear();
-
-    // FIXME: clear() is trying to do too many things. We should break it down into smaller functions.
-
-    enum ClearOption {
-        ClearWindowProperties = 1 << 0,
-        ClearScriptObjects    = 1 << 1,
-        ClearWindowObject     = 1 << 2
-    };
-    typedef unsigned ClearOptions;
-    void clear(ClearOptions);
+    // FIXME: clear() is trying to do too many things. We should break it down into smaller functions (ideally with fewer raw Boolean parameters).
+    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
 
     void didAccessInitialDocument();
     void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);
@@ -153,7 +143,6 @@
 
     bool subframeIsLoading() const;
     void didChangeTitle(DocumentLoader*);
-    void didChangeIcons(IconType);
 
     bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
 
@@ -263,7 +252,6 @@
     void setReferrerForFrameRequest(ResourceRequest&, ShouldSendReferrer);
     FrameLoadType determineFrameLoadType(const FrameLoadRequest&);
 
-    void clearProvisionalLoad();
     void frameLoadCompleted();
 
     SubstituteData defaultSubstituteDataForURL(const KURL&);
@@ -317,7 +305,6 @@
     // Some of these could be lazily created for memory savings on devices.
     mutable HistoryController m_history;
     mutable ResourceLoadNotifier m_notifer;
-    mutable SubframeLoader m_subframeLoader;
     mutable FrameLoaderStateMachine m_stateMachine;
     OwnPtr<IconController> m_icon;
     mutable MixedContentChecker m_mixedContentChecker;
@@ -336,8 +323,6 @@
     RefPtr<DocumentLoader> m_provisionalDocumentLoader;
     RefPtr<DocumentLoader> m_policyDocumentLoader;
 
-    bool m_delegateIsHandlingProvisionalLoadError;
-
     bool m_inStopAllLoaders;
 
     String m_outgoingReferrer;
diff --git a/Source/core/loader/FrameLoaderClient.h b/Source/core/loader/FrameLoaderClient.h
index 4c458b2..b26d14a 100644
--- a/Source/core/loader/FrameLoaderClient.h
+++ b/Source/core/loader/FrameLoaderClient.h
@@ -101,7 +101,6 @@
 
         virtual void dispatchDidHandleOnloadEvents() = 0;
         virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
-        virtual void dispatchDidCompleteClientRedirect(const KURL&) { }
         virtual void dispatchDidNavigateWithinPage() { }
         virtual void dispatchDidChangeLocationWithinPage() = 0;
         virtual void dispatchWillClose() = 0;
diff --git a/Source/core/loader/HistoryController.cpp b/Source/core/loader/HistoryController.cpp
index c483acd..900765c 100644
--- a/Source/core/loader/HistoryController.cpp
+++ b/Source/core/loader/HistoryController.cpp
@@ -50,7 +50,6 @@
 
 HistoryController::HistoryController(Frame* frame)
     : m_frame(frame)
-    , m_frameLoadComplete(true)
     , m_defersLoading(false)
 {
 }
@@ -129,27 +128,15 @@
 
 void HistoryController::saveDocumentState()
 {
-    // For a standard page load, we will have a previous item set, which will be used to
-    // store the form state.  However, in some cases we will have no previous item, and
-    // the current item is the right place to save the state.  One example is when we
-    // detach a bunch of frames because we are navigating from a site with frames to
-    // another site.  Another is when saving the frame state of a frame that is not the
-    // target of the current navigation (if we even decide to save with that granularity).
-
-    // Because of previousItem's "masking" of currentItem for this purpose, it's important
-    // that we keep track of the end of a page transition with m_frameLoadComplete.  We
-    // leverage the checkLoadComplete recursion to achieve this goal.
-
-    HistoryItem* item = m_frameLoadComplete ? m_currentItem.get() : m_previousItem.get();
-    if (!item)
+    if (!m_currentItem)
         return;
 
     Document* document = m_frame->document();
     ASSERT(document);
 
-    if (item->isCurrentDocument(document) && document->attached()) {
-        LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree()->uniqueName().string().utf8().data(), item);
-        item->setDocumentState(document->formElementsState());
+    if (m_currentItem->isCurrentDocument(document) && document->attached()) {
+        LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree()->uniqueName().string().utf8().data(), m_currentItem.get());
+        m_currentItem->setDocumentState(document->formElementsState());
     }
 }
 
@@ -268,9 +255,7 @@
         LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
 #endif
 
-    // Must grab the current scroll position before disturbing it
-    if (!m_frameLoadComplete)
-        saveScrollPositionAndViewStateToItem(m_previousItem.get());
+    saveScrollPositionAndViewStateToItem(m_previousItem.get());
 
     // When traversing history, we may end up redirecting to a different URL
     // this time (e.g., due to cookies).  See http://webkit.org/b/49654.
@@ -341,7 +326,6 @@
         // the provisional item for restoring state.
         // Note previousItem must be set before we close the URL, which will
         // happen when the data source is made non-provisional below
-        m_frameLoadComplete = false;
         m_previousItem = m_currentItem;
         ASSERT(m_provisionalItem);
         m_currentItem = m_provisionalItem;
@@ -392,9 +376,8 @@
 
     // For each frame that already had the content the item requested (based on
     // (a matching URL and frame tree snapshot), just restore the scroll position.
-    // Save form state (works from currentItem, since m_frameLoadComplete is true)
+    // Save form state
     if (m_currentItem && itemsAreClones(m_currentItem.get(), m_provisionalItem.get())) {
-        ASSERT(m_frameLoadComplete);
         saveDocumentState();
         saveScrollPositionAndViewStateToItem(m_currentItem.get());
 
@@ -402,7 +385,6 @@
             view->setWasScrolledByUser(false);
 
         // Now commit the provisional item
-        m_frameLoadComplete = false;
         m_previousItem = m_currentItem;
         m_currentItem = m_provisionalItem;
         m_provisionalItem = 0;
@@ -447,7 +429,6 @@
         return;
 
     // Commit the provisional item.
-    m_frameLoadComplete = false;
     m_previousItem = m_currentItem;
     m_currentItem = m_provisionalItem;
     m_provisionalItem = 0;
@@ -457,17 +438,8 @@
         child->loader()->history()->recursiveUpdateForSameDocumentNavigation();
 }
 
-void HistoryController::updateForFrameLoadCompleted()
-{
-    // Even if already complete, we might have set a previous item on a frame that
-    // didn't do any data loading on the past transaction. Make sure to track that
-    // the load is complete so that we use the current item instead.
-    m_frameLoadComplete = true;
-}
-
 void HistoryController::setCurrentItem(HistoryItem* item)
 {
-    m_frameLoadComplete = false;
     m_previousItem = m_currentItem;
     m_currentItem = item;
 }
@@ -542,7 +514,6 @@
     initializeItem(item.get());
 
     // Set the item for which we will save document state
-    m_frameLoadComplete = false;
     m_previousItem = m_currentItem;
     m_currentItem = item;
 
@@ -552,8 +523,7 @@
 PassRefPtr<HistoryItem> HistoryController::createItemTree(Frame* targetFrame, bool clipAtTarget)
 {
     RefPtr<HistoryItem> bfItem = createItem();
-    if (!m_frameLoadComplete)
-        saveScrollPositionAndViewStateToItem(m_previousItem.get());
+    saveScrollPositionAndViewStateToItem(m_previousItem.get());
 
     if (!clipAtTarget || m_frame != targetFrame) {
         // save frame state for items that aren't loading (khtml doesn't save those)
diff --git a/Source/core/loader/HistoryController.h b/Source/core/loader/HistoryController.h
index 48bb207..112408d 100644
--- a/Source/core/loader/HistoryController.h
+++ b/Source/core/loader/HistoryController.h
@@ -60,7 +60,6 @@
 
     void updateForCommit();
     void updateForSameDocumentNavigation();
-    void updateForFrameLoadCompleted();
 
     HistoryItem* currentItem() const { return m_currentItem.get(); }
     void setCurrentItem(HistoryItem*);
@@ -108,8 +107,6 @@
     RefPtr<HistoryItem> m_previousItem;
     RefPtr<HistoryItem> m_provisionalItem;
 
-    bool m_frameLoadComplete;
-
     bool m_defersLoading;
     RefPtr<HistoryItem> m_deferredItem;
 };
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index b2fb978..612a04b 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -149,7 +149,7 @@
 
     AtomicString attr = m_element->imageSourceURL();
 
-    if (attr == m_failedLoadURL)
+    if (!m_failedLoadURL.isEmpty() && attr == m_failedLoadURL)
         return;
 
     // Do not load any image if the 'src' attribute is missing or if it is
@@ -229,7 +229,10 @@
             // being queued to fire. Ensure this happens after beforeload is
             // dispatched.
             newImage->addClient(this);
+        } else {
+            updateRenderer();
         }
+
         if (oldImage)
             oldImage->removeClient(this);
     }
diff --git a/Source/core/loader/NavigationPolicy.cpp b/Source/core/loader/NavigationPolicy.cpp
index e581670..ca1d702 100644
--- a/Source/core/loader/NavigationPolicy.cpp
+++ b/Source/core/loader/NavigationPolicy.cpp
@@ -31,6 +31,8 @@
 #include "config.h"
 #include "NavigationPolicy.h"
 
+#include "wtf/Assertions.h"
+
 namespace WebCore {
 
 bool navigationPolicyFromMouseEvent(unsigned short button, bool ctrl, bool shift, bool alt, bool meta, NavigationPolicy* policy)
diff --git a/Source/core/loader/SubframeLoader.cpp b/Source/core/loader/SubframeLoader.cpp
deleted file mode 100644
index 0079a69..0000000
--- a/Source/core/loader/SubframeLoader.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- * Copyright (C) 2008 Alp Toker <alp@atoker.com>
- * Copyright (C) Research In Motion Limited 2009. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/loader/SubframeLoader.h"
-
-#include "HTMLNames.h"
-#include "bindings/v8/ScriptController.h"
-#include "core/html/HTMLAppletElement.h"
-#include "core/html/HTMLFrameElementBase.h"
-#include "core/html/HTMLPlugInImageElement.h"
-#include "core/html/PluginDocument.h"
-#include "core/loader/FrameLoader.h"
-#include "core/loader/FrameLoaderClient.h"
-#include "core/page/ContentSecurityPolicy.h"
-#include "core/page/Frame.h"
-#include "core/page/Page.h"
-#include "core/page/Settings.h"
-#include "core/platform/MIMETypeRegistry.h"
-#include "core/plugins/PluginData.h"
-#include "core/rendering/RenderEmbeddedObject.h"
-#include "core/rendering/RenderView.h"
-#include "weborigin/SecurityOrigin.h"
-#include "weborigin/SecurityPolicy.h"
-
-namespace WebCore {
-
-using namespace HTMLNames;
-
-SubframeLoader::SubframeLoader(Frame* frame)
-    :  m_frame(frame)
-{
-}
-
-bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages)
-{
-    KURL completedURL;
-    if (!url.isEmpty())
-        completedURL = completeURL(url);
-
-    bool useFallback;
-    return shouldUsePlugin(completedURL, mimeType, shouldPreferPlugInsForImages, false, useFallback);
-}
-
-bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType)
-{
-    Settings* settings = m_frame->settings();
-    if (!settings)
-        return false;
-
-    if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
-        if (!settings->isJavaEnabled())
-            return false;
-    }
-
-    if (document()) {
-        if (document()->isSandboxed(SandboxPlugins))
-            return false;
-
-        if (!document()->securityOrigin()->canDisplay(url)) {
-            FrameLoader::reportLocalLoadFailed(m_frame, url.string());
-            return false;
-        }
-
-        String declaredMimeType = document()->isPluginDocument() && document()->ownerElement() ?
-            document()->ownerElement()->fastGetAttribute(HTMLNames::typeAttr) :
-            pluginElement->fastGetAttribute(HTMLNames::typeAttr);
-        if (!document()->contentSecurityPolicy()->allowObjectFromSource(url)
-            || !document()->contentSecurityPolicy()->allowPluginType(mimeType, declaredMimeType, url)) {
-            RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
-            renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginBlockedByContentSecurityPolicy);
-            return false;
-        }
-
-        if (m_frame->loader() && !m_frame->loader()->mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
-            return false;
-    }
-
-    return true;
-}
-
-bool SubframeLoader::requestPlugin(HTMLPlugInImageElement* ownerElement, const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
-{
-
-    // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
-    // as opposed to third-party code such as Flash. The user agent decides whether or not they are
-    // permitted, rather than WebKit.
-    if ((!m_frame->loader()->allowPlugins(AboutToInstantiatePlugin) && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType)))
-        return false;
-
-    if (!pluginIsLoadable(ownerElement, url, mimeType))
-        return false;
-
-    ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
-    return loadPlugin(ownerElement, url, mimeType, paramNames, paramValues, useFallback);
-}
-
-bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
-{
-    if (url.isEmpty() && mimeType.isEmpty())
-        return false;
-
-    // FIXME: None of this code should use renderers!
-    RenderEmbeddedObject* renderer = ownerElement->renderEmbeddedObject();
-    ASSERT(renderer);
-    if (!renderer)
-        return false;
-
-    KURL completedURL;
-    if (!url.isEmpty())
-        completedURL = completeURL(url);
-
-    bool useFallback;
-    if (shouldUsePlugin(completedURL, mimeType, ownerElement->shouldPreferPlugInsForImages(), renderer->hasFallbackContent(), useFallback)) {
-        bool success = requestPlugin(ownerElement, completedURL, mimeType, paramNames, paramValues, useFallback);
-        return success;
-    }
-
-    // If the plug-in element already contains a subframe, loadOrRedirectSubframe will re-use it. Otherwise,
-    // it will create a new frame and set it as the RenderPart's widget, causing what was previously
-    // in the widget to be torn down.
-    return loadOrRedirectSubframe(ownerElement, completedURL, frameName, true);
-}
-
-bool SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const AtomicString& frameName, bool lockBackForwardList)
-{
-    if (Frame* frame = ownerElement->contentFrame()) {
-        frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader()->outgoingReferrer(), lockBackForwardList);
-        return true;
-    }
-
-    return loadSubframe(ownerElement, url, frameName, m_frame->loader()->outgoingReferrer());
-}
-
-bool SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const String& name, const String& referrer)
-{
-    RefPtr<Frame> protect(m_frame);
-
-    bool allowsScrolling = true;
-    int marginWidth = -1;
-    int marginHeight = -1;
-    if (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag)) {
-        HTMLFrameElementBase* o = static_cast<HTMLFrameElementBase*>(ownerElement);
-        allowsScrolling = o->scrollingMode() != ScrollbarAlwaysOff;
-        marginWidth = o->marginWidth();
-        marginHeight = o->marginHeight();
-    }
-
-    if (!ownerElement->document()->securityOrigin()->canDisplay(url)) {
-        FrameLoader::reportLocalLoadFailed(m_frame, url.string());
-        return false;
-    }
-
-    String referrerToUse = SecurityPolicy::generateReferrerHeader(ownerElement->document()->referrerPolicy(), url, referrer);
-    RefPtr<Frame> frame = m_frame->loader()->client()->createFrame(url, name, ownerElement, referrerToUse, allowsScrolling, marginWidth, marginHeight);
-
-    if (!frame)  {
-        m_frame->loader()->checkCallImplicitClose();
-        return false;
-    }
-
-    // All new frames will have m_isComplete set to true at this point due to synchronously loading
-    // an empty document in FrameLoader::init(). But many frames will now be starting an
-    // asynchronous load of url, so we set m_isComplete to false and then check if the load is
-    // actually completed below. (Note that we set m_isComplete to false even for synchronous
-    // loads, so that checkCompleted() below won't bail early.)
-    // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed.
-    frame->loader()->started();
-
-    RenderObject* renderer = ownerElement->renderer();
-    FrameView* view = frame->view();
-    if (renderer && renderer->isWidget() && view)
-        toRenderWidget(renderer)->setWidget(view);
-
-    m_frame->loader()->checkCallImplicitClose();
-
-    // Some loads are performed synchronously (e.g., about:blank and loads
-    // cancelled by returning a null ResourceRequest from requestFromDelegate).
-    // In these cases, the synchronous load would have finished
-    // before we could connect the signals, so make sure to send the
-    // completed() signal for the child by hand and mark the load as being
-    // complete.
-    // FIXME: In this case the Frame will have finished loading before
-    // it's being added to the child list. It would be a good idea to
-    // create the child first, then invoke the loader separately.
-    if (frame->loader()->state() == FrameStateComplete && !frame->loader()->policyDocumentLoader())
-        frame->loader()->checkCompleted();
-    return true;
-}
-
-bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback)
-{
-    // Allow other plug-ins to win over QuickTime because if the user has installed a plug-in that
-    // can handle TIFF (which QuickTime can also handle) they probably intended to override QT.
-    if (m_frame->page() && (mimeType == "image/tiff" || mimeType == "image/tif" || mimeType == "image/x-tiff")) {
-        const PluginData* pluginData = m_frame->page()->pluginData();
-        String pluginName = pluginData ? pluginData->pluginNameForMimeType(mimeType) : String();
-        if (!pluginName.isEmpty() && !pluginName.contains("QuickTime", false))
-            return true;
-    }
-
-    ObjectContentType objectType = m_frame->loader()->client()->objectContentType(url, mimeType, shouldPreferPlugInsForImages);
-    // If an object's content can't be handled and it has no fallback, let
-    // it be handled as a plugin to show the broken plugin icon.
-    useFallback = objectType == ObjectContentNone && hasFallback;
-    return objectType == ObjectContentNone || objectType == ObjectContentNetscapePlugin || objectType == ObjectContentOtherPlugin;
-}
-
-Document* SubframeLoader::document() const
-{
-    return m_frame->document();
-}
-
-bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType,
-    const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
-{
-    RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
-
-    // FIXME: This code should not depend on renderer!
-    if (!renderer || useFallback)
-        return false;
-
-    pluginElement->subframeLoaderWillCreatePlugIn(url);
-
-    IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
-    bool loadManually = document()->isPluginDocument() && !m_frame->loader()->containsPlugins() && toPluginDocument(document())->shouldLoadPluginManually();
-    RefPtr<Widget> widget = m_frame->loader()->client()->createPlugin(contentSize,
-        pluginElement, url, paramNames, paramValues, mimeType, loadManually);
-
-    if (!widget) {
-        if (!renderer->showsUnavailablePluginIndicator())
-            renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::PluginMissing);
-        return false;
-    }
-
-    renderer->setWidget(widget);
-    m_frame->loader()->setContainsPlugins();
-    pluginElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer);
-    return true;
-}
-
-KURL SubframeLoader::completeURL(const String& url) const
-{
-    ASSERT(m_frame->document());
-    return m_frame->document()->completeURL(url);
-}
-
-} // namespace WebCore
diff --git a/Source/core/loader/SubframeLoader.h b/Source/core/loader/SubframeLoader.h
deleted file mode 100644
index 95bacb6..0000000
--- a/Source/core/loader/SubframeLoader.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
- * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
- * Copyright (C) Research In Motion Limited 2009. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SubframeLoader_h
-#define SubframeLoader_h
-
-#include "core/loader/FrameLoaderTypes.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-
-namespace WebCore {
-
-class Document;
-class Frame;
-class FrameLoaderClient;
-class HTMLAppletElement;
-class HTMLFrameOwnerElement;
-class HTMLPlugInImageElement;
-class IntSize;
-class KURL;
-class Widget;
-
-// This is a slight misnomer. It handles the higher level logic of loading both subframes and plugins.
-class SubframeLoader {
-    WTF_MAKE_NONCOPYABLE(SubframeLoader);
-public:
-    explicit SubframeLoader(Frame*);
-
-    void clear();
-
-    bool loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockBackForwardList);
-    bool requestObject(HTMLPlugInImageElement*, const String& url, const AtomicString& frameName,
-        const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues);
-
-    bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages);
-
-private:
-    bool requestPlugin(HTMLPlugInImageElement*, const KURL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
-    bool loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
-    bool loadPlugin(HTMLPlugInImageElement*, const KURL&, const String& mimeType,
-        const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
-
-    bool shouldUsePlugin(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback);
-    bool pluginIsLoadable(HTMLPlugInImageElement*, const KURL&, const String& mimeType);
-
-    Document* document() const;
-
-    bool m_containsPlugins;
-    Frame* m_frame;
-
-    KURL completeURL(const String&) const;
-};
-
-} // namespace WebCore
-
-#endif // SubframeLoader_h
diff --git a/Source/core/loader/cache/CachedFont.cpp b/Source/core/loader/cache/CachedFont.cpp
index 72bf99f..6eae123 100644
--- a/Source/core/loader/cache/CachedFont.cpp
+++ b/Source/core/loader/cache/CachedFont.cpp
@@ -45,14 +45,12 @@
 
 CachedFont::CachedFont(const ResourceRequest& resourceRequest)
     : Resource(resourceRequest, FontResource)
-    , m_fontData(0)
     , m_loadInitiated(false)
 {
 }
 
 CachedFont::~CachedFont()
 {
-    delete m_fontData;
 }
 
 void CachedFont::load(ResourceFetcher*, const ResourceLoaderOptions& options)
@@ -80,7 +78,7 @@
 bool CachedFont::ensureCustomFontData()
 {
     if (!m_fontData && !errorOccurred() && !isLoading() && m_data) {
-        m_fontData = createFontCustomPlatformData(m_data.get());
+        m_fontData = FontCustomPlatformData::create(m_data.get());
         if (!m_fontData)
             setStatus(DecodeError);
     }
@@ -148,10 +146,7 @@
 
 void CachedFont::allClientsRemoved()
 {
-    if (m_fontData) {
-        delete m_fontData;
-        m_fontData = 0;
-    }
+    m_fontData.clear();
     Resource::allClientsRemoved();
 }
 
diff --git a/Source/core/loader/cache/CachedFont.h b/Source/core/loader/cache/CachedFont.h
index f64311d..7361c0d 100644
--- a/Source/core/loader/cache/CachedFont.h
+++ b/Source/core/loader/cache/CachedFont.h
@@ -30,6 +30,7 @@
 #include "core/loader/cache/ResourceClient.h"
 #include "core/platform/graphics/FontOrientation.h"
 #include "core/platform/graphics/FontWidthVariant.h"
+#include "wtf/OwnPtr.h"
 
 namespace WebCore {
 
@@ -37,7 +38,7 @@
 class FontPlatformData;
 class SVGDocument;
 class SVGFontElement;
-struct FontCustomPlatformData;
+class FontCustomPlatformData;
 
 class CachedFont : public Resource {
 public:
@@ -62,7 +63,7 @@
 
 private:
     virtual void checkNotify();
-    FontCustomPlatformData* m_fontData;
+    OwnPtr<FontCustomPlatformData> m_fontData;
     bool m_loadInitiated;
 
 #if ENABLE(SVG_FONTS)
diff --git a/Source/core/loader/cache/CachedScript.cpp b/Source/core/loader/cache/CachedScript.cpp
index 95d3801..58019d6 100644
--- a/Source/core/loader/cache/CachedScript.cpp
+++ b/Source/core/loader/cache/CachedScript.cpp
@@ -71,16 +71,17 @@
     ASSERT(isLoaded());
 
     if (!m_script && m_data) {
-        m_script = m_decoder->decode(m_data->data(), encodedSize());
-        m_script.append(m_decoder->flush());
+        String script = m_decoder->decode(m_data->data(), encodedSize());
+        script.append(m_decoder->flush());
         m_data.clear();
-        // We lie a it here and claim that m_script counts as encoded data (even though it's really decoded data).
+        // We lie a it here and claim that script counts as encoded data (even though it's really decoded data).
         // That's because the MemoryCache thinks that it can clear out decoded data by calling destroyDecodedData(),
-        // but we can't destroy m_script in destroyDecodedData because that's our only copy of the data!
-        setEncodedSize(m_script.sizeInBytes());
+        // but we can't destroy script in destroyDecodedData because that's our only copy of the data!
+        setEncodedSize(script.sizeInBytes());
+        m_script = script;
     }
 
-    return m_script;
+    return m_script.string();
 }
 
 bool CachedScript::mimeTypeAllowedByNosniff() const
diff --git a/Source/core/loader/cache/CachedScript.h b/Source/core/loader/cache/CachedScript.h
index 0b50803..38b3bb1 100644
--- a/Source/core/loader/cache/CachedScript.h
+++ b/Source/core/loader/cache/CachedScript.h
@@ -47,7 +47,7 @@
         bool mimeTypeAllowedByNosniff() const;
 
     private:
-        String m_script;
+        AtomicString m_script;
         RefPtr<TextResourceDecoder> m_decoder;
     };
 }
diff --git a/Source/core/loader/cache/ResourceFetcher.cpp b/Source/core/loader/cache/ResourceFetcher.cpp
index eb7a862..fa208f1 100644
--- a/Source/core/loader/cache/ResourceFetcher.cpp
+++ b/Source/core/loader/cache/ResourceFetcher.cpp
@@ -453,7 +453,7 @@
         if (resource->options().requestOriginPolicy == PotentiallyCrossOriginEnabled
             && !m_document->securityOrigin()->canRequest(resource->response().url())
             && !resource->passesAccessControlCheck(m_document->securityOrigin(), error)) {
-            m_document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Script from origin '" + SecurityOrigin::create(resource->response().url())->toString() + "' has been blocked from loading by Cross-Origin Resource Sharing policy: " + error);
+            frame()->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Script from origin '" + SecurityOrigin::create(resource->response().url())->toString() + "' has been blocked from loading by Cross-Origin Resource Sharing policy: " + error);
             return false;
         }
 
diff --git a/Source/core/make_derived_sources.target.darwin-arm.mk b/Source/core/make_derived_sources.target.darwin-arm.mk
index f9a98b0..1d9f1f4 100644
--- a/Source/core/make_derived_sources.target.darwin-arm.mk
+++ b/Source/core/make_derived_sources.target.darwin-arm.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/make_derived_sources.target.darwin-mips.mk b/Source/core/make_derived_sources.target.darwin-mips.mk
index 166bc4f..69f79e1 100644
--- a/Source/core/make_derived_sources.target.darwin-mips.mk
+++ b/Source/core/make_derived_sources.target.darwin-mips.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/make_derived_sources.target.darwin-x86.mk b/Source/core/make_derived_sources.target.darwin-x86.mk
index ef5dc69..898a25c 100644
--- a/Source/core/make_derived_sources.target.darwin-x86.mk
+++ b/Source/core/make_derived_sources.target.darwin-x86.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/make_derived_sources.target.linux-arm.mk b/Source/core/make_derived_sources.target.linux-arm.mk
index f9a98b0..1d9f1f4 100644
--- a/Source/core/make_derived_sources.target.linux-arm.mk
+++ b/Source/core/make_derived_sources.target.linux-arm.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/make_derived_sources.target.linux-mips.mk b/Source/core/make_derived_sources.target.linux-mips.mk
index 166bc4f..69f79e1 100644
--- a/Source/core/make_derived_sources.target.linux-mips.mk
+++ b/Source/core/make_derived_sources.target.linux-mips.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/make_derived_sources.target.linux-x86.mk b/Source/core/make_derived_sources.target.linux-x86.mk
index ef5dc69..898a25c 100644
--- a/Source/core/make_derived_sources.target.linux-x86.mk
+++ b/Source/core/make_derived_sources.target.linux-x86.mk
@@ -15,383 +15,383 @@
 	$(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp
 
 ### Rules for action "generateV8ArrayBufferViewCustomScript":
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h: $(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom/V8ArrayBufferViewCustomScript.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl V8ArrayBufferViewCustomScript_js ../bindings/v8/custom/V8ArrayBufferViewCustomScript.js "$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h"
 
 
 ### Rules for action "generateXMLViewerCSS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerCSS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_css xml/XMLViewer.css "$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h"
 
 
 ### Rules for action "generateXMLViewerJS":
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XMLViewer.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_generateXMLViewerJS ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl inspector/xxd.pl XMLViewer_js xml/XMLViewer.js "$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h"
 
 
 ### Rules for action "HTMLEntityTable":
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/create-html-entity-table $(LOCAL_PATH)/third_party/WebKit/Source/core/html/parser/HTMLEntityNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLEntityTable ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python html/parser/create-html-entity-table -o "$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp" html/parser/HTMLEntityNames.in
 
 
 ### Rules for action "RuntimeEnabledFeatures":
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_runtime_features.py $(LOCAL_PATH)/third_party/WebKit/Source/core/page/RuntimeEnabledFeatures.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_RuntimeEnabledFeatures ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_runtime_features.py page/RuntimeEnabledFeatures.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp ;
+$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp ;
 
 ### Rules for action "CSSPropertyNames":
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_property_names.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSPropertyNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSPropertyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSPropertyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_css_property_names.py css/CSSPropertyNames.in css/SVGCSSPropertyNames.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp ;
 
 ### Rules for action "StylePropertyShorthand":
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_shorthands.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSShorthands.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StylePropertyShorthand.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StylePropertyShorthand ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_shorthands.py css/CSSShorthands.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp ;
 
 ### Rules for action "StyleBuilder":
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_style_builder.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSProperties.in $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilder.cpp.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_StyleBuilder ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_style_builder.py css/CSSProperties.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
+$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp ;
 
 ### Rules for action "CSSValueKeywords":
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_css_value_keywords.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSValueKeywords.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/SVGCSSValueKeywords.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CSSValueKeywords ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; scripts/make_css_value_keywords.py css/CSSValueKeywords.in css/SVGCSSValueKeywords.in --output_dir "$(gyp_shared_intermediate_dir)/blink" --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp ;
 
 ### Rules for action "HTMLNames":
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLTagNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/html/HTMLAttributeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_HTMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h" "$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/HTMLNames.h" "$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLNames.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp ;
 
 ### Rules for action "FontFamilyNames":
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/css/FontFamilyNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FontFamilyNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl css/FontFamilyNames.in -- --fonts
 
-$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp ;
 
 ### Rules for action "SVGNames":
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/svgattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_SVGNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGNames.h" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGNames.h" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp" "$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/svgtags.in svg/svgattrs.in -- --factory --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/SVGNames.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGNames.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp ;
 
 ### Rules for action "EventFactory":
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/EventNames.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/Event.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(gyp_shared_intermediate_dir)/blink/EventInterfaces.in $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventAliases.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/EventNames.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py "$(gyp_shared_intermediate_dir)/blink/EventInterfaces.in" dom/EventAliases.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
-$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventHeaders.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
+$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h: $(gyp_shared_intermediate_dir)/blink/Event.cpp ;
 
 ### Rules for action "EventTargetFactory":
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_event_factory.py $(LOCAL_PATH)/third_party/WebKit/Source/core/dom/EventTargetFactory.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_EventTargetFactory ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/webkit/"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make_event_factory.py dom/EventTargetFactory.in --output_dir "$(gyp_shared_intermediate_dir)/blink"
 
-$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h ;
+$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h: $(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h ;
 
 ### Rules for action "MathMLNames":
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathtags.in $(LOCAL_PATH)/third_party/WebKit/Source/core/mathml/mathattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MathMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/MathMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl mathml/mathtags.in mathml/mathattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/MathMLNames.h: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp ;
 
 ### Rules for action "UserAgentStyleSheets":
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/make-css-file-arrays.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/preprocessor.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/css/html.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/quirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/view-source.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumLinux.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeChromiumSkia.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWin.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/themeWinQuirks.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/svg.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControls.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/mediaControlsAndroid.css $(LOCAL_PATH)/third_party/WebKit/Source/core/css/fullscreen.css $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_UserAgentStyleSheets ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_useragentstylesheets.py "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h" "$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp" css/html.css css/quirks.css css/view-source.css css/themeChromium.css css/themeChromiumAndroid.css css/themeChromiumLinux.css css/themeChromiumSkia.css css/themeWin.css css/themeWinQuirks.css css/svg.css css/mediaControls.css css/mediaControlsAndroid.css css/fullscreen.css -- css/make-css-file-arrays.pl scripts/preprocessor.pm -- --defines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h ;
+$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h ;
 
 ### Rules for action "FetchInitiatorTypeNames":
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/loader/cache/FetchInitiatorTypeNames.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_FetchInitiatorTypeNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp" "$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl loader/cache/FetchInitiatorTypeNames.in -- --resourceTypes
 
-$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp ;
 
 ### Rules for action "PickerCommon":
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/pickerCommon.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_PickerCommon ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/PickerCommon.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp" Resources/pagepopups/pickerCommon.css Resources/pagepopups/pickerCommon.js
 
-$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.h ;
+$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.h ;
 
 ### Rules for action "CalendarPicker":
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/calendarPicker.js $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/calendarPickerChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/chromium/pickerCommonChromium.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/suggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_CalendarPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--condition=ENABLE(CALENDAR_PICKER)" "--out-h=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp" Resources/pagepopups/calendarPicker.css Resources/pagepopups/calendarPicker.js Resources/pagepopups/chromium/calendarPickerChromium.css Resources/pagepopups/chromium/pickerCommonChromium.css Resources/pagepopups/suggestionPicker.css Resources/pagepopups/suggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.h ;
 
 ### Rules for action "ColorSuggestionPicker":
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h: $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.css $(LOCAL_PATH)/third_party/WebKit/Source/core/Resources/pagepopups/colorSuggestionPicker.js $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_ColorSuggestionPicker ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/make-file-arrays.py "--out-h=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h" "--out-cpp=$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp" Resources/pagepopups/colorSuggestionPicker.css Resources/pagepopups/colorSuggestionPicker.js
 
-$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h ;
+$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h ;
 
 ### Rules for action "XLinkNames":
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/svg/xlinkattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XLinkNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XLinkNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl svg/xlinkattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XLinkNames.h: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp ;
 
 ### Rules for action "XMLNSNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlnsattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNSNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlnsattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp ;
 
 ### Rules for action "XMLNames":
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/Hasher.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/StaticString.pm $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_names.pl $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/xmlattrs.in $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_XMLNames ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/webkit/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python scripts/action_makenames.py "$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp" "$(gyp_shared_intermediate_dir)/blink/XMLNames.h" -- scripts/Hasher.pm scripts/StaticString.pm scripts/make_names.pl xml/xmlattrs.in -- --extraDefines "\"ENABLE_CSS3_TEXT=0\" \"ENABLE_CSS_EXCLUSIONS=1\" \"ENABLE_CSS_REGIONS=1\" \"ENABLE_CUSTOM_SCHEME_HANDLER=0\" \"ENABLE_ENCRYPTED_MEDIA_V2=1\" \"ENABLE_SVG_FONTS=1\" \"ENABLE_TOUCH_ICON_LOADING=1\" \"ENABLE_GDI_FONTS_ON_WINDOWS=1\" \"WTF_USE_CONCATENATED_IMPULSE_RESPONSES=1\" \"ENABLE_CALENDAR_PICKER=0\" \"ENABLE_FAST_MOBILE_SCROLLING=1\" \"ENABLE_INPUT_SPEECH=0\" \"ENABLE_LEGACY_NOTIFICATIONS=0\" \"ENABLE_MEDIA_CAPTURE=1\" \"ENABLE_NOTIFICATIONS=0\" \"ENABLE_ORIENTATION_EVENTS=1\" \"ENABLE_PRINTING=0\" \"ENABLE_NAVIGATOR_CONTENT_UTILS=0\" \"WTF_USE_NATIVE_FULLSCREEN_VIDEO=1\" \"ENABLE_OPENTYPE_VERTICAL=1\" \"WTF_USE_HARFBUZZ=1\""
 
-$(gyp_shared_intermediate_dir)/webkit/XMLNames.h: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XMLNames.h: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp ;
 
 ### Rules for action "preprocess_grammar":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y: $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.in $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSGrammar.y.includes $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_preprocess_grammar ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/webkit/" css/CSSGrammar.y.in css/CSSGrammar.y.includes
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; perl -Iscripts css/makegrammar.pl --outputDir "$(gyp_shared_intermediate_dir)/blink" css/CSSGrammar.y.in css/CSSGrammar.y.includes
 
 
 ### Rules for action "MakeTokenMatcher":
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_file.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/in_generator.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/license.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/name_macros.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/template_expander.py $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/templates/macros.tmpl $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make_token_matcher.py $(LOCAL_PATH)/third_party/WebKit/Source/core/css/CSSParser-in.cpp $(GYP_TARGET_DEPENDENCIES)
 	@echo "Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_MakeTokenMatcher ($@)"
-	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/webkit; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp"
+	$(hide)cd $(gyp_local_path)/third_party/WebKit/Source/core; mkdir -p $(gyp_shared_intermediate_dir)/blink; python ../core/scripts/make_token_matcher.py ../core/css/CSSParser-in.cpp "$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp"
 
 
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_bison":
-# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/webkit', 'bison']}":
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/webkit" bison
+# "{'msvs_cygwin_shell': '1', 'extension': 'y', 'rule_sources': ['$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y', 'xml/XPathGrammar.y'], 'rule_name': 'bison', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp', '$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.h'], 'action': ['python', 'scripts/rule_bison.py', '$(RULE_SOURCES)', '$(gyp_shared_intermediate_dir)/blink', 'bison']}":
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py "$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y" "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/webkit" bison
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/xml/XPathGrammar.y $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; python scripts/rule_bison.py xml/XPathGrammar.y "$(gyp_shared_intermediate_dir)/blink" bison
 
-$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp ;
+$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp ;
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 
 
 ### Generated for rule "third_party_WebKit_Source_core_core_derived_sources_gyp_make_derived_sources_target_gperf":
-# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/webkit/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/webkit', '$(RULE_SOURCES)', 'gperf']}":
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
-$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
-	mkdir -p $(gyp_shared_intermediate_dir)/webkit; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/webkit" platform/ColorData.gperf gperf
+# "{'inputs': ['scripts/make-hash-tools.pl'], 'msvs_cygwin_shell': '0', 'extension': 'gperf', 'outputs': ['$(gyp_shared_intermediate_dir)/blink/%(INPUT_ROOT)s.cpp'], 'rule_name': 'gperf', 'rule_sources': ['platform/ColorData.gperf'], 'action': ['perl', 'scripts/make-hash-tools.pl', '$(gyp_shared_intermediate_dir)/blink', '$(RULE_SOURCES)', 'gperf']}":
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_local_path := $(LOCAL_PATH)
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_intermediate_dir := $(abspath $(gyp_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: gyp_shared_intermediate_dir := $(abspath $(gyp_shared_intermediate_dir))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))
+$(gyp_shared_intermediate_dir)/blink/ColorData.cpp: $(LOCAL_PATH)/third_party/WebKit/Source/core/platform/ColorData.gperf $(LOCAL_PATH)/third_party/WebKit/Source/core/scripts/make-hash-tools.pl $(GYP_TARGET_DEPENDENCIES)
+	mkdir -p $(gyp_shared_intermediate_dir)/blink; cd $(gyp_local_path)/third_party/WebKit/Source/core; perl scripts/make-hash-tools.pl "$(gyp_shared_intermediate_dir)/blink" platform/ColorData.gperf gperf
 
 .PHONY: third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger
-third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+third_party_WebKit_Source_core_make_derived_sources_gyp_rule_trigger: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 ### Finished generating for all rules
 
 GYP_GENERATED_OUTPUTS := \
-	$(gyp_shared_intermediate_dir)/webkit/V8ArrayBufferViewCustomScript.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerCSS.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLViewerJS.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.h \
-	$(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.h \
-	$(gyp_shared_intermediate_dir)/webkit/Event.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/EventHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetHeaders.h \
-	$(gyp_shared_intermediate_dir)/webkit/EventTargetInterfaces.h \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/MathMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheets.h \
-	$(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.h \
-	$(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XLinkNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNSNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XMLNames.h \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.y \
-	$(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/CSSGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp \
-	$(gyp_shared_intermediate_dir)/webkit/XPathGrammar.h \
-	$(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+	$(gyp_shared_intermediate_dir)/blink/V8ArrayBufferViewCustomScript.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerCSS.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLViewerJS.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp \
+	$(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.h \
+	$(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/HTMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FontFamilyNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGNames.h \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/SVGElementFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp \
+	$(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.h \
+	$(gyp_shared_intermediate_dir)/blink/Event.cpp \
+	$(gyp_shared_intermediate_dir)/blink/EventHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetHeaders.h \
+	$(gyp_shared_intermediate_dir)/blink/EventTargetInterfaces.h \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/MathMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheets.h \
+	$(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.h \
+	$(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XLinkNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNSNames.h \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XMLNames.h \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.y \
+	$(gyp_shared_intermediate_dir)/blink/CSSParser.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/CSSGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp \
+	$(gyp_shared_intermediate_dir)/blink/XPathGrammar.h \
+	$(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
diff --git a/Source/core/page/ContentSecurityPolicy.cpp b/Source/core/page/ContentSecurityPolicy.cpp
index 607011a..9415431 100644
--- a/Source/core/page/ContentSecurityPolicy.cpp
+++ b/Source/core/page/ContentSecurityPolicy.cpp
@@ -37,6 +37,7 @@
 #include "core/inspector/ScriptCallStack.h"
 #include "core/loader/DocumentLoader.h"
 #include "core/loader/PingLoader.h"
+#include "core/page/ContentSecurityPolicyResponseHeaders.h"
 #include "core/page/Frame.h"
 #include "core/page/UseCounter.h"
 #include "core/platform/JSONValues.h"
@@ -164,14 +165,6 @@
 
 } // namespace
 
-ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders(const ResourceResponse& response)
-    : m_contentSecuitryPolicy(response.httpHeaderField("Content-Security-Policy"))
-    , m_contentSecurityPolicyReportOnly(response.httpHeaderField("Content-Security-Policy-Report-Only"))
-    , m_xWebKitCSP(response.httpHeaderField("X-WebKit-CSP"))
-    , m_xWebKitCSPReportOnly(response.httpHeaderField("X-WebKit-CSP-Report-Only"))
-{
-}
-
 static bool skipExactly(const UChar*& position, const UChar* end, UChar delimiter)
 {
     if (position < end && *position == delimiter) {
diff --git a/Source/core/page/ContentSecurityPolicy.h b/Source/core/page/ContentSecurityPolicy.h
index 7e09483..444455f 100644
--- a/Source/core/page/ContentSecurityPolicy.h
+++ b/Source/core/page/ContentSecurityPolicy.h
@@ -38,33 +38,16 @@
 
 namespace WebCore {
 
+class ContentSecurityPolicyResponseHeaders;
 class CSPDirectiveList;
 class DOMStringList;
 class KURL;
-class ResourceResponse;
 class ScriptExecutionContext;
 class SecurityOrigin;
 
 typedef int SandboxFlags;
 typedef Vector<OwnPtr<CSPDirectiveList> > CSPDirectiveListVector;
 
-class ContentSecurityPolicyResponseHeaders {
-public:
-    ContentSecurityPolicyResponseHeaders() { }
-    explicit ContentSecurityPolicyResponseHeaders(const ResourceResponse&);
-
-    const String& contentSecurityPolicy() const { return m_contentSecuitryPolicy; }
-    const String& contentSecurityPolicyReportOnly() const { return m_contentSecurityPolicyReportOnly; }
-    const String& xWebKitCSP() const { return m_xWebKitCSP; }
-    const String& xWebKitCSPReportOnly() const { return m_xWebKitCSPReportOnly; }
-
-private:
-    String m_contentSecuitryPolicy;
-    String m_contentSecurityPolicyReportOnly;
-    String m_xWebKitCSP;
-    String m_xWebKitCSPReportOnly;
-};
-
 class ContentSecurityPolicy {
     WTF_MAKE_FAST_ALLOCATED;
 public:
diff --git a/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp b/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp
new file mode 100644
index 0000000..f51d762
--- /dev/null
+++ b/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 Google, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/page/ContentSecurityPolicyResponseHeaders.h"
+
+#include "core/platform/network/ResourceResponse.h"
+#include "wtf/text/WTFString.h"
+
+namespace WebCore {
+
+ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders(const ResourceResponse& response)
+    : m_contentSecurityPolicy(response.httpHeaderField("Content-Security-Policy"))
+    , m_contentSecurityPolicyReportOnly(response.httpHeaderField("Content-Security-Policy-Report-Only"))
+    , m_xWebKitCSP(response.httpHeaderField("X-WebKit-CSP"))
+    , m_xWebKitCSPReportOnly(response.httpHeaderField("X-WebKit-CSP-Report-Only"))
+{
+}
+
+}
diff --git a/Source/core/page/ContentSecurityPolicyResponseHeaders.h b/Source/core/page/ContentSecurityPolicyResponseHeaders.h
new file mode 100644
index 0000000..d5076d4
--- /dev/null
+++ b/Source/core/page/ContentSecurityPolicyResponseHeaders.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013 Google, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ContentSecurityPolicyResponseHeaders_h
+#define ContentSecurityPolicyResponseHeaders_h
+
+#include "wtf/text/WTFString.h"
+
+namespace WebCore {
+
+class ResourceResponse;
+
+class ContentSecurityPolicyResponseHeaders {
+public:
+    ContentSecurityPolicyResponseHeaders() { }
+    explicit ContentSecurityPolicyResponseHeaders(const ResourceResponse&);
+
+    const String& contentSecurityPolicy() const { return m_contentSecurityPolicy; }
+    const String& contentSecurityPolicyReportOnly() const { return m_contentSecurityPolicyReportOnly; }
+    const String& xWebKitCSP() const { return m_xWebKitCSP; }
+    const String& xWebKitCSPReportOnly() const { return m_xWebKitCSPReportOnly; }
+
+private:
+    String m_contentSecurityPolicy;
+    String m_contentSecurityPolicyReportOnly;
+    String m_xWebKitCSP;
+    String m_xWebKitCSPReportOnly;
+};
+
+}
+
+#endif
diff --git a/Source/core/page/DOMTimer.cpp b/Source/core/page/DOMTimer.cpp
index ee3157f..16210e5 100644
--- a/Source/core/page/DOMTimer.cpp
+++ b/Source/core/page/DOMTimer.cpp
@@ -170,8 +170,29 @@
         if (fireTime <= currentTime)
             return fireTime;
 
-        double alignedTime = ceil(fireTime / alignmentInterval) * alignmentInterval;
-        return alignedTime;
+        // When a repeating timer is scheduled for exactly the
+        // background page alignment interval, because it's impossible
+        // for the timer to be rescheduled instantaneously, it misses
+        // every other fire time. Avoid this by looking at the next
+        // fire time rounded both down and up.
+
+        double alignedTimeRoundedDown = floor(fireTime / alignmentInterval) * alignmentInterval;
+        double alignedTimeRoundedUp = ceil(fireTime / alignmentInterval) * alignmentInterval;
+
+        // If the version rounded down is in the past, discard it
+        // immediately.
+
+        if (alignedTimeRoundedDown <= currentTime)
+            return alignedTimeRoundedUp;
+
+        // Only use the rounded-down time if it's within a certain
+        // tolerance of the fire time. This avoids speeding up timers
+        // on background pages in the common case.
+
+        if (fireTime - alignedTimeRoundedDown < minimumInterval)
+            return alignedTimeRoundedDown;
+
+        return alignedTimeRoundedUp;
     }
 
     return fireTime;
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index 1781573..bb69bb6 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -56,12 +56,7 @@
 #include "core/dom/ScriptExecutionContext.h"
 #include "core/editing/Editor.h"
 #include "core/history/BackForwardController.h"
-#include "core/html/HTMLCanvasElement.h"
 #include "core/html/HTMLFrameOwnerElement.h"
-#include "core/html/HTMLImageElement.h"
-#include "core/html/HTMLVideoElement.h"
-#include "core/html/ImageData.h"
-#include "core/html/canvas/CanvasRenderingContext2D.h"
 #include "core/inspector/InspectorInstrumentation.h"
 #include "core/inspector/ScriptCallStack.h"
 #include "core/loader/DocumentLoader.h"
@@ -80,8 +75,6 @@
 #include "core/page/FrameTree.h"
 #include "core/page/FrameView.h"
 #include "core/page/History.h"
-#include "core/page/ImageBitmap.h"
-#include "core/page/ImageBitmapCallback.h"
 #include "core/page/Location.h"
 #include "core/page/Navigator.h"
 #include "core/page/Page.h"
@@ -1361,192 +1354,6 @@
     page->chrome().setWindowRect(adjustWindowRect(page, update));
 }
 
-static LayoutSize size(HTMLImageElement* image)
-{
-    if (CachedImage* cachedImage = image->cachedImage())
-        return cachedImage->imageSizeForRenderer(image->renderer(), 1.0f); // FIXME: Not sure about this.
-    return IntSize();
-}
-
-static IntSize size(HTMLVideoElement* video)
-{
-    if (MediaPlayer* player = video->player())
-        return player->naturalSize();
-    return IntSize();
-}
-
-void DOMWindow::createImageBitmap(HTMLImageElement* image, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    LayoutSize s = size(image);
-    createImageBitmap(image, callback, 0, 0, s.width(), s.height(), ec);
-}
-
-void DOMWindow::createImageBitmap(HTMLImageElement* image, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    if (!image) {
-        ec = TypeError;
-        return;
-    }
-    if (!image->cachedImage()) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (image->cachedImage()->image()->isSVGImage()) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (!sw || !sh) {
-        ec = IndexSizeError;
-        return;
-    }
-    if (!image->cachedImage()->image()->hasSingleSecurityOrigin()) {
-        ec = SecurityError;
-        return;
-    }
-    if (!image->cachedImage()->passesAccessControlCheck(document()->securityOrigin()) && document()->securityOrigin()->taintsCanvas(image->src())) {
-        ec = SecurityError;
-        return;
-    }
-
-    ec = 0;
-
-    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
-    RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(image, IntRect(sx, sy, sw, sh));
-    RefPtr<ImageBitmapCallback> callbackLocal = callback;
-    scriptExecutionContext()->postTask(ImageBitmapCallback::CallbackTask::create(imageBitmap.release(), callbackLocal));
-}
-
-void DOMWindow::createImageBitmap(HTMLVideoElement* video, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    IntSize s = size(video);
-    createImageBitmap(video, callback, 0, 0, s.width(), s.height(), ec);
-}
-
-void DOMWindow::createImageBitmap(HTMLVideoElement* video, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    if (!video) {
-        ec = TypeError;
-        return;
-    }
-    if (!video->player()) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (!sw || !sh) {
-        ec = IndexSizeError;
-        return;
-    }
-    if (!video->hasSingleSecurityOrigin()) {
-        ec = SecurityError;
-        return;
-    }
-    if (!video->player()->didPassCORSAccessCheck() && document()->securityOrigin()->taintsCanvas(video->currentSrc())) {
-        ec = SecurityError;
-        return;
-    }
-
-    ec = 0;
-
-    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
-    RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(video, IntRect(sx, sy, sw, sh));
-    RefPtr<ImageBitmapCallback> callbackLocal = callback;
-    scriptExecutionContext()->postTask(ImageBitmapCallback::CallbackTask::create(imageBitmap.release(), callbackLocal));
-}
-
-void DOMWindow::createImageBitmap(CanvasRenderingContext2D* context, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    createImageBitmap(context->canvas(), callback, ec);
-}
-
-void DOMWindow::createImageBitmap(CanvasRenderingContext2D* context, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    createImageBitmap(context->canvas(), callback, sx, sy, sw, sh, ec);
-}
-
-void DOMWindow::createImageBitmap(HTMLCanvasElement* canvas, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    createImageBitmap(canvas, callback, 0, 0, canvas->width(), canvas->height(), ec);
-}
-
-void DOMWindow::createImageBitmap(HTMLCanvasElement* canvas, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    if (!canvas) {
-        ec = TypeError;
-        return;
-    }
-    if (!canvas->originClean()) {
-        ec = InvalidStateError;
-        return;
-    }
-    if (!sw || !sh) {
-        ec = IndexSizeError;
-        return;
-    }
-
-    ec = 0;
-
-    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
-    RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh));
-    RefPtr<ImageBitmapCallback> callbackLocal = callback;
-    scriptExecutionContext()->postTask(ImageBitmapCallback::CallbackTask::create(imageBitmap.release(), callbackLocal));
-}
-
-void DOMWindow::createImageBitmap(ImageData* data, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    createImageBitmap(data, callback, 0, 0, data->width(), data->height(), ec);
-}
-
-void DOMWindow::createImageBitmap(ImageData* data, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    if (!data) {
-        ec = TypeError;
-        return;
-    }
-    if (!sw || !sh) {
-        ec = IndexSizeError;
-        return;
-    }
-
-    ec = 0;
-
-    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
-    RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(data, IntRect(sx, sy, sw, sh));
-    RefPtr<ImageBitmapCallback> callbackLocal = callback;
-    scriptExecutionContext()->postTask(ImageBitmapCallback::CallbackTask::create(imageBitmap.release(), callbackLocal));
-}
-
-void DOMWindow::createImageBitmap(ImageBitmap* bitmap, PassRefPtr<ImageBitmapCallback> callback, ExceptionCode& ec)
-{
-    createImageBitmap(bitmap, callback, 0, 0, bitmap->width(), bitmap->height(), ec);
-}
-
-void DOMWindow::createImageBitmap(ImageBitmap* bitmap, PassRefPtr<ImageBitmapCallback> callback, int sx, int sy, int sw, int sh, ExceptionCode& ec)
-{
-    if (!bitmap) {
-        ec = TypeError;
-        return;
-    }
-    if (!sw || !sh) {
-        ec = IndexSizeError;
-        return;
-    }
-
-    ec = 0;
-
-    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
-    RefPtr<ImageBitmap> imageBitmap = ImageBitmap::create(bitmap, IntRect(sx, sy, sw, sh));
-    RefPtr<ImageBitmapCallback> callbackLocal = callback;
-    scriptExecutionContext()->postTask(ImageBitmapCallback::CallbackTask::create(imageBitmap.release(), callbackLocal));
-}
-
 int DOMWindow::requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback> callback)
 {
     callback->m_useLegacyTimeBase = false;
diff --git a/Source/core/page/DOMWindow.h b/Source/core/page/DOMWindow.h
index 34eb1e6..b35b548 100644
--- a/Source/core/page/DOMWindow.h
+++ b/Source/core/page/DOMWindow.h
@@ -38,7 +38,6 @@
     class BarProp;
     class CSSRuleList;
     class CSSStyleDeclaration;
-    class CanvasRenderingContext2D;
     class Console;
     class DOMApplicationCache;
     class DOMPoint;
@@ -53,14 +52,8 @@
     class ExceptionState;
     class FloatRect;
     class Frame;
-    class HTMLCanvasElement;
-    class HTMLImageElement;
-    class HTMLVideoElement;
     class History;
     class IDBFactory;
-    class ImageBitmap;
-    class ImageBitmapCallback;
-    class ImageData;
     class Location;
     class MediaQueryList;
     class MessageEvent;
@@ -244,20 +237,6 @@
         void resizeBy(float x, float y) const;
         void resizeTo(float width, float height) const;
 
-        // Images
-        void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(HTMLImageElement*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-        void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(HTMLVideoElement*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-        void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(CanvasRenderingContext2D*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-        void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(HTMLCanvasElement*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-        void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(ImageData*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-        void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, ExceptionCode&);
-        void createImageBitmap(ImageBitmap*, PassRefPtr<ImageBitmapCallback>, int sx, int sy, int sw, int sh, ExceptionCode&);
-
         // WebKit animation extensions
         int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>);
         int webkitRequestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>);
@@ -348,6 +327,9 @@
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkittransitionend, webkitTransitionEnd);
         DEFINE_ATTRIBUTE_EVENT_LISTENER(transitionend);
 
+        void captureEvents() { }
+        void releaseEvents() { }
+
         void finishedLoading();
 
         using RefCounted<DOMWindow>::ref;
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 5e64e1c..7b3e0b5 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -36,7 +36,7 @@
 #include "core/dom/EventNames.h"
 #include "core/dom/EventPathWalker.h"
 #include "core/dom/ExceptionCodePlaceholder.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/KeyboardEvent.h"
 #include "core/dom/MouseEvent.h"
 #include "core/dom/TextEvent.h"
@@ -846,7 +846,7 @@
         Node* node = event.targetNode();
         bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
         if (node && (caretBrowsing || node->rendererIsEditable()) && node->renderer()) {
-            VisiblePosition pos = node->renderer()->positionForPoint(event.localPoint());
+            VisiblePosition pos = VisiblePosition(node->renderer()->positionForPoint(event.localPoint()));
             newSelection = VisibleSelection(pos);
         }
 
@@ -2016,54 +2016,59 @@
     if (m_nodeUnderMouse)
         swallowEvent = !(m_nodeUnderMouse->dispatchMouseEvent(mouseEvent, eventType, clickCount));
 
-    if (!swallowEvent && eventType == eventNames().mousedownEvent) {
+    if (swallowEvent || eventType != eventNames().mousedownEvent)
+        return !swallowEvent;
 
-        // If clicking on a frame scrollbar, do not mess up with content focus.
-        if (FrameView* view = m_frame->view()) {
-            if (view->scrollbarAtPoint(mouseEvent.position()))
-                return true;
-        }
+    // If clicking on a frame scrollbar, do not mess up with content focus.
+    if (FrameView* view = m_frame->view()) {
+        if (view->scrollbarAtPoint(mouseEvent.position()))
+            return true;
+    }
 
-        // The layout needs to be up to date to determine if an element is focusable.
-        m_frame->document()->updateLayoutIgnorePendingStylesheets();
+    // The layout needs to be up to date to determine if an element is focusable.
+    m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
-        // Blur current focus node when a link/button is clicked; this
-        // is expected by some sites that rely on onChange handlers running
-        // from form fields before the button click is processed.
-        Node* node = m_nodeUnderMouse.get();
+    Element* element = 0;
+    if (m_nodeUnderMouse)
+        element = m_nodeUnderMouse->isElementNode() ? toElement(m_nodeUnderMouse.get()) : m_nodeUnderMouse->parentOrShadowHostElement();
+    for (; element; element = element->parentOrShadowHostElement()) {
+        if (element->isFocusable())
+            break;
+    }
+    ASSERT(!element || element->isFocusable());
 
-        // Walk up the DOM tree to search for a node to focus.
-        while (node) {
-            if (node->isFocusable()) {
-                // To fix <rdar://problem/4895428> Can't drag selected ToDo, we don't focus a
-                // node on mouse down if it's selected and inside a focused node. It will be
-                // focused if the user does a mouseup over it, however, because the mouseup
-                // will set a selection inside it, which will call setFocuseNodeIfNeeded.
-                Node* n = node->isShadowRoot() ? toShadowRoot(node)->host() : node;
-                if (m_frame->selection()->isRange()
-                    && m_frame->selection()->toNormalizedRange()->compareNode(n, IGNORE_EXCEPTION) == Range::NODE_INSIDE
-                    && n->isDescendantOf(m_frame->document()->focusedElement()))
-                    return true;
+    // To fix <rdar://problem/4895428> Can't drag selected ToDo, we don't focus
+    // a node on mouse down if it's selected and inside a focused node. It will
+    // be focused if the user does a mouseup over it, however, because the
+    // mouseup will set a selection inside it, which will call
+    // FrameSelection::setFocusedNodeIfNeeded.
+    if (element
+        && m_frame->selection()->isRange()
+        && m_frame->selection()->toNormalizedRange()->compareNode(element, IGNORE_EXCEPTION) == Range::NODE_INSIDE
+        && element->isDescendantOf(m_frame->document()->focusedElement()))
+        return true;
 
-                break;
-            }
-            node = node->parentOrShadowHostNode();
-        }
+    bool elementIsMouseFocusable = element && element->isMouseFocusable();
 
-        // Only change the focus when clicking scrollbars if it can transfered to a mouse focusable node.
-        if ((!node || !node->isMouseFocusable()) && isInsideScrollbar(mouseEvent.position()))
-            return false;
+    // Only change the focus when clicking scrollbars if it can transfered to a
+    // mouse focusable node.
+    if (!elementIsMouseFocusable && isInsideScrollbar(mouseEvent.position()))
+        return false;
 
-        // If focus shift is blocked, we eat the event.  Note we should never clear swallowEvent
-        // if the page already set it (e.g., by canceling default behavior).
-        if (Page* page = m_frame->page()) {
-            if (node && node->isElementNode() && node->isMouseFocusable()) {
-                if (!page->focusController()->setFocusedElement(toElement(node), m_frame, FocusDirectionMouse))
-                    swallowEvent = true;
-            } else if (!node || !node->focused()) {
-                if (!page->focusController()->setFocusedElement(0, m_frame))
-                    swallowEvent = true;
-            }
+    if (Page* page = m_frame->page()) {
+        // If focus shift is blocked, we eat the event. Note we should never
+        // clear swallowEvent if the page already set it (e.g., by canceling
+        // default behavior).
+        if (elementIsMouseFocusable) {
+            if (!page->focusController()->setFocusedElement(element, m_frame, FocusDirectionMouse))
+                swallowEvent = true;
+        } else if (!element || !element->focused()) {
+            // We call setFocusedElement even with !element in order to blur
+            // current focus element when a link is clicked; this is expected by
+            // some sites that rely on onChange handlers running from form
+            // fields before the button click is processed.
+            if (!page->focusController()->setFocusedElement(0, m_frame))
+                swallowEvent = true;
         }
     }
 
@@ -2924,7 +2929,7 @@
     return true;
 }
 
-bool EventHandler::isKeyEventAllowedInFullScreen(FullscreenController* fullscreen, const PlatformKeyboardEvent& keyEvent) const
+bool EventHandler::isKeyEventAllowedInFullScreen(FullscreenElementStack* fullscreen, const PlatformKeyboardEvent& keyEvent) const
 {
     if (fullscreen->webkitFullScreenKeyboardInputAllowed())
         return true;
@@ -2947,7 +2952,7 @@
 {
     RefPtr<FrameView> protector(m_frame->view());
 
-    if (FullscreenController* fullscreen = FullscreenController::fromIfExists(m_frame->document())) {
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(m_frame->document())) {
         if (fullscreen->webkitIsFullScreen() && !isKeyEventAllowedInFullScreen(fullscreen, initialKeyEvent))
             return false;
     }
@@ -3408,7 +3413,7 @@
     if (m_frame->document()->inDesignMode())
         return;
 
-    if (page->focusController()->advanceFocus(focusDirection, event))
+    if (page->focusController()->advanceFocus(focusDirection))
         event->setDefaultHandled();
 }
 
@@ -3432,7 +3437,7 @@
     if (m_frame->document()->inDesignMode())
         return;
 
-    if (page->focusController()->advanceFocus(focusDirection, event))
+    if (page->focusController()->advanceFocus(focusDirection))
         event->setDefaultHandled();
 }
 
diff --git a/Source/core/page/EventHandler.h b/Source/core/page/EventHandler.h
index e31d254..22f62e9 100644
--- a/Source/core/page/EventHandler.h
+++ b/Source/core/page/EventHandler.h
@@ -50,7 +50,7 @@
 class EventTarget;
 class FloatPoint;
 class FloatQuad;
-class FullscreenController;
+class FullscreenElementStack;
 class Frame;
 class HTMLFrameSetElement;
 class HitTestRequest;
@@ -285,7 +285,7 @@
 
     bool capturesDragging() const { return m_capturesDragging; }
 
-    bool isKeyEventAllowedInFullScreen(FullscreenController*, const PlatformKeyboardEvent&) const;
+    bool isKeyEventAllowedInFullScreen(FullscreenElementStack*, const PlatformKeyboardEvent&) const;
 
     bool handleGestureTapDown();
 
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
index feb7ef3..d410de9 100644
--- a/Source/core/page/EventSource.cpp
+++ b/Source/core/page/EventSource.cpp
@@ -415,7 +415,8 @@
 PassRefPtr<MessageEvent> EventSource::createMessageEvent()
 {
     RefPtr<MessageEvent> event = MessageEvent::create();
-    event->initMessageEvent(m_eventName.isEmpty() ? eventNames().messageEvent : AtomicString(m_eventName), false, false, SerializedScriptValue::create(String::adopt(m_data)), m_eventStreamOrigin, m_lastEventId, 0, nullptr);
+    event->initMessageEvent(m_eventName.isEmpty() ? eventNames().messageEvent : AtomicString(m_eventName), false, false, SerializedScriptValue::create(String(m_data)), m_eventStreamOrigin, m_lastEventId, 0, nullptr);
+    m_data.clear();
     return event.release();
 }
 
diff --git a/Source/core/page/FocusController.cpp b/Source/core/page/FocusController.cpp
index bc6e613..fdf5280 100644
--- a/Source/core/page/FocusController.cpp
+++ b/Source/core/page/FocusController.cpp
@@ -61,6 +61,8 @@
 using namespace HTMLNames;
 using namespace std;
 
+// FIXME: Some of Node* return values and Node* arguments should be Element*.
+
 FocusNavigationScope::FocusNavigationScope(TreeScope* treeScope)
     : m_rootTreeScope(treeScope)
 {
@@ -130,34 +132,40 @@
     return node->isHTMLElement() && toHTMLElement(node)->hasCustomFocusLogic();
 }
 
-static inline bool isNonFocusableShadowHost(Node* node, KeyboardEvent* event)
+static inline bool isNonFocusableShadowHost(Node* node)
 {
     ASSERT(node);
     return !node->isFocusable() && isShadowHost(node) && !hasCustomFocusLogic(node);
 }
 
-static inline bool isNonKeyboardFocusableShadowHost(Node* node, KeyboardEvent* event)
+static inline bool isNonKeyboardFocusableShadowHost(Node* node)
 {
     ASSERT(node);
-    return !node->isKeyboardFocusable(event) && isShadowHost(node) && !hasCustomFocusLogic(node);
+    if (!node->isElementNode())
+        return false;
+    Element* element = toElement(node);
+    return !element->isKeyboardFocusable() && isShadowHost(element) && !hasCustomFocusLogic(element);
 }
 
-static inline bool isKeyboardFocusableShadowHost(Node* node, KeyboardEvent* event)
+static inline bool isKeyboardFocusableShadowHost(Node* node)
 {
     ASSERT(node);
-    return node->isKeyboardFocusable(event) && isShadowHost(node) && !hasCustomFocusLogic(node);
+    if (!node->isElementNode())
+        return false;
+    Element* element = toElement(node);
+    return element->isKeyboardFocusable() && isShadowHost(element) && !hasCustomFocusLogic(element);
 }
 
-static inline int adjustedTabIndex(Node* node, KeyboardEvent* event)
+static inline int adjustedTabIndex(Node* node)
 {
     ASSERT(node);
-    return isNonKeyboardFocusableShadowHost(node, event) ? 0 : node->tabIndex();
+    return isNonKeyboardFocusableShadowHost(node) ? 0 : node->tabIndex();
 }
 
-static inline bool shouldVisit(Node* node, KeyboardEvent* event)
+static inline bool shouldVisit(Node* node)
 {
     ASSERT(node);
-    return node->isKeyboardFocusable(event) || isNonKeyboardFocusableShadowHost(node, event);
+    return (node->isElementNode() && toElement(node)->isKeyboardFocusable()) || isNonKeyboardFocusableShadowHost(node);
 }
 
 FocusController::FocusController(Page* page)
@@ -227,7 +235,7 @@
     }
 }
 
-Node* FocusController::findFocusableNodeDecendingDownIntoFrameDocument(FocusDirection direction, Node* node, KeyboardEvent* event)
+Node* FocusController::findFocusableNodeDecendingDownIntoFrameDocument(FocusDirection direction, Node* node)
 {
     // The node we found might be a HTMLFrameOwnerElement, so descend down the tree until we find either:
     // 1) a focusable node, or
@@ -236,7 +244,7 @@
         HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node);
         if (!owner->contentFrame())
             break;
-        Node* foundNode = findFocusableNode(direction, FocusNavigationScope::focusNavigationScopeOwnedByIFrame(owner), 0, event);
+        Node* foundNode = findFocusableNode(direction, FocusNavigationScope::focusNavigationScopeOwnedByIFrame(owner), 0);
         if (!foundNode)
             break;
         ASSERT(node != foundNode);
@@ -245,9 +253,9 @@
     return node;
 }
 
-bool FocusController::setInitialFocus(FocusDirection direction, KeyboardEvent* event)
+bool FocusController::setInitialFocus(FocusDirection direction)
 {
-    bool didAdvanceFocus = advanceFocus(direction, event, true);
+    bool didAdvanceFocus = advanceFocus(direction, true);
 
     // If focus is being set initially, accessibility needs to be informed that system focus has moved
     // into the web area again, even if focus did not change within WebCore. PostNotification is called instead
@@ -258,17 +266,17 @@
     return didAdvanceFocus;
 }
 
-bool FocusController::advanceFocus(FocusDirection direction, KeyboardEvent* event, bool initialFocus)
+bool FocusController::advanceFocus(FocusDirection direction, bool initialFocus)
 {
     switch (direction) {
     case FocusDirectionForward:
     case FocusDirectionBackward:
-        return advanceFocusInDocumentOrder(direction, event, initialFocus);
+        return advanceFocusInDocumentOrder(direction, initialFocus);
     case FocusDirectionLeft:
     case FocusDirectionRight:
     case FocusDirectionUp:
     case FocusDirectionDown:
-        return advanceFocusDirectionally(direction, event);
+        return advanceFocusDirectionally(direction);
     default:
         ASSERT_NOT_REACHED();
     }
@@ -276,7 +284,7 @@
     return false;
 }
 
-bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, KeyboardEvent* event, bool initialFocus)
+bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, bool initialFocus)
 {
     Frame* frame = focusedOrMainFrame();
     ASSERT(frame);
@@ -291,7 +299,7 @@
 
     document->updateLayoutIgnorePendingStylesheets();
 
-    RefPtr<Node> node = findFocusableNodeAcrossFocusScope(direction, FocusNavigationScope::focusNavigationScopeOf(currentNode ? currentNode : document), currentNode, event);
+    RefPtr<Node> node = findFocusableNodeAcrossFocusScope(direction, FocusNavigationScope::focusNavigationScopeOf(currentNode ? currentNode : document), currentNode);
 
     if (!node) {
         // We didn't find a node to focus, so we should try to pass focus to Chrome.
@@ -303,8 +311,8 @@
         }
 
         // Chrome doesn't want focus, so we should wrap focus.
-        node = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOf(m_page->mainFrame()->document()), 0, event);
-        node = findFocusableNodeDecendingDownIntoFrameDocument(direction, node.get(), event);
+        node = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOf(m_page->mainFrame()->document()), 0);
+        node = findFocusableNodeDecendingDownIntoFrameDocument(direction, node.get());
 
         if (!node)
             return false;
@@ -320,10 +328,11 @@
         // FIXME: May need a way to focus a document here.
         return false;
 
-    if (node->isFrameOwnerElement() && (!node->isPluginElement() || !node->isKeyboardFocusable(event))) {
+    Element* element = toElement(node.get());
+    if (element->isFrameOwnerElement() && (!element->isPluginElement() || !element->isKeyboardFocusable())) {
         // We focus frames rather than frame owners.
         // FIXME: We should not focus frames that have no scrollbars, as focusing them isn't useful to the user.
-        HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node.get());
+        HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(element);
         if (!owner->contentFrame())
             return false;
 
@@ -335,7 +344,7 @@
     // FIXME: It would be nice to just be able to call setFocusedElement(node)
     // here, but we can't do that because some elements (e.g. HTMLInputElement
     // and HTMLTextAreaElement) do extra work in their focus() methods.
-    Document* newDocument = node->document();
+    Document* newDocument = element->document();
 
     if (newDocument != document) {
         // Focus is going away from this document, so clear the focused node.
@@ -346,25 +355,26 @@
         setFocusedFrame(newDocument->frame());
 
     if (caretBrowsing) {
-        Position position = firstPositionInOrBeforeNode(node.get());
+        Position position = firstPositionInOrBeforeNode(element);
         VisibleSelection newSelection(position, position, DOWNSTREAM);
         if (frame->selection()->shouldChangeSelection(newSelection))
             frame->selection()->setSelection(newSelection);
     }
 
-    toElement(node.get())->focus(false, direction);
+    element->focus(false, direction);
     return true;
 }
 
-Node* FocusController::findFocusableNodeAcrossFocusScope(FocusDirection direction, FocusNavigationScope scope, Node* currentNode, KeyboardEvent* event)
+Node* FocusController::findFocusableNodeAcrossFocusScope(FocusDirection direction, FocusNavigationScope scope, Node* currentNode)
 {
-    ASSERT(!currentNode || !isNonFocusableShadowHost(currentNode, event));
+    ASSERT(!currentNode || !isNonFocusableShadowHost(currentNode));
     Node* found;
-    if (currentNode && direction == FocusDirectionForward && isKeyboardFocusableShadowHost(currentNode, event)) {
-        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(currentNode), 0, event);
-        found = foundInInnerFocusScope ? foundInInnerFocusScope : findFocusableNodeRecursively(direction, scope, currentNode, event);
-    } else
-        found = findFocusableNodeRecursively(direction, scope, currentNode, event);
+    if (currentNode && direction == FocusDirectionForward && isKeyboardFocusableShadowHost(currentNode)) {
+        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(currentNode), 0);
+        found = foundInInnerFocusScope ? foundInInnerFocusScope : findFocusableNodeRecursively(direction, scope, currentNode);
+    } else {
+        found = findFocusableNodeRecursively(direction, scope, currentNode);
+    }
 
     // If there's no focusable node to advance to, move up the focus scopes until we find one.
     while (!found) {
@@ -372,65 +382,65 @@
         if (!owner)
             break;
         scope = FocusNavigationScope::focusNavigationScopeOf(owner);
-        if (direction == FocusDirectionBackward && isKeyboardFocusableShadowHost(owner, event)) {
+        if (direction == FocusDirectionBackward && isKeyboardFocusableShadowHost(owner)) {
             found = owner;
             break;
         }
-        found = findFocusableNodeRecursively(direction, scope, owner, event);
+        found = findFocusableNodeRecursively(direction, scope, owner);
     }
-    found = findFocusableNodeDecendingDownIntoFrameDocument(direction, found, event);
+    found = findFocusableNodeDecendingDownIntoFrameDocument(direction, found);
     return found;
 }
 
-Node* FocusController::findFocusableNodeRecursively(FocusDirection direction, FocusNavigationScope scope, Node* start, KeyboardEvent* event)
+Node* FocusController::findFocusableNodeRecursively(FocusDirection direction, FocusNavigationScope scope, Node* start)
 {
     // Starting node is exclusive.
-    Node* found = findFocusableNode(direction, scope, start, event);
+    Node* found = findFocusableNode(direction, scope, start);
     if (!found)
         return 0;
     if (direction == FocusDirectionForward) {
-        if (!isNonKeyboardFocusableShadowHost(found, event))
+        if (!isNonKeyboardFocusableShadowHost(found))
             return found;
-        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0, event);
-        return foundInInnerFocusScope ? foundInInnerFocusScope : findFocusableNodeRecursively(direction, scope, found, event);
+        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0);
+        return foundInInnerFocusScope ? foundInInnerFocusScope : findFocusableNodeRecursively(direction, scope, found);
     }
     ASSERT(direction == FocusDirectionBackward);
-    if (isKeyboardFocusableShadowHost(found, event)) {
-        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0, event);
+    if (isKeyboardFocusableShadowHost(found)) {
+        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0);
         return foundInInnerFocusScope ? foundInInnerFocusScope : found;
     }
-    if (isNonKeyboardFocusableShadowHost(found, event)) {
-        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0, event);
-        return foundInInnerFocusScope ? foundInInnerFocusScope :findFocusableNodeRecursively(direction, scope, found, event);
+    if (isNonKeyboardFocusableShadowHost(found)) {
+        Node* foundInInnerFocusScope = findFocusableNodeRecursively(direction, FocusNavigationScope::focusNavigationScopeOwnedByShadowHost(found), 0);
+        return foundInInnerFocusScope ? foundInInnerFocusScope :findFocusableNodeRecursively(direction, scope, found);
     }
     return found;
 }
 
-Node* FocusController::findFocusableNode(FocusDirection direction, FocusNavigationScope scope, Node* node, KeyboardEvent* event)
+Node* FocusController::findFocusableNode(FocusDirection direction, FocusNavigationScope scope, Node* node)
 {
     return (direction == FocusDirectionForward)
-        ? nextFocusableNode(scope, node, event)
-        : previousFocusableNode(scope, node, event);
+        ? nextFocusableNode(scope, node)
+        : previousFocusableNode(scope, node);
 }
 
-Node* FocusController::findNodeWithExactTabIndex(Node* start, int tabIndex, KeyboardEvent* event, FocusDirection direction)
+Node* FocusController::findNodeWithExactTabIndex(Node* start, int tabIndex, FocusDirection direction)
 {
     // Search is inclusive of start
     using namespace NodeRenderingTraversal;
     for (Node* node = start; node; node = direction == FocusDirectionForward ? nextInScope(node) : previousInScope(node)) {
-        if (shouldVisit(node, event) && adjustedTabIndex(node, event) == tabIndex)
+        if (shouldVisit(node) && adjustedTabIndex(node) == tabIndex)
             return node;
     }
     return 0;
 }
 
-static Node* nextNodeWithGreaterTabIndex(Node* start, int tabIndex, KeyboardEvent* event)
+static Node* nextNodeWithGreaterTabIndex(Node* start, int tabIndex)
 {
     // Search is inclusive of start
     int winningTabIndex = std::numeric_limits<short>::max() + 1;
     Node* winner = 0;
     for (Node* node = start; node; node = NodeRenderingTraversal::nextInScope(node)) {
-        if (shouldVisit(node, event) && node->tabIndex() > tabIndex && node->tabIndex() < winningTabIndex) {
+        if (shouldVisit(node) && node->tabIndex() > tabIndex && node->tabIndex() < winningTabIndex) {
             winner = node;
             winningTabIndex = node->tabIndex();
         }
@@ -439,14 +449,14 @@
     return winner;
 }
 
-static Node* previousNodeWithLowerTabIndex(Node* start, int tabIndex, KeyboardEvent* event)
+static Node* previousNodeWithLowerTabIndex(Node* start, int tabIndex)
 {
     // Search is inclusive of start
     int winningTabIndex = 0;
     Node* winner = 0;
     for (Node* node = start; node; node = NodeRenderingTraversal::previousInScope(node)) {
-        int currentTabIndex = adjustedTabIndex(node, event);
-        if ((shouldVisit(node, event) || isNonKeyboardFocusableShadowHost(node, event)) && currentTabIndex < tabIndex && currentTabIndex > winningTabIndex) {
+        int currentTabIndex = adjustedTabIndex(node);
+        if ((shouldVisit(node) || isNonKeyboardFocusableShadowHost(node)) && currentTabIndex < tabIndex && currentTabIndex > winningTabIndex) {
             winner = node;
             winningTabIndex = currentTabIndex;
         }
@@ -454,22 +464,22 @@
     return winner;
 }
 
-Node* FocusController::nextFocusableNode(FocusNavigationScope scope, Node* start, KeyboardEvent* event)
+Node* FocusController::nextFocusableNode(FocusNavigationScope scope, Node* start)
 {
     using namespace NodeRenderingTraversal;
 
     if (start) {
-        int tabIndex = adjustedTabIndex(start, event);
+        int tabIndex = adjustedTabIndex(start);
         // If a node is excluded from the normal tabbing cycle, the next focusable node is determined by tree order
         if (tabIndex < 0) {
             for (Node* node = nextInScope(start); node; node = nextInScope(node)) {
-                if (shouldVisit(node, event) && adjustedTabIndex(node, event) >= 0)
+                if (shouldVisit(node) && adjustedTabIndex(node) >= 0)
                     return node;
             }
         }
 
         // First try to find a node with the same tabindex as start that comes after start in the scope.
-        if (Node* winner = findNodeWithExactTabIndex(nextInScope(start), tabIndex, event, FocusDirectionForward))
+        if (Node* winner = findNodeWithExactTabIndex(nextInScope(start), tabIndex, FocusDirectionForward))
             return winner;
 
         if (!tabIndex)
@@ -480,15 +490,15 @@
     // Look for the first node in the scope that:
     // 1) has the lowest tabindex that is higher than start's tabindex (or 0, if start is null), and
     // 2) comes first in the scope, if there's a tie.
-    if (Node* winner = nextNodeWithGreaterTabIndex(scope.rootNode(), start ? adjustedTabIndex(start, event) : 0, event))
+    if (Node* winner = nextNodeWithGreaterTabIndex(scope.rootNode(), start ? adjustedTabIndex(start) : 0))
         return winner;
 
     // There are no nodes with a tabindex greater than start's tabindex,
     // so find the first node with a tabindex of 0.
-    return findNodeWithExactTabIndex(scope.rootNode(), 0, event, FocusDirectionForward);
+    return findNodeWithExactTabIndex(scope.rootNode(), 0, FocusDirectionForward);
 }
 
-Node* FocusController::previousFocusableNode(FocusNavigationScope scope, Node* start, KeyboardEvent* event)
+Node* FocusController::previousFocusableNode(FocusNavigationScope scope, Node* start)
 {
     using namespace NodeRenderingTraversal;
 
@@ -503,7 +513,7 @@
     int startingTabIndex;
     if (start) {
         startingNode = previousInScope(start);
-        startingTabIndex = adjustedTabIndex(start, event);
+        startingTabIndex = adjustedTabIndex(start);
     } else {
         startingNode = last;
         startingTabIndex = 0;
@@ -512,19 +522,19 @@
     // However, if a node is excluded from the normal tabbing cycle, the previous focusable node is determined by tree order
     if (startingTabIndex < 0) {
         for (Node* node = startingNode; node; node = previousInScope(node)) {
-            if (shouldVisit(node, event) && adjustedTabIndex(node, event) >= 0)
+            if (shouldVisit(node) && adjustedTabIndex(node) >= 0)
                 return node;
         }
     }
 
-    if (Node* winner = findNodeWithExactTabIndex(startingNode, startingTabIndex, event, FocusDirectionBackward))
+    if (Node* winner = findNodeWithExactTabIndex(startingNode, startingTabIndex, FocusDirectionBackward))
         return winner;
 
     // There are no nodes before start with the same tabindex as start, so look for a node that:
     // 1) has the highest non-zero tabindex (that is less than start's tabindex), and
     // 2) comes last in the scope, if there's a tie.
     startingTabIndex = (start && startingTabIndex) ? startingTabIndex : std::numeric_limits<short>::max();
-    return previousNodeWithLowerTabIndex(last, startingTabIndex, event);
+    return previousNodeWithLowerTabIndex(last, startingTabIndex);
 }
 
 static bool relinquishesEditingFocus(Node *node)
@@ -731,7 +741,7 @@
         closest = candidate;
 }
 
-void FocusController::findFocusCandidateInContainer(Node* container, const LayoutRect& startingRect, FocusDirection direction, KeyboardEvent* event, FocusCandidate& closest)
+void FocusController::findFocusCandidateInContainer(Node* container, const LayoutRect& startingRect, FocusDirection direction, FocusCandidate& closest)
 {
     ASSERT(container);
     Element* focusedElement = (focusedFrame() && focusedFrame()->document()) ? focusedFrame()->document()->focusedElement() : 0;
@@ -748,7 +758,7 @@
         if (element == focusedElement)
             continue;
 
-        if (!element->isKeyboardFocusable(event) && !element->isFrameOwnerElement() && !canScrollInDirection(element, direction))
+        if (!element->isKeyboardFocusable() && !element->isFrameOwnerElement() && !canScrollInDirection(element, direction))
             continue;
 
         FocusCandidate candidate = FocusCandidate(element, direction);
@@ -760,7 +770,7 @@
     }
 }
 
-bool FocusController::advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusDirection direction, KeyboardEvent* event)
+bool FocusController::advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusDirection direction)
 {
     if (!container || !container->document())
         return false;
@@ -772,7 +782,7 @@
 
     // Find the closest node within current container in the direction of the navigation.
     FocusCandidate focusCandidate;
-    findFocusCandidateInContainer(container, newStartingRect, direction, event, focusCandidate);
+    findFocusCandidateInContainer(container, newStartingRect, direction, focusCandidate);
 
     if (focusCandidate.isNull()) {
         // Nothing to focus, scroll if possible.
@@ -797,9 +807,9 @@
         if (focusedElement && !hasOffscreenRect(focusedElement))
             rect = nodeRectInAbsoluteCoordinates(focusedElement, true /* ignore border */);
         frameElement->contentFrame()->document()->updateLayoutIgnorePendingStylesheets();
-        if (!advanceFocusDirectionallyInContainer(frameElement->contentFrame()->document(), rect, direction, event)) {
+        if (!advanceFocusDirectionallyInContainer(frameElement->contentFrame()->document(), rect, direction)) {
             // The new frame had nothing interesting, need to find another candidate.
-            return advanceFocusDirectionallyInContainer(container, nodeRectInAbsoluteCoordinates(focusCandidate.visibleNode, true), direction, event);
+            return advanceFocusDirectionallyInContainer(container, nodeRectInAbsoluteCoordinates(focusCandidate.visibleNode, true), direction);
         }
         return true;
     }
@@ -814,7 +824,7 @@
         Element* focusedElement = focusedOrMainFrame()->document()->focusedElement();
         if (focusedElement && !hasOffscreenRect(focusedElement))
             startingRect = nodeRectInAbsoluteCoordinates(focusedElement, true);
-        return advanceFocusDirectionallyInContainer(focusCandidate.visibleNode, startingRect, direction, event);
+        return advanceFocusDirectionallyInContainer(focusCandidate.visibleNode, startingRect, direction);
     }
     if (focusCandidate.isOffscreenAfterScrolling) {
         Node* container = focusCandidate.enclosingScrollableBox;
@@ -830,7 +840,7 @@
     return true;
 }
 
-bool FocusController::advanceFocusDirectionally(FocusDirection direction, KeyboardEvent* event)
+bool FocusController::advanceFocusDirectionally(FocusDirection direction)
 {
     Frame* curFrame = focusedOrMainFrame();
     ASSERT(curFrame);
@@ -860,7 +870,7 @@
 
     bool consumed = false;
     do {
-        consumed = advanceFocusDirectionallyInContainer(container, startingRect, direction, event);
+        consumed = advanceFocusDirectionallyInContainer(container, startingRect, direction);
         startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore border */);
         container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direction, container);
         if (container && container->isDocumentNode())
diff --git a/Source/core/page/FocusController.h b/Source/core/page/FocusController.h
index 96f2928..972c037 100644
--- a/Source/core/page/FocusController.h
+++ b/Source/core/page/FocusController.h
@@ -67,8 +67,8 @@
     Frame* focusedFrame() const { return m_focusedFrame.get(); }
     Frame* focusedOrMainFrame() const;
 
-    bool setInitialFocus(FocusDirection, KeyboardEvent*);
-    bool advanceFocus(FocusDirection, KeyboardEvent*, bool initialFocus = false);
+    bool setInitialFocus(FocusDirection);
+    bool advanceFocus(FocusDirection direction) { return advanceFocus(direction, false); }
 
     bool setFocusedElement(Element*, PassRefPtr<Frame>, FocusDirection = FocusDirectionNone);
 
@@ -84,12 +84,13 @@
 private:
     explicit FocusController(Page*);
 
-    bool advanceFocusDirectionally(FocusDirection, KeyboardEvent*);
-    bool advanceFocusInDocumentOrder(FocusDirection, KeyboardEvent*, bool initialFocus);
+    bool advanceFocus(FocusDirection, bool initialFocus);
+    bool advanceFocusDirectionally(FocusDirection);
+    bool advanceFocusInDocumentOrder(FocusDirection, bool initialFocus);
 
-    Node* findFocusableNodeAcrossFocusScope(FocusDirection, FocusNavigationScope startScope, Node* start, KeyboardEvent*);
-    Node* findFocusableNodeRecursively(FocusDirection, FocusNavigationScope, Node* start, KeyboardEvent*);
-    Node* findFocusableNodeDecendingDownIntoFrameDocument(FocusDirection, Node*, KeyboardEvent*);
+    Node* findFocusableNodeAcrossFocusScope(FocusDirection, FocusNavigationScope startScope, Node* start);
+    Node* findFocusableNodeRecursively(FocusDirection, FocusNavigationScope, Node* start);
+    Node* findFocusableNodeDecendingDownIntoFrameDocument(FocusDirection, Node*);
 
     // Searches through the given tree scope, starting from start node, for the next/previous selectable element that comes after/before start node.
     // The order followed is as specified in section 17.11.1 of the HTML4 spec, which is elements with tab indexes
@@ -100,15 +101,15 @@
     // @return The focus node that comes after/before start node.
     //
     // See http://www.w3.org/TR/html4/interact/forms.html#h-17.11.1
-    inline Node* findFocusableNode(FocusDirection, FocusNavigationScope, Node* start, KeyboardEvent*);
+    inline Node* findFocusableNode(FocusDirection, FocusNavigationScope, Node* start);
 
-    Node* nextFocusableNode(FocusNavigationScope, Node* start, KeyboardEvent*);
-    Node* previousFocusableNode(FocusNavigationScope, Node* start, KeyboardEvent*);
+    Node* nextFocusableNode(FocusNavigationScope, Node* start);
+    Node* previousFocusableNode(FocusNavigationScope, Node* start);
 
-    Node* findNodeWithExactTabIndex(Node* start, int tabIndex, KeyboardEvent*, FocusDirection);
+    Node* findNodeWithExactTabIndex(Node* start, int tabIndex, FocusDirection);
 
-    bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusDirection, KeyboardEvent*);
-    void findFocusCandidateInContainer(Node* container, const LayoutRect& startingRect, FocusDirection, KeyboardEvent*, FocusCandidate& closest);
+    bool advanceFocusDirectionallyInContainer(Node* container, const LayoutRect& startingRect, FocusDirection);
+    void findFocusCandidateInContainer(Node* container, const LayoutRect& startingRect, FocusDirection, FocusCandidate& closest);
 
     Page* m_page;
     RefPtr<Frame> m_focusedFrame;
diff --git a/Source/core/page/Frame.cpp b/Source/core/page/Frame.cpp
index 0093b1d..ea914b5 100644
--- a/Source/core/page/Frame.cpp
+++ b/Source/core/page/Frame.cpp
@@ -269,15 +269,9 @@
     return resultSize;
 }
 
-void Frame::clearDOMWindow()
+void Frame::setDOMWindow(PassRefPtr<DOMWindow> domWindow)
 {
-    m_domWindow = 0;
-}
-
-void Frame::ensureDOMWindow()
-{
-    if (!m_domWindow)
-        m_domWindow = DOMWindow::create(this);
+    m_domWindow = domWindow;
 }
 
 Document* Frame::document() const
@@ -415,7 +409,7 @@
     RenderObject* renderer = node->renderer();
     if (!renderer)
         return VisiblePosition();
-    VisiblePosition visiblePos = renderer->positionForPoint(result.localPoint());
+    VisiblePosition visiblePos = VisiblePosition(renderer->positionForPoint(result.localPoint()));
     if (visiblePos.isNull())
         visiblePos = firstPositionInOrBeforeNode(node);
     return visiblePos;
diff --git a/Source/core/page/Frame.h b/Source/core/page/Frame.h
index 01fb45b..f744f1c 100644
--- a/Source/core/page/Frame.h
+++ b/Source/core/page/Frame.h
@@ -52,6 +52,7 @@
     class FrameDestructionObserver;
     class FrameSelection;
     class FrameView;
+    class HTMLFrameOwnerElement;
     class HTMLTableCellElement;
     class IntPoint;
     class Node;
@@ -63,6 +64,7 @@
     class Settings;
     class TreeScope;
     class VisiblePosition;
+    class Widget;
 
     class Frame : public RefCounted<Frame> {
     public:
@@ -86,9 +88,7 @@
         Page* page() const;
         HTMLFrameOwnerElement* ownerElement() const;
 
-        void clearDOMWindow();
-        void ensureDOMWindow();
-
+        void setDOMWindow(PassRefPtr<DOMWindow>);
         DOMWindow* domWindow() const;
         Document* document() const;
         FrameView* view() const;
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index 15389b0..ef01cfe 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -59,7 +59,6 @@
 #include "core/platform/graphics/FontCache.h"
 #include "core/platform/graphics/GraphicsContext.h"
 #include "core/platform/text/TextStream.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderEmbeddedObject.h"
 #include "core/rendering/RenderLayer.h"
 #include "core/rendering/RenderLayerBacking.h"
@@ -306,15 +305,6 @@
     setScrollbarsSuppressed(false);
 }
 
-void FrameView::resetScrollbarsAndClearContentsSize()
-{
-    resetScrollbars();
-
-    setScrollbarsSuppressed(true);
-    setContentsSize(IntSize());
-    setScrollbarsSuppressed(false);
-}
-
 void FrameView::init()
 {
     reset();
@@ -1099,6 +1089,12 @@
     if (m_nestedLayoutCount)
         return;
 
+#ifndef NDEBUG
+    // Post-layout assert that nobody was re-marked as needing layout during layout.
+    for (RenderObject* renderer = document->renderer(); renderer; renderer = renderer->nextInPreOrder())
+        ASSERT(!renderer->needsLayout());
+#endif
+
     // FIXME: It should be not possible to remove the FrameView from the frame/page during layout
     // however m_inLayout is not set for most of this function, so none of our RELEASE_ASSERTS
     // in Frame/Page will fire. One of the post-layout tasks is disconnecting the Frame from
@@ -2158,8 +2154,6 @@
 
     Vector<RenderObject*> objects;
     objects.reserveInitialCapacity(size);
-    // Protect RendereArena from getting wiped out, when Document is detached during updateWidget().
-    RefPtr<RenderArena> protectedArena = m_frame->document()->renderArena();
 
     RenderObjectSet::const_iterator end = m_widgetUpdateSet->end();
     for (RenderObjectSet::const_iterator it = m_widgetUpdateSet->begin(); it != end; ++it) {
@@ -2181,7 +2175,7 @@
         RenderObject* object = objects[i];
         if (object->isEmbeddedObject()) {
             RenderEmbeddedObject* embeddedObject = static_cast<RenderEmbeddedObject*>(object);
-            embeddedObject->deref(protectedArena.get());
+            embeddedObject->deref();
         }
     }
 
diff --git a/Source/core/page/FrameView.h b/Source/core/page/FrameView.h
index ff021cf..3ed2a41 100644
--- a/Source/core/page/FrameView.h
+++ b/Source/core/page/FrameView.h
@@ -127,7 +127,6 @@
     bool isSoftwareRenderable() const;
 
     void resetScrollbars();
-    void resetScrollbarsAndClearContentsSize();
     void prepareForDetach();
     void detachCustomScrollbars();
     virtual void recalculateScrollbarOverlayStyle();
diff --git a/Source/core/page/ImageBitmap.cpp b/Source/core/page/ImageBitmap.cpp
index fabe684..0d5d732 100644
--- a/Source/core/page/ImageBitmap.cpp
+++ b/Source/core/page/ImageBitmap.cpp
@@ -9,7 +9,6 @@
 #include "core/html/HTMLImageElement.h"
 #include "core/html/HTMLVideoElement.h"
 #include "core/html/ImageData.h"
-#include "core/page/ImageBitmapCallback.h"
 #include "core/platform/graphics/GraphicsContext.h"
 #include "wtf/RefPtr.h"
 
diff --git a/Source/core/page/ImageBitmap.h b/Source/core/page/ImageBitmap.h
index 8b8c01c..4a5833a 100644
--- a/Source/core/page/ImageBitmap.h
+++ b/Source/core/page/ImageBitmap.h
@@ -19,7 +19,6 @@
 class HTMLImageElement;
 class HTMLVideoElement;
 class ImageData;
-class ImageBitmapCallback;
 
 class ImageBitmap : public RefCounted<ImageBitmap>, public ScriptWrappable {
 
diff --git a/Source/core/page/ImageBitmapCallback.cpp b/Source/core/page/ImageBitmapCallback.cpp
deleted file mode 100644
index 56fd2a4..0000000
--- a/Source/core/page/ImageBitmapCallback.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "core/page/ImageBitmapCallback.h"
-
-namespace WebCore {
-
-ImageBitmapCallback::CallbackTask::CallbackTask(PassRefPtr<ImageBitmap> bitmap, PassRefPtr<ImageBitmapCallback> callback)
-    : m_bitmap(bitmap)
-    , m_callback(callback)
-{
-}
-
-void ImageBitmapCallback::CallbackTask::performTask(ScriptExecutionContext*)
-{
-    if (!m_callback || !m_bitmap) {
-        return;
-    }
-    m_callback->handleEvent(m_bitmap.get());
-}
-
-} // namespace Webcore
-
diff --git a/Source/core/page/ImageBitmapCallback.h b/Source/core/page/ImageBitmapCallback.h
deleted file mode 100644
index 5a6cc0f..0000000
--- a/Source/core/page/ImageBitmapCallback.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ImageBitmapCallback_h
-#define ImageBitmapCallback_h
-
-#include "core/dom/ScriptExecutionContext.h"
-#include "core/page/ImageBitmap.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/RefCounted.h"
-
-namespace WebCore {
-
-class ImageBitmap;
-
-class ImageBitmapCallback : public RefCounted<ImageBitmapCallback> {
-public:
-    virtual ~ImageBitmapCallback() { }
-    virtual bool handleEvent(ImageBitmap*) = 0;
-
-    class CallbackTask : public ScriptExecutionContext::Task {
-    public:
-        static PassOwnPtr<CallbackTask> create(PassRefPtr<ImageBitmap> bitmap, PassRefPtr<ImageBitmapCallback> callback)
-        {
-            return adoptPtr(new CallbackTask(bitmap, callback));
-        }
-
-        virtual void performTask(ScriptExecutionContext*);
-
-    private:
-        CallbackTask(PassRefPtr<ImageBitmap>, PassRefPtr<ImageBitmapCallback>);
-
-        RefPtr<ImageBitmap> m_bitmap;
-        RefPtr<ImageBitmapCallback> m_callback;
-    };
-};
-
-} // namespace Webcore
-
-#endif // ImageBitmapCallback_h
diff --git a/Source/core/page/ImageBitmapCallback.idl b/Source/core/page/ImageBitmapCallback.idl
deleted file mode 100644
index fb2ae4f..0000000
--- a/Source/core/page/ImageBitmapCallback.idl
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-callback interface ImageBitmapCallback {
-    boolean handleEvent(ImageBitmap bitmap);
-};
diff --git a/Source/core/page/ImageBitmapFactories.cpp b/Source/core/page/ImageBitmapFactories.cpp
new file mode 100644
index 0000000..bdd063d
--- /dev/null
+++ b/Source/core/page/ImageBitmapFactories.cpp
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2013, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/page/ImageBitmapFactories.h"
+
+#include "RuntimeEnabledFeatures.h"
+#include "V8ImageBitmap.h"
+#include "core/dom/ExceptionCode.h"
+#include "core/html/HTMLCanvasElement.h"
+#include "core/html/HTMLImageElement.h"
+#include "core/html/HTMLVideoElement.h"
+#include "core/html/ImageData.h"
+#include "core/html/canvas/CanvasRenderingContext2D.h"
+#include "core/page/DOMWindow.h"
+#include "core/page/ImageBitmap.h"
+
+namespace WebCore {
+
+namespace ImageBitmapFactories {
+
+static LayoutSize sizeFor(HTMLImageElement* image)
+{
+    if (CachedImage* cachedImage = image->cachedImage())
+        return cachedImage->imageSizeForRenderer(image->renderer(), 1.0f); // FIXME: Not sure about this.
+    return IntSize();
+}
+
+static IntSize sizeFor(HTMLVideoElement* video)
+{
+    if (MediaPlayer* player = video->player())
+        return player->naturalSize();
+    return IntSize();
+}
+
+static ScriptObject resolveImageBitmap(PassRefPtr<ImageBitmap> imageBitmap)
+{
+    // Promises must be enabled.
+    ASSERT(RuntimeEnabledFeatures::promiseEnabled());
+
+    RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create();
+    resolver->fulfill(imageBitmap);
+    return resolver->promise();
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, ExceptionCode& ec)
+{
+    LayoutSize s = sizeFor(image);
+    return createImageBitmap(eventTarget, image, 0, 0, s.width(), s.height(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLImageElement* image, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    if (!image) {
+        ec = TypeError;
+        return ScriptObject();
+    }
+    if (!image->cachedImage()) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (image->cachedImage()->image()->isSVGImage()) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (!sw || !sh) {
+        ec = IndexSizeError;
+        return ScriptObject();
+    }
+    if (!image->cachedImage()->image()->hasSingleSecurityOrigin()) {
+        ec = SecurityError;
+        return ScriptObject();
+    }
+    if (!image->cachedImage()->passesAccessControlCheck(eventTarget->toDOMWindow()->document()->securityOrigin())
+    && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(image->src())) {
+        ec = SecurityError;
+        return ScriptObject();
+    }
+    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+    return resolveImageBitmap(ImageBitmap::create(image, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, ExceptionCode& ec)
+{
+    IntSize s = sizeFor(video);
+    return createImageBitmap(eventTarget, video, 0, 0, s.width(), s.height(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLVideoElement* video, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    if (!video) {
+        ec = TypeError;
+        return ScriptObject();
+    }
+    if (!video->player()) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (video->networkState() == HTMLMediaElement::NETWORK_EMPTY) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (video->player()->readyState() <= MediaPlayer::HaveMetadata) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (!sw || !sh) {
+        ec = IndexSizeError;
+        return ScriptObject();
+    }
+    if (!video->hasSingleSecurityOrigin()) {
+        ec = SecurityError;
+        return ScriptObject();
+    }
+    if (!video->player()->didPassCORSAccessCheck() && eventTarget->toDOMWindow()->document()->securityOrigin()->taintsCanvas(video->currentSrc())) {
+        ec = SecurityError;
+        return ScriptObject();
+    }
+    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+    return resolveImageBitmap(ImageBitmap::create(video, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, ExceptionCode& ec)
+{
+    return createImageBitmap(eventTarget, context->canvas(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, CanvasRenderingContext2D* context, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    return createImageBitmap(eventTarget, context->canvas(), sx, sy, sw, sh, ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, ExceptionCode& ec)
+{
+    return createImageBitmap(eventTarget, canvas, 0, 0, canvas->width(), canvas->height(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, HTMLCanvasElement* canvas, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    if (!canvas) {
+        ec = TypeError;
+        return ScriptObject();
+    }
+    if (!canvas->originClean()) {
+        ec = InvalidStateError;
+        return ScriptObject();
+    }
+    if (!sw || !sh) {
+        ec = IndexSizeError;
+        return ScriptObject();
+    }
+    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+    return resolveImageBitmap(ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageData* data, ExceptionCode& ec)
+{
+    return createImageBitmap(eventTarget, data, 0, 0, data->width(), data->height(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageData* data, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    if (!data) {
+        ec = TypeError;
+        return ScriptObject();
+    }
+    if (!sw || !sh) {
+        ec = IndexSizeError;
+        return ScriptObject();
+    }
+    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+    return resolveImageBitmap(ImageBitmap::create(data, IntRect(sx, sy, sw, sh)));
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, ExceptionCode& ec)
+{
+    return createImageBitmap(eventTarget, bitmap, 0, 0, bitmap->width(), bitmap->height(), ec);
+}
+
+ScriptObject createImageBitmap(EventTarget* eventTarget, ImageBitmap* bitmap, int sx, int sy, int sw, int sh, ExceptionCode& ec)
+{
+    if (!bitmap) {
+        ec = TypeError;
+        return ScriptObject();
+    }
+    if (!sw || !sh) {
+        ec = IndexSizeError;
+        return ScriptObject();
+    }
+    // FIXME: make ImageBitmap creation asynchronous crbug.com/258082
+    return resolveImageBitmap(ImageBitmap::create(bitmap, IntRect(sx, sy, sw, sh)));
+}
+
+} // namespace ImageBitmapFactories
+} // namespace WebCore
diff --git a/Source/core/page/ImageBitmapFactories.h b/Source/core/page/ImageBitmapFactories.h
new file mode 100644
index 0000000..aa8ec49
--- /dev/null
+++ b/Source/core/page/ImageBitmapFactories.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2013, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ImageBitmapFactories_h
+#define ImageBitmapFactories_h
+
+#include "bindings/v8/ScriptPromiseResolver.h"
+
+namespace WebCore {
+
+class CanvasRenderingContext2D;
+class EventTarget;
+class HTMLCanvasElement;
+class HTMLImageElement;
+class HTMLVideoElement;
+class ImageBitmap;
+class ImageData;
+
+namespace ImageBitmapFactories {
+
+typedef int ExceptionCode;
+
+ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, HTMLImageElement*, int sx, int sy, int sw, int sh, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, HTMLVideoElement*, int sx, int sy, int sw, int sh, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, CanvasRenderingContext2D*, int sx, int sy, int sw, int sh, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, HTMLCanvasElement*, int sx, int sy, int sw, int sh, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, ImageData*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, ImageData*, int sx, int sy, int sw, int sh, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, ExceptionCode&);
+ScriptObject createImageBitmap(EventTarget*, ImageBitmap*, int sx, int sy, int sw, int sh, ExceptionCode&);
+
+} // namesapce ImageBitmapFactories
+} // namespace WebCore
+
+#endif // ImageBitmapFactories_h
diff --git a/Source/core/page/ImageBitmapFactories.idl b/Source/core/page/ImageBitmapFactories.idl
new file mode 100644
index 0000000..65c0dc6
--- /dev/null
+++ b/Source/core/page/ImageBitmapFactories.idl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2013, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    NoInterfaceObject,
+    EnabledAtRuntime=experimentalCanvasFeatures
+] interface ImageBitmapFactories {
+    // FIXME: these methods should return |Promise|. http://crbug.com/266700
+    [RaisesException] any createImageBitmap(HTMLImageElement image);
+    [RaisesException] any createImageBitmap(HTMLImageElement image, long sx, long sy, long sw, long sh);
+    [RaisesException] any createImageBitmap(HTMLVideoElement video);
+    [RaisesException] any createImageBitmap(HTMLVideoElement video, long sx, long sy, long sw, long sh);
+    [RaisesException] any createImageBitmap(CanvasRenderingContext2D context);
+    [RaisesException] any createImageBitmap(CanvasRenderingContext2D context, long sx, long sy, long sw, long sh);
+    [RaisesException] any createImageBitmap(HTMLCanvasElement canvas);
+    [RaisesException] any createImageBitmap(HTMLCanvasElement canvas, long sx, long sy, long sw, long sh);
+    [RaisesException] any createImageBitmap(ImageData data);
+    [RaisesException] any createImageBitmap(ImageData data, long sx, long sy, long sw, long sh);
+    [RaisesException] any createImageBitmap(ImageBitmap bitmap);
+    [RaisesException] any createImageBitmap(ImageBitmap bitmap, long sx, long sy, long sw, long sh);
+};
\ No newline at end of file
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index a156d3d..df437b6 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -50,7 +50,6 @@
 #include "core/page/scrolling/ScrollingCoordinator.h"
 #include "core/platform/network/NetworkStateNotifier.h"
 #include "core/plugins/PluginData.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderTheme.h"
 #include "core/rendering/RenderView.h"
 #include "core/storage/StorageNamespace.h"
@@ -164,20 +163,6 @@
 #endif
 }
 
-ArenaSize Page::renderTreeSize() const
-{
-    ArenaSize total(0, 0);
-    for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) {
-        if (!frame->document())
-            continue;
-        if (RenderArena* arena = frame->document()->renderArena()) {
-            total.treeSize += arena->totalRenderArenaSize();
-            total.allocated += arena->totalRenderArenaAllocatedBytes();
-        }
-    }
-    return total;
-}
-
 ViewportArguments Page::viewportArguments() const
 {
     return mainFrame() && mainFrame()->document() ? mainFrame()->document()->viewportArguments() : ViewportArguments();
diff --git a/Source/core/page/Page.h b/Source/core/page/Page.h
index 870ff64..0edf04d 100644
--- a/Source/core/page/Page.h
+++ b/Source/core/page/Page.h
@@ -80,16 +80,6 @@
 
 float deviceScaleFactor(Frame*);
 
-struct ArenaSize {
-    ArenaSize(size_t treeSize, size_t allocated)
-        : treeSize(treeSize)
-        , allocated(allocated)
-    {
-    }
-    size_t treeSize;
-    size_t allocated;
-};
-
 class Page : public Supplementable<Page>, public LifecycleContext {
     WTF_MAKE_NONCOPYABLE(Page);
     friend class Settings;
@@ -114,8 +104,6 @@
     explicit Page(PageClients&);
     ~Page();
 
-    ArenaSize renderTreeSize() const;
-
     void setNeedsRecalcStyleInAllFrames();
 
     RenderTheme* theme() const { return m_theme.get(); }
diff --git a/Source/core/page/RuntimeCSSEnabled.cpp b/Source/core/page/RuntimeCSSEnabled.cpp
index 49b443e..7259c13 100644
--- a/Source/core/page/RuntimeCSSEnabled.cpp
+++ b/Source/core/page/RuntimeCSSEnabled.cpp
@@ -43,7 +43,7 @@
         RuntimeCSSEnabled::setCSSPropertyEnabled(properties[i], featureFlag);
 }
 
-static void setPropertySwitchesFromRuntimeFeatures(BoolVector& properties)
+static void setPropertySwitchesFromRuntimeFeatures()
 {
     CSSPropertyID regionProperites[] = {
         CSSPropertyWebkitFlowInto,
@@ -92,6 +92,7 @@
     RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyBackgroundBlendMode, RuntimeEnabledFeatures::cssCompositingEnabled());
     RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyMixBlendMode, RuntimeEnabledFeatures::cssCompositingEnabled());
     RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyTouchAction, RuntimeEnabledFeatures::cssTouchActionEnabled());
+    RuntimeCSSEnabled::setCSSPropertyEnabled(CSSPropertyVariable, RuntimeEnabledFeatures::cssVariablesEnabled());
 }
 
 static BoolVector& propertySwitches()
@@ -99,17 +100,18 @@
     static BoolVector* switches = 0;
     if (!switches) {
         switches = new BoolVector;
-        switches->fill(true, numCSSProperties);
-        setPropertySwitchesFromRuntimeFeatures(*switches);
+        // Accomodate CSSPropertyIDs that fall outside the firstCSSProperty, lastCSSProperty range (eg. CSSPropertyVariable).
+        switches->fill(true, lastCSSProperty + 1);
+        setPropertySwitchesFromRuntimeFeatures();
     }
     return *switches;
 }
 
 size_t indexForProperty(CSSPropertyID propertyId)
 {
-    RELEASE_ASSERT(propertyId >= firstCSSProperty && propertyId <= lastCSSProperty);
-    // Values all start at 0.  Vector RELEASE_ASSERTS will catch if we're ever wrong.
-    return static_cast<size_t>(propertyId - firstCSSProperty);
+    RELEASE_ASSERT(propertyId >= 0 && propertyId <= lastCSSProperty);
+    ASSERT(propertyId != CSSPropertyInvalid);
+    return static_cast<size_t>(propertyId);
 }
 
 bool RuntimeCSSEnabled::isCSSPropertyEnabled(CSSPropertyID propertyId)
diff --git a/Source/core/page/RuntimeEnabledFeatures.in b/Source/core/page/RuntimeEnabledFeatures.in
index 446d9db..d5abc7b 100644
--- a/Source/core/page/RuntimeEnabledFeatures.in
+++ b/Source/core/page/RuntimeEnabledFeatures.in
@@ -34,6 +34,7 @@
 DeviceOrientation status=stable
 DialogElement status=experimental
 DirectoryUpload status=stable
+EncodingAPI status=experimental
 EncryptedMedia status=experimental
 EncryptedMediaAnyVersion status=stable
 ExperimentalCanvasFeatures status=test
@@ -78,7 +79,7 @@
 Stream status=experimental
 StyleScoped status=experimental
 Touch status=stable
-Vibration status=test
+Vibration status=experimental
 VideoTrack status=stable
 WebAnimations
 WebAnimationsCSS depends_on=WebAnimations
diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp
index 64ff00a..cb014f9 100644
--- a/Source/core/page/SpatialNavigation.cpp
+++ b/Source/core/page/SpatialNavigation.cpp
@@ -305,18 +305,18 @@
     // and we do not adjust for scrolling.
     switch (direction) {
     case FocusDirectionLeft:
-        containerViewportRect.setX(containerViewportRect.x() - Scrollbar::pixelsPerLineStep());
-        containerViewportRect.setWidth(containerViewportRect.width() + Scrollbar::pixelsPerLineStep());
+        containerViewportRect.setX(containerViewportRect.x() - ScrollableArea::pixelsPerLineStep());
+        containerViewportRect.setWidth(containerViewportRect.width() + ScrollableArea::pixelsPerLineStep());
         break;
     case FocusDirectionRight:
-        containerViewportRect.setWidth(containerViewportRect.width() + Scrollbar::pixelsPerLineStep());
+        containerViewportRect.setWidth(containerViewportRect.width() + ScrollableArea::pixelsPerLineStep());
         break;
     case FocusDirectionUp:
-        containerViewportRect.setY(containerViewportRect.y() - Scrollbar::pixelsPerLineStep());
-        containerViewportRect.setHeight(containerViewportRect.height() + Scrollbar::pixelsPerLineStep());
+        containerViewportRect.setY(containerViewportRect.y() - ScrollableArea::pixelsPerLineStep());
+        containerViewportRect.setHeight(containerViewportRect.height() + ScrollableArea::pixelsPerLineStep());
         break;
     case FocusDirectionDown:
-        containerViewportRect.setHeight(containerViewportRect.height() + Scrollbar::pixelsPerLineStep());
+        containerViewportRect.setHeight(containerViewportRect.height() + ScrollableArea::pixelsPerLineStep());
         break;
     default:
         break;
@@ -342,16 +342,16 @@
         LayoutUnit dy = 0;
         switch (direction) {
         case FocusDirectionLeft:
-            dx = - Scrollbar::pixelsPerLineStep();
+            dx = - ScrollableArea::pixelsPerLineStep();
             break;
         case FocusDirectionRight:
-            dx = Scrollbar::pixelsPerLineStep();
+            dx = ScrollableArea::pixelsPerLineStep();
             break;
         case FocusDirectionUp:
-            dy = - Scrollbar::pixelsPerLineStep();
+            dy = - ScrollableArea::pixelsPerLineStep();
             break;
         case FocusDirectionDown:
-            dy = Scrollbar::pixelsPerLineStep();
+            dy = ScrollableArea::pixelsPerLineStep();
             break;
         default:
             ASSERT_NOT_REACHED();
@@ -378,18 +378,18 @@
         LayoutUnit dy = 0;
         switch (direction) {
         case FocusDirectionLeft:
-            dx = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollLeft());
+            dx = - min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollLeft());
             break;
         case FocusDirectionRight:
             ASSERT(container->renderBox()->scrollWidth() > (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
-            dx = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
+            dx = min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
             break;
         case FocusDirectionUp:
-            dy = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollTop());
+            dy = - min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollTop());
             break;
         case FocusDirectionDown:
             ASSERT(container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
-            dy = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
+            dy = min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
             break;
         default:
             ASSERT_NOT_REACHED();
diff --git a/Source/core/page/TouchAdjustment.cpp b/Source/core/page/TouchAdjustment.cpp
index 74c7f20..ad93cea 100644
--- a/Source/core/page/TouchAdjustment.cpp
+++ b/Source/core/page/TouchAdjustment.cpp
@@ -69,13 +69,13 @@
 // Takes non-const Node* because isContentEditable is a non-const function.
 bool nodeRespondsToTapGesture(Node* node)
 {
-    if (node->isMouseFocusable())
-        return true;
     if (node->willRespondToMouseClickEvents() || node->willRespondToMouseMoveEvents())
         return true;
-    // Accept nodes that has a CSS effect when touched.
     if (node->isElementNode()) {
         Element* element = toElement(node);
+        if (element->isMouseFocusable())
+            return true;
+        // Accept nodes that has a CSS effect when touched.
         if (element->childrenAffectedByActive() || element->childrenAffectedByHover())
             return true;
     }
diff --git a/Source/core/page/UseCounter.cpp b/Source/core/page/UseCounter.cpp
index 0d3eeb4..7179c29 100644
--- a/Source/core/page/UseCounter.cpp
+++ b/Source/core/page/UseCounter.cpp
@@ -306,10 +306,6 @@
     case CSSPropertyGridAutoFlow: return 250;
     case CSSPropertyWebkitHighlight: return 251;
     case CSSPropertyWebkitHyphenateCharacter: return 252;
-    case CSSPropertyWebkitHyphenateLimitAfter: return 253;
-    case CSSPropertyWebkitHyphenateLimitBefore: return 254;
-    case CSSPropertyWebkitHyphenateLimitLines: return 255;
-    case CSSPropertyWebkitHyphens: return 256;
     case CSSPropertyWebkitLineBoxContain: return 257;
     case CSSPropertyWebkitLineAlign: return 258;
     case CSSPropertyWebkitLineBreak: return 259;
@@ -488,6 +484,7 @@
     case CSSPropertyMixBlendMode: return 420;
     case CSSPropertyTouchAction: return 421;
     case CSSPropertyGridArea: return 422;
+    case CSSPropertyGridTemplate: return 423;
 
     // Add new features above this line (don't change the assigned numbers of the existing
     // items) and update maximumCSSSampleId() with the new maximum value.
@@ -502,7 +499,7 @@
     return 0;
 }
 
-static int maximumCSSSampleId() { return 422; }
+static int maximumCSSSampleId() { return 423; }
 
 UseCounter::UseCounter()
 {
@@ -644,6 +641,16 @@
     case CaptureAttributeAsEnum:
         return "Using the 'capture' attribute as an enum is deprecated. Please use it as a boolean and specify the media types that should be accepted in the 'accept' attribute.";
 
+    // Keyboard Event (DOM Level 3)
+    case KeyboardEventKeyLocation:
+        return "'KeyboardEvent.keyLocation'' is deprecated. Please use 'KeyboardEvent.location' instead.";
+
+    case CaptureEvents:
+        return "captureEvents() is deprecated. This method doesn't do anything.";
+
+    case ReleaseEvents:
+        return "releaseEvents() is deprecated. This method doesn't do anything.";
+
     // Features that aren't deprecated don't have a deprecation message.
     default:
         return String();
diff --git a/Source/core/page/UseCounter.h b/Source/core/page/UseCounter.h
index 5b17024..7b9b9ab 100644
--- a/Source/core/page/UseCounter.h
+++ b/Source/core/page/UseCounter.h
@@ -70,7 +70,7 @@
         PrefixedContentSecurityPolicy,
         UnprefixedIndexedDB,
         OpenWebDatabase,
-        LegacyHTMLNotifications,
+        UnusedSlot01, // Prior to 7/2013, we used this slot for LegacyHTMLNotifications.
         LegacyTextNotifications,
         UnprefixedRequestAnimationFrame,
         PrefixedRequestAnimationFrame,
@@ -81,7 +81,7 @@
         UnprefixedTransitionEndEvent,
         PrefixedAndUnprefixedTransitionEndEvent,
         AutoFocusAttribute,
-        UnusedSlot01, // Prior to 4/2013, we used this slot for AutoSaveAttribute.
+        UnusedSlot02, // Prior to 4/2013, we used this slot for AutoSaveAttribute.
         DataListElement,
         FormAttribute,
         IncrementalAttribute,
@@ -113,7 +113,7 @@
         StepAttribute,
         PageVisits,
         HTMLMarqueeElement,
-        UnusedSlot02, // Removed, was tracking overflow: -webkit-marquee.
+        UnusedSlot03, // Removed, was tracking overflow: -webkit-marquee.
         Reflection,
         CursorVisibility, // Removed, was -webkit-cursor-visibility.
         StorageInfo,
@@ -150,6 +150,12 @@
         ShadowDOMPrefixedCreateShadowRoot,
         ShadowDOMPrefixedShadowRoot,
         SVGAnimationElement,
+        KeyboardEventKeyLocation,
+        CaptureEvents,
+        ReleaseEvents,
+        CSSDisplayRunIn,
+        CSSDisplayCompact,
+        LineClamp,
         // Add new features immediately above this line. Don't change assigned
         // numbers of each items, and don't reuse unused slots.
         NumberOfFeatures, // This enum value must be last.
diff --git a/Source/core/page/Window.idl b/Source/core/page/Window.idl
index f15f3e4..8d49866 100644
--- a/Source/core/page/Window.idl
+++ b/Source/core/page/Window.idl
@@ -160,20 +160,6 @@
 
     [Replaceable] readonly attribute Performance performance;
 
-    // Images
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLImageElement image, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLImageElement image, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLVideoElement video, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLVideoElement video, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(CanvasRenderingContext2D context, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(CanvasRenderingContext2D context, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLCanvasElement canvas, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(HTMLCanvasElement canvas, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(ImageData data, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(ImageData data, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(ImageBitmap bitmap, ImageBitmapCallback callback);
-    [EnabledAtRuntime=experimentalCanvasFeatures, RaisesException] void createImageBitmap(ImageBitmap bitmap, ImageBitmapCallback callback, long sx, long sy, long sw, long sh);
-
     [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(RequestAnimationFrameCallback callback);
     void cancelAnimationFrame(long id);
     [MeasureAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame(RequestAnimationFrameCallback callback);
@@ -272,6 +258,9 @@
     [EnabledAtRuntime=deviceMotion] attribute EventListener ondevicemotion;
     [EnabledAtRuntime=deviceOrientation] attribute EventListener ondeviceorientation;
 
+    [DeprecateAs=CaptureEvents] void captureEvents();
+    [DeprecateAs=ReleaseEvents] void releaseEvents();
+
     // Additional constructors.
     attribute TransitionEventConstructor WebKitTransitionEvent;
     [CustomConstructor] attribute HTMLImageElementConstructorConstructor Image; // Usable with new operator
@@ -310,5 +299,6 @@
     [Custom, NotEnumerable] getter Window (DOMString name);
 };
 
+Window implements ImageBitmapFactories;
 Window implements WindowTimers;
 Window implements WindowBase64;
diff --git a/Source/core/page/animation/AnimationController.cpp b/Source/core/page/animation/AnimationController.cpp
index 97506b1..9c8ecef 100644
--- a/Source/core/page/animation/AnimationController.cpp
+++ b/Source/core/page/animation/AnimationController.cpp
@@ -262,6 +262,19 @@
     return animation->isAnimatingProperty(property, false, isRunningNow);
 }
 
+bool AnimationControllerPrivate::isRunningAcceleratableAnimationOnRenderer(RenderObject *renderer) const
+{
+    RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
+    if (!animation)
+        return false;
+
+    bool acceleratedOnly = false;
+    bool isRunningNow = true;
+    return animation->isAnimatingProperty(CSSPropertyOpacity, acceleratedOnly, isRunningNow)
+        || animation->isAnimatingProperty(CSSPropertyWebkitTransform, acceleratedOnly, isRunningNow)
+        || animation->isAnimatingProperty(CSSPropertyWebkitFilter, acceleratedOnly, isRunningNow);
+}
+
 bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
 {
     RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
@@ -543,6 +556,11 @@
     return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow);
 }
 
+bool AnimationController::isRunningAcceleratableAnimationOnRenderer(RenderObject* renderer) const
+{
+    return m_data->isRunningAcceleratableAnimationOnRenderer(renderer);
+}
+
 bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
 {
     return m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, isRunningNow);
diff --git a/Source/core/page/animation/AnimationController.h b/Source/core/page/animation/AnimationController.h
index 973f171..fb9046f 100644
--- a/Source/core/page/animation/AnimationController.h
+++ b/Source/core/page/animation/AnimationController.h
@@ -60,6 +60,7 @@
     unsigned numberOfActiveAnimations(Document*) const; // To be used only for testing
 
     bool isRunningAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow = true) const;
+    bool isRunningAcceleratableAnimationOnRenderer(RenderObject*) const;
     bool isRunningAcceleratedAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow = true) const;
 
     void suspendAnimations();
diff --git a/Source/core/page/animation/AnimationControllerPrivate.h b/Source/core/page/animation/AnimationControllerPrivate.h
index a97ad75..5a603fc 100644
--- a/Source/core/page/animation/AnimationControllerPrivate.h
+++ b/Source/core/page/animation/AnimationControllerPrivate.h
@@ -82,6 +82,7 @@
     void resumeAnimationsForDocument(Document*);
 
     bool isRunningAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
+    bool isRunningAcceleratableAnimationOnRenderer(RenderObject*) const;
     bool isRunningAcceleratedAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
 
     void pauseAnimationsForTesting(double t);
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 209b6b3..6d24bf2 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -44,6 +44,9 @@
 #include "core/platform/graphics/IntRect.h"
 #include "core/platform/graphics/Region.h"
 #include "core/platform/graphics/transforms/TransformState.h"
+#if OS(DARWIN)
+#include "core/platform/mac/ScrollAnimatorMac.h"
+#endif
 #include "core/plugins/PluginView.h"
 #include "core/rendering/RenderLayerBacking.h"
 #include "core/rendering/RenderLayerCompositor.h"
@@ -243,7 +246,7 @@
 {
 // FIXME: Instead of hardcode here, we should make a setting flag.
 #if OS(DARWIN)
-    static const bool platformSupportsCoordinatedScrollbar = false;
+    static const bool platformSupportsCoordinatedScrollbar = ScrollAnimatorMac::canUseCoordinatedScrollbar();
     static const bool platformSupportsMainFrameOnly = false; // Don't care.
 #elif OS(ANDROID)
     static const bool platformSupportsCoordinatedScrollbar = true;
@@ -313,6 +316,8 @@
 
 static void convertLayerRectsToEnclosingCompositedLayer(const LayerHitTestRects& layerRects, LayerHitTestRects& compositorRects)
 {
+    TRACE_EVENT0("input", "ScrollingCoordinator::convertLayerRectsToEnclosingCompositedLayer");
+
     // We have a set of rects per RenderLayer, we need to map them to their bounding boxes in their
     // enclosing composited layer.
     for (LayerHitTestRects::const_iterator layerIter = layerRects.begin(); layerIter != layerRects.end(); ++layerIter) {
@@ -339,10 +344,9 @@
             compIter = compositorRects.add(compositedLayer, Vector<LayoutRect>()).iterator;
 
         // Transform each rect to the co-ordinate space of it's enclosing composited layer.
-        // Ideally we'd compute a transformation matrix once and re-use it for each rect, but
-        // there doesn't appear to be any easy way to do it (mapLocalToContainer will flatten
-        // the TransformState, so we can't use setQuad/mappedQuad over and over again). Perhaps
-        // RenderGeometryMap?
+        // Ideally we'd compute a transformation matrix once and re-use it for each rect.
+        // RenderGeometryMap can be used for this (but needs to be updated to support crossing
+        // iframe boundaries), but in practice doesn't appear to provide much performance benefit.
         for (size_t i = 0; i < layerIter->value.size(); ++i) {
             FloatQuad localQuad(layerIter->value[i]);
             TransformState transformState(TransformState::ApplyTransformDirection, localQuad);
diff --git a/Source/core/platform/Arena.cpp b/Source/core/platform/Arena.cpp
deleted file mode 100644
index 26b6275..0000000
--- a/Source/core/platform/Arena.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 1998-2000 Netscape Communications Corporation.
- * Copyright (C) 2003-6 Apple Computer
- *
- * Other contributors:
- *   Nick Blievers <nickb@adacel.com.au>
- *   Jeff Hostetler <jeff@nerdone.com>
- *   Tom Rini <trini@kernel.crashing.org>
- *   Raffaele Sena <raff@netwinder.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Alternatively, the contents of this file may be used under the terms
- * of either the Mozilla Public License Version 1.1, found at
- * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
- * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
- * (the "GPL"), in which case the provisions of the MPL or the GPL are
- * applicable instead of those above.  If you wish to allow use of your
- * version of this file only under the terms of one of those two
- * licenses (the MPL or the GPL) and not to allow others to use your
- * version of this file under the LGPL, indicate your decision by
- * deletingthe provisions above and replace them with the notice and
- * other provisions required by the MPL or the GPL, as the case may be.
- * If you do not delete the provisions above, a recipient may use your
- * version of this file under any of the LGPL, the MPL or the GPL.
- */
-
-/*
- * Lifetime-based fast allocation, inspired by much prior art, including
- * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes"
- * David R. Hanson, Software -- Practice and Experience, Vol. 20(1).
- */
-
-#include "config.h"
-#include "core/platform/Arena.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <algorithm>
-#include "wtf/Assertions.h"
-#include "wtf/FastMalloc.h"
-
-using namespace std;
-
-namespace WebCore {
-
-#ifdef DEBUG_ARENA_MALLOC
-static int i = 0;
-#endif
-
-#define ARENA_DEFAULT_ALIGN sizeof(double)
-#define BIT(n) ((unsigned int)1 << (n))
-#define BITMASK(n) (BIT(n) - 1)
-#define CEILING_LOG2(_log2, _n)   \
-    unsigned int j_ = (unsigned int)(_n);   \
-    (_log2) = 0;                    \
-    if ((j_) & ((j_)-1))            \
-        (_log2) += 1;               \
-    if ((j_) >> 16)                 \
-        (_log2) += 16, (j_) >>= 16; \
-    if ((j_) >> 8)                  \
-        (_log2) += 8, (j_) >>= 8;   \
-    if ((j_) >> 4)                  \
-        (_log2) += 4, (j_) >>= 4;   \
-    if ((j_) >> 2)                  \
-        (_log2) += 2, (j_) >>= 2;   \
-    if ((j_) >> 1)                  \
-        (_log2) += 1;
-#define FREE_PATTERN 0xDA
-
-static int CeilingLog2(unsigned int i) {
-    int log2;
-    CEILING_LOG2(log2, i);
-    return log2;
-}
-
-void InitArenaPool(ArenaPool* pool, const char*, unsigned size, unsigned align)
-{
-     if (align == 0)
-         align = ARENA_DEFAULT_ALIGN;
-     pool->mask = BITMASK(CeilingLog2(align));
-     pool->first.next = NULL;
-     pool->first.base = pool->first.avail = pool->first.limit = (uword)ARENA_ALIGN(&pool->first + 1);
-     pool->current = &pool->first;
-     pool->arenasize = size;
-}
-
-void* ArenaAllocate(ArenaPool* pool, unsigned int numBytes, unsigned int& bytesAllocated)
-{
-    Arena* arena;
-    char* returnPointer;
-
-    ASSERT((numBytes & pool->mask) == 0);
-
-    numBytes = (uword)ARENA_ALIGN(numBytes);
-
-    // attempt to allocate from arenas at pool->current
-    {
-        arena = pool->current;
-        do {
-            if (arena->avail + numBytes <= arena->limit)  {
-                pool->current = arena;
-                returnPointer = (char *)arena->avail;
-                arena->avail += numBytes;
-                return returnPointer;
-            }
-        } while (NULL != (arena = arena->next));
-    }
-
-    // attempt to allocate from the heap
-    {
-        unsigned int size = max(pool->arenasize, numBytes);
-        size += sizeof *arena + pool->mask;  /* header and alignment slop */
-#ifdef DEBUG_ARENA_MALLOC
-        i++;
-        printf("Malloc: %d\n", i);
-#endif
-        bytesAllocated = size;
-        arena = (Arena*)fastMalloc(size);
-        // fastMalloc will abort() if it fails, so we are guaranteed that a is not 0.
-        arena->limit = (uword)arena + size;
-        arena->base = arena->avail = (uword)ARENA_ALIGN(arena + 1);
-        returnPointer = (char *)arena->avail;
-        arena->avail += numBytes;
-        // the newly allocated arena is linked after pool->current and becomes pool->current.
-        arena->next = pool->current->next;
-        pool->current->next = arena;
-        pool->current = arena;
-        if (!pool->first.next)
-            pool->first.next = arena;
-        return(returnPointer);
-    }
-}
-
-// Free tail arenas linked after head, which may not be the true list head.
-// Reset pool->current to point to head in case it pointed at a tail arena.
-static void FreeArenaList(ArenaPool* pool, Arena* head)
-{
-    Arena** arenaPointer = &head->next;
-    Arena* arena = *arenaPointer;
-    if (!arena)
-        return;
-
-#ifdef DEBUG
-    do {
-        ASSERT(arena->base <= arena->avail && arena->avail <= arena->limit);
-        arena->avail = arena->base;
-        memset((void*)(arena)->avail, FREE_PATTERN, (arena)->limit - (arena)->avail)
-    } while ((arena = arena->next) != 0);
-    arena = *arenaPointer;
-#endif
-
-    do {
-        *arenaPointer = arena->next;
-
-#ifdef DEBUG
-        memset((void*)(arena), FREE_PATTERN, (arena)->limit - (uword)(arena));
-#endif
-
-#ifdef DEBUG_ARENA_MALLOC
-        i--;
-        printf("Free: %d\n", i);
-#endif
-
-        fastFree(arena);
-        arena = 0;
-    } while ((arena = *arenaPointer) != 0);
-    pool->current = head;
-}
-
-void FinishArenaPool(ArenaPool* pool)
-{
-    FreeArenaList(pool, &pool->first);
-}
-
-}
diff --git a/Source/core/platform/Arena.h b/Source/core/platform/Arena.h
deleted file mode 100644
index c1185e4..0000000
--- a/Source/core/platform/Arena.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 1998-2000 Netscape Communications Corporation.
- * Copyright (C) 2003-6 Apple Computer
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- *
- * Other contributors:
- *   Nick Blievers <nickb@adacel.com.au>
- *   Jeff Hostetler <jeff@nerdone.com>
- *   Tom Rini <trini@kernel.crashing.org>
- *   Raffaele Sena <raff@netwinder.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Alternatively, the contents of this file may be used under the terms
- * of either the Mozilla Public License Version 1.1, found at
- * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
- * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
- * (the "GPL"), in which case the provisions of the MPL or the GPL are
- * applicable instead of those above.  If you wish to allow use of your
- * version of this file only under the terms of one of those two
- * licenses (the MPL or the GPL) and not to allow others to use your
- * version of this file under the LGPL, indicate your decision by
- * deletingthe provisions above and replace them with the notice and
- * other provisions required by the MPL or the GPL, as the case may be.
- * If you do not delete the provisions above, a recipient may use your
- * version of this file under any of the LGPL, the MPL or the GPL.
- */
-
-#ifndef Arena_h
-#define Arena_h
-
-// FIXME: We'd always like to use AllocAlignmentInteger for Arena alignment
-// but there is concern over the memory growth this may cause.
-#ifdef WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER
-#define ARENA_ALIGN_MASK (sizeof(WTF::AllocAlignmentInteger) - 1)
-#else
-#define ARENA_ALIGN_MASK 3
-#endif
-
-namespace WebCore {
-
-typedef uintptr_t uword;
-
-struct Arena {
-    Arena* next;        // next arena
-    uword base;         // aligned base address
-    uword limit;        // end of arena (1+last byte)
-    uword avail;        // points to next available byte in arena
-};
-
-struct ArenaPool {
-    Arena first;        // first arena in pool list.
-    Arena* current;     // current arena.
-    unsigned int arenasize;
-    uword mask;         // Mask (power-of-2 - 1)
-};
-
-void InitArenaPool(ArenaPool*, const char* name, unsigned int size, unsigned int align);
-void FinishArenaPool(ArenaPool*);
-void* ArenaAllocate(ArenaPool*, unsigned int numBytes, unsigned int& bytesAllocated);
-
-#define ARENA_ALIGN(n) (((uword)(n) + ARENA_ALIGN_MASK) & ~ARENA_ALIGN_MASK)
-#define INIT_ARENA_POOL(pool, name, size) InitArenaPool(pool, name, size, ARENA_ALIGN_MASK + 1)
-#define ARENA_ALLOCATE(p, pool, nb, bytesAllocated) \
-    Arena* _a = (pool)->current; \
-    unsigned int _nb = ARENA_ALIGN(nb); \
-    uword _p = _a->avail; \
-    uword _q = _p + _nb; \
-    if (_q > _a->limit) \
-        _p = (uword)ArenaAllocate(pool, _nb, *bytesAllocated); \
-    else \
-        _a->avail = _q; \
-    p = (void*)_p;
-
-}
-
-#endif
diff --git a/Source/core/platform/EventTracer.h b/Source/core/platform/EventTracer.h
index e284802..d1a1b0d 100644
--- a/Source/core/platform/EventTracer.h
+++ b/Source/core/platform/EventTracer.h
@@ -31,6 +31,10 @@
 #ifndef EventTracer_h
 #define EventTracer_h
 
+// This will mark the trace event as disabled by default. The user will need
+// to explicitly enable the event.
+#define TRACE_DISABLED_BY_DEFAULT(name) "disabled-by-default-" name
+
 namespace WebCore {
 
 // FIXME: Make these global variables thread-safe. Make a value update atomic.
diff --git a/Source/core/platform/FileSystem.h b/Source/core/platform/FileSystem.h
index 41812c2..fc3c71f 100644
--- a/Source/core/platform/FileSystem.h
+++ b/Source/core/platform/FileSystem.h
@@ -38,16 +38,11 @@
 
 namespace WebCore {
 
-// PlatformFileHandle
 #if OS(WINDOWS)
 typedef void *HANDLE;
 typedef HANDLE PlatformFileHandle;
-// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
-// avoid using Windows headers in headers.  We'd rather move this into the .cpp.
-const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1);
 #else
 typedef int PlatformFileHandle;
-const PlatformFileHandle invalidPlatformFileHandle = -1;
 #endif
 
 enum FileOpenMode {
@@ -55,43 +50,20 @@
     OpenForWrite
 };
 
-enum FileSeekOrigin {
-    SeekFromBeginning = 0,
-    SeekFromCurrent,
-    SeekFromEnd
-};
-
-#if OS(WINDOWS)
-static const char PlatformFilePathSeparator = '\\';
-#else
-static const char PlatformFilePathSeparator = '/';
-#endif
-
 struct FileMetadata;
 
-bool fileExists(const String&);
-bool deleteFile(const String&);
-bool deleteEmptyDirectory(const String&);
 bool getFileSize(const String&, long long& result);
 bool getFileModificationTime(const String&, time_t& result);
 bool getFileMetadata(const String&, FileMetadata&);
-String pathByAppendingComponent(const String& path, const String& component);
-bool makeAllDirectories(const String& path);
 String pathGetFileName(const String&);
 String directoryName(const String&);
 
-inline bool isHandleValid(const PlatformFileHandle& handle) { return handle != invalidPlatformFileHandle; }
-
 inline double invalidFileTime() { return std::numeric_limits<double>::quiet_NaN(); }
 inline bool isValidFileTime(double time) { return std::isfinite(time); }
 
+// FIXME: Only used by test code, move them into WebUnitTestSupport.
 PlatformFileHandle openFile(const String& path, FileOpenMode);
 void closeFile(PlatformFileHandle&);
-// Returns the resulting offset from the beginning of the file if successful, -1 otherwise.
-long long seekFile(PlatformFileHandle, long long offset, FileSeekOrigin);
-bool truncateFile(PlatformFileHandle, long long offset);
-// Returns number of bytes actually read if successful, -1 otherwise.
-int writeToFile(PlatformFileHandle, const char* data, int length);
 // Returns number of bytes actually written if successful, -1 otherwise.
 int readFromFile(PlatformFileHandle, char* data, int length);
 
diff --git a/Source/core/platform/PODFreeListArena.h b/Source/core/platform/PODFreeListArena.h
index d430189..2eacd2d 100644
--- a/Source/core/platform/PODFreeListArena.h
+++ b/Source/core/platform/PODFreeListArena.h
@@ -30,6 +30,7 @@
 
 namespace WebCore {
 
+// FIXME: Disassociate PODFreeListArena from PODArena, crbug.com/266535
 template <class T>
 class PODFreeListArena : public PODArena {
 public:
@@ -46,6 +47,18 @@
         return adoptRef(new PODFreeListArena(allocator));
     }
 
+    // Allocates an object from the arena.
+    T* allocateObject()
+    {
+        size_t roundedSize = roundUp(sizeof(T), minAlignment<T>());
+        void* ptr = allocate(roundedSize);
+        if (ptr) {
+            // Use placement operator new to allocate a T at this location.
+            new(ptr) T();
+        }
+        return static_cast<T*>(ptr);
+    }
+
     template<class Argument1Type> T* allocateObject(const Argument1Type& argument1)
     {
         size_t roundedSize = roundUp(sizeof(T), minAlignment<T>());
@@ -59,97 +72,59 @@
 
     void freeObject(T* ptr)
     {
-        ChunkVector::const_iterator end = m_chunks.end();
-        for (ChunkVector::const_iterator it = m_chunks.begin(); it != end; ++it) {
-            FreeListChunk* chunk = static_cast<FreeListChunk*>(it->get());
-            if (chunk->contains(ptr))
-                chunk->free(ptr);
-        }
+        FixedSizeMemoryChunk* oldFreeList = m_freeList;
+
+        m_freeList = reinterpret_cast<FixedSizeMemoryChunk*>(ptr);
+        m_freeList->next = oldFreeList;
     }
 
 private:
     PODFreeListArena()
-        : PODArena() { }
+        : PODArena(), m_freeList(0) { }
 
     explicit PODFreeListArena(PassRefPtr<Allocator> allocator)
-        : PODArena(allocator) { }
+        : PODArena(allocator), m_freeList(0) { }
 
     void* allocate(size_t size)
     {
-        void* ptr = 0;
-        if (m_current) {
-            // First allocate from the current chunk.
-            ptr = m_current->allocate(size);
-            if (!ptr) {
-                // Check if we can allocate from other chunks' free list.
-                ChunkVector::const_iterator end = m_chunks.end();
-                for (ChunkVector::const_iterator it = m_chunks.begin(); it != end; ++it) {
-                    FreeListChunk* chunk = static_cast<FreeListChunk*>(it->get());
-                    if (chunk->hasFreeList()) {
-                        ptr = chunk->allocate(size);
-                        if (ptr)
-                            break;
-                    }
-                }
-            }
+        ASSERT(size == roundUp(sizeof(T), minAlignment<T>()));
+
+        if (m_freeList) {
+            void* memory = m_freeList;
+            m_freeList = m_freeList->next;
+            return memory;
         }
 
-        if (!ptr) {
-            if (size > m_currentChunkSize)
-                m_currentChunkSize = size;
-            m_chunks.append(adoptPtr(new FreeListChunk(m_allocator.get(), m_currentChunkSize)));
+        void* memory = 0;
+        if (m_current)
+            memory = m_current->allocate(size);
+
+        if (!memory) {
+            m_chunks.append(adoptPtr(new Chunk(m_allocator.get(), m_currentChunkSize)));
             m_current = m_chunks.last().get();
-            ptr = m_current->allocate(size);
+            memory = m_current->allocate(size);
         }
-        return ptr;
+        return memory;
     }
 
-    class FreeListChunk : public PODArena::Chunk {
-        WTF_MAKE_NONCOPYABLE(FreeListChunk);
-
-        struct FreeCell {
-            FreeCell *m_next;
-        };
-    public:
-        FreeListChunk(Allocator* allocator, size_t size)
-            : Chunk(allocator, size)
-            , m_freeList(0) { }
-
-        void* allocate(size_t size)
-        {
-            if (m_freeList) {
-                // Reuse a cell from the free list.
-                void *cell = m_freeList;
-                m_freeList = m_freeList->m_next;
-                return cell;
-            }
-
-            return Chunk::allocate(size);
+    int getFreeListSizeForTesting() const
+    {
+        int total = 0;
+        for (FixedSizeMemoryChunk* cur = m_freeList; cur; cur = cur->next) {
+            total++;
         }
+        return total;
+    }
 
-        void free(void* ptr)
-        {
-            // Add the pointer to free list.
-            ASSERT(contains(ptr));
-
-            FreeCell* cell = reinterpret_cast<FreeCell*>(ptr);
-            cell->m_next = m_freeList;
-            m_freeList = cell;
-        }
-
-        bool contains(void* ptr) const
-        {
-            return ptr >= m_base && ptr < m_base + m_size;
-        }
-
-        bool hasFreeList() const
-        {
-            return m_freeList;
-        }
-
-    private:
-        FreeCell *m_freeList;
+    // This free list contains pointers within every chunk that's been allocated so
+    // far. None of the individual chunks can be freed until the arena is
+    // destroyed.
+    struct FixedSizeMemoryChunk {
+        FixedSizeMemoryChunk* next;
     };
+    FixedSizeMemoryChunk* m_freeList;
+
+    friend class PODFreeListArenaTest;
 };
 
 } // namespace WebCore
diff --git a/Source/core/platform/Partitions.cpp b/Source/core/platform/Partitions.cpp
index 635025a..a5c54f4 100644
--- a/Source/core/platform/Partitions.cpp
+++ b/Source/core/platform/Partitions.cpp
@@ -35,10 +35,12 @@
 namespace WebCore {
 
 PartitionRoot Partitions::m_objectModelRoot;
+PartitionRoot Partitions::m_renderingRoot;
 
 void Partitions::init()
 {
     partitionAllocInit(&m_objectModelRoot);
+    partitionAllocInit(&m_renderingRoot);
 }
 
 void Partitions::shutdown()
@@ -47,6 +49,7 @@
     // to very hard to diagnose ASSERTs, so it's best to leave leak checking for
     // the valgrind and heapcheck bots, which run without partitions.
     (void) partitionAllocShutdown(&m_objectModelRoot);
+    (void) partitionAllocShutdown(&m_renderingRoot);
 }
 
 } // namespace WebCore
diff --git a/Source/core/platform/Partitions.h b/Source/core/platform/Partitions.h
index 56be59a..fe2d148 100644
--- a/Source/core/platform/Partitions.h
+++ b/Source/core/platform/Partitions.h
@@ -41,9 +41,11 @@
     static void shutdown();
 
     ALWAYS_INLINE static PartitionRoot* getObjectModelPartition() { return &m_objectModelRoot; }
+    ALWAYS_INLINE static PartitionRoot* getRenderingPartition() { return &m_renderingRoot; }
 
 private:
     static PartitionRoot m_objectModelRoot;
+    static PartitionRoot m_renderingRoot;
 };
 
 } // namespace WebCore
diff --git a/Source/core/platform/ScrollAnimator.cpp b/Source/core/platform/ScrollAnimator.cpp
index 2937913..a503f69 100644
--- a/Source/core/platform/ScrollAnimator.cpp
+++ b/Source/core/platform/ScrollAnimator.cpp
@@ -76,13 +76,13 @@
 
 bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
 {
-    Scrollbar* horizontalScrollbar = m_scrollableArea->horizontalScrollbar();
-    Scrollbar* verticalScrollbar = m_scrollableArea->verticalScrollbar();
+    bool canScrollX = m_scrollableArea->userInputScrollable(HorizontalScrollbar);
+    bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar);
 
-    // Accept the event if we have a scrollbar in that direction and can still
+    // Accept the event if we are scrollable in that direction and can still
     // scroll any further.
-    float deltaX = horizontalScrollbar ? e.deltaX() : 0;
-    float deltaY = verticalScrollbar ? e.deltaY() : 0;
+    float deltaX = canScrollX ? e.deltaX() : 0;
+    float deltaY = canScrollY ? e.deltaY() : 0;
 
     bool handled = false;
 
@@ -103,21 +103,23 @@
         if (deltaY) {
             if (e.granularity() == ScrollByPageWheelEvent) {
                 bool negative = deltaY < 0;
-                deltaY = max(max(static_cast<float>(m_scrollableArea->visibleHeight()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleHeight() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
+                deltaY = m_scrollableArea->pageStep(VerticalScrollbar);
                 if (negative)
                     deltaY = -deltaY;
             }
-            scroll(VerticalScrollbar, granularity, verticalScrollbar->pixelStep(), -deltaY);
+
+            scroll(VerticalScrollbar, granularity, m_scrollableArea->pixelStep(VerticalScrollbar), -deltaY);
         }
 
         if (deltaX) {
             if (e.granularity() == ScrollByPageWheelEvent) {
                 bool negative = deltaX < 0;
-                deltaX = max(max(static_cast<float>(m_scrollableArea->visibleWidth()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollableArea->visibleWidth() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
+                deltaX = m_scrollableArea->pageStep(HorizontalScrollbar);
                 if (negative)
                     deltaX = -deltaX;
             }
-            scroll(HorizontalScrollbar, granularity, horizontalScrollbar->pixelStep(), -deltaX);
+
+            scroll(HorizontalScrollbar, granularity, m_scrollableArea->pixelStep(HorizontalScrollbar), -deltaX);
         }
     }
     return handled;
diff --git a/Source/core/platform/ScrollTypes.h b/Source/core/platform/ScrollTypes.h
index 202e65d..8f333d8 100644
--- a/Source/core/platform/ScrollTypes.h
+++ b/Source/core/platform/ScrollTypes.h
@@ -26,6 +26,8 @@
 #ifndef ScrollTypes_h
 #define ScrollTypes_h
 
+#include "wtf/Assertions.h"
+
 namespace WebCore {
 
     enum ScrollDirection {
diff --git a/Source/core/platform/ScrollView.cpp b/Source/core/platform/ScrollView.cpp
index d9f0e35..0efe2ad 100644
--- a/Source/core/platform/ScrollView.cpp
+++ b/Source/core/platform/ScrollView.cpp
@@ -43,7 +43,6 @@
     , m_verticalScrollbarMode(ScrollbarAuto)
     , m_horizontalScrollbarLock(false)
     , m_verticalScrollbarLock(false)
-    , m_prohibitsScrolling(false)
     , m_canBlitOnScroll(true)
     , m_scrollbarsAvoidingResizer(0)
     , m_scrollbarsSuppressed(false)
@@ -282,15 +281,16 @@
 
 int ScrollView::scrollSize(ScrollbarOrientation orientation) const
 {
-    // If no scrollbars are present, it does not indicate content is not be scrollable.
-    if (!m_horizontalScrollbar && !m_verticalScrollbar && !prohibitsScrolling()) {
+    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_horizontalScrollbar : m_verticalScrollbar).get();
+
+    // If no scrollbars are present, the content may still be scrollable.
+    if (!scrollbar) {
         IntSize scrollSize = m_contentsSize - visibleContentRect().size();
         scrollSize.clampNegativeToZero();
         return orientation == HorizontalScrollbar ? scrollSize.width() : scrollSize.height();
     }
 
-    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_horizontalScrollbar : m_verticalScrollbar).get();
-    return scrollbar ? (scrollbar->totalSize() - scrollbar->visibleSize()) : 0;
+    return scrollbar->totalSize() - scrollbar->visibleSize();
 }
 
 void ScrollView::notifyPageThatContentAreaWillPaint() const
@@ -317,20 +317,8 @@
     updateFixedElementsAfterScrolling();
 }
 
-int ScrollView::scrollPosition(Scrollbar* scrollbar) const
-{
-    if (scrollbar->orientation() == HorizontalScrollbar)
-        return scrollPosition().x() + scrollOrigin().x();
-    if (scrollbar->orientation() == VerticalScrollbar)
-        return scrollPosition().y() + scrollOrigin().y();
-    return 0;
-}
-
 void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
 {
-    if (prohibitsScrolling())
-        return;
-
     IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
 
     if (newScrollPosition == scrollPosition())
@@ -372,7 +360,7 @@
 
 void ScrollView::updateScrollbars(const IntSize& desiredOffset)
 {
-    if (m_inUpdateScrollbars || prohibitsScrolling())
+    if (m_inUpdateScrollbars)
         return;
 
     // If we came in here with the view already needing a layout, then go ahead and do that
@@ -473,7 +461,7 @@
         }
     }
 
-    // Set up the range (and page step/line step), but only do this if we're not in a nested call (to avoid
+    // Set up the range, but only do this if we're not in a nested call (to avoid
     // doing it multiple times).
     if (m_updateScrollbarsPass)
         return;
@@ -482,7 +470,6 @@
 
     if (m_horizontalScrollbar) {
         int clientWidth = visibleWidth();
-        int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_horizontalScrollbar->frameRect());
         IntRect hBarRect(0,
                         height() - m_horizontalScrollbar->height(),
@@ -495,7 +482,6 @@
         if (m_scrollbarsSuppressed)
             m_horizontalScrollbar->setSuppressInvalidation(true);
         m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
-        m_horizontalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
         m_horizontalScrollbar->setProportion(clientWidth, contentsWidth());
         if (m_scrollbarsSuppressed)
             m_horizontalScrollbar->setSuppressInvalidation(false);
@@ -503,7 +489,6 @@
 
     if (m_verticalScrollbar) {
         int clientHeight = visibleHeight();
-        int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
         IntRect oldRect(m_verticalScrollbar->frameRect());
         IntRect vBarRect(width() - m_verticalScrollbar->width(),
                          0,
@@ -516,7 +501,6 @@
         if (m_scrollbarsSuppressed)
             m_verticalScrollbar->setSuppressInvalidation(true);
         m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
-        m_verticalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
         m_verticalScrollbar->setProportion(clientHeight, contentsHeight());
         if (m_scrollbarsSuppressed)
             m_verticalScrollbar->setSuppressInvalidation(false);
@@ -814,6 +798,14 @@
     positionScrollCornerLayer(layerForScrollCorner(), scrollCornerRect());
 }
 
+bool ScrollView::userInputScrollable(ScrollbarOrientation orientation) const
+{
+    ScrollbarMode mode = (orientation == HorizontalScrollbar) ?
+        m_horizontalScrollbarMode : m_verticalScrollbarMode;
+
+    return mode == ScrollbarAuto || mode == ScrollbarAlwaysOn;
+}
+
 void ScrollView::repaintContentRectangle(const IntRect& rect)
 {
     IntRect paintRect = rect;
@@ -1175,4 +1167,13 @@
         updateScrollbars(scrollOffset());
 }
 
+int ScrollView::pageStep(ScrollbarOrientation orientation) const
+{
+    int length = (orientation == HorizontalScrollbar) ? visibleWidth() : visibleHeight();
+    int minPageStep = static_cast<float>(length) * minFractionToStepWhenPaging();
+    int pageStep = std::max(minPageStep, length - maxOverlapBetweenPages());
+
+    return std::max(pageStep, 1);
 }
+
+} // namespace WebCore
diff --git a/Source/core/platform/ScrollView.h b/Source/core/platform/ScrollView.h
index 44180b1..7f1dc48 100644
--- a/Source/core/platform/ScrollView.h
+++ b/Source/core/platform/ScrollView.h
@@ -46,10 +46,10 @@
 
     // ScrollableArea functions.
     virtual int scrollSize(ScrollbarOrientation) const OVERRIDE;
-    virtual int scrollPosition(Scrollbar*) const OVERRIDE;
     virtual void setScrollOffset(const IntPoint&) OVERRIDE;
     virtual bool isScrollCornerVisible() const OVERRIDE;
     virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
+    virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE;
 
     virtual void notifyPageThatContentAreaWillPaint() const;
 
@@ -111,10 +111,6 @@
     // Overridden by FrameView to create custom CSS scrollbars if applicable.
     virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
 
-    // If the prohibits scrolling flag is set, then all scrolling in the view (even programmatic scrolling) is turned off.
-    void setProhibitsScrolling(bool b) { m_prohibitsScrolling = b; }
-    bool prohibitsScrolling() const { return m_prohibitsScrolling; }
-
     // Whether or not a scroll view will blit visible contents when it is scrolled. Blitting is disabled in situations
     // where it would cause rendering glitches (such as with fixed backgrounds or when the view is partially transparent).
     void setCanBlitOnScroll(bool);
@@ -308,8 +304,6 @@
     bool m_horizontalScrollbarLock;
     bool m_verticalScrollbarLock;
 
-    bool m_prohibitsScrolling;
-
     HashSet<RefPtr<Widget> > m_children;
 
     // This bool is unused on Mac OS because we directly ask the platform widget
@@ -345,6 +339,8 @@
 
     void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
     void updateOverhangAreas();
+
+    int pageStep(ScrollbarOrientation) const;
 }; // class ScrollView
 
 inline ScrollView* toScrollView(Widget* widget)
diff --git a/Source/core/platform/ScrollableArea.cpp b/Source/core/platform/ScrollableArea.cpp
index 96999b5..8bb6bed 100644
--- a/Source/core/platform/ScrollableArea.cpp
+++ b/Source/core/platform/ScrollableArea.cpp
@@ -40,6 +40,9 @@
 
 #include "core/platform/chromium/TraceEvent.h"
 
+static const int kPixelsPerLineStep = 40;
+static const float kMinFractionToStepWhenPaging = 0.875f;
+
 namespace WebCore {
 
 struct SameSizeAsScrollableArea {
@@ -51,6 +54,22 @@
 
 COMPILE_ASSERT(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), ScrollableArea_should_stay_small);
 
+int ScrollableArea::pixelsPerLineStep()
+{
+    return kPixelsPerLineStep;
+}
+
+float ScrollableArea::minFractionToStepWhenPaging()
+{
+    return kMinFractionToStepWhenPaging;
+}
+
+int ScrollableArea::maxOverlapBetweenPages()
+{
+    static int maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetweenPages();
+    return maxOverlapBetweenPages;
+}
+
 ScrollableArea::ScrollableArea()
     : m_constrainsScrollingToContentEdge(true)
     , m_inLiveResize(false)
@@ -84,32 +103,29 @@
 bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier)
 {
     ScrollbarOrientation orientation;
-    Scrollbar* scrollbar;
-    if (direction == ScrollUp || direction == ScrollDown) {
-        orientation = VerticalScrollbar;
-        scrollbar = verticalScrollbar();
-    } else {
-        orientation = HorizontalScrollbar;
-        scrollbar = horizontalScrollbar();
-    }
 
-    if (!scrollbar)
+    if (direction == ScrollUp || direction == ScrollDown)
+        orientation = VerticalScrollbar;
+    else
+        orientation = HorizontalScrollbar;
+
+    if (!userInputScrollable(orientation))
         return false;
 
     float step = 0;
     switch (granularity) {
     case ScrollByLine:
-        step = scrollbar->lineStep();
+        step = lineStep(orientation);
         break;
     case ScrollByPage:
-        step = scrollbar->pageStep();
+        step = pageStep(orientation);
         break;
     case ScrollByDocument:
-        step = scrollbar->totalSize();
+        step = documentStep(orientation);
         break;
     case ScrollByPixel:
     case ScrollByPrecisePixel:
-        step = scrollbar->pixelStep();
+        step = pixelStep(orientation);
         break;
     }
 
@@ -363,23 +379,6 @@
         scrollAnimator->serviceScrollAnimations();
 }
 
-IntPoint ScrollableArea::scrollPosition() const
-{
-    int x = horizontalScrollbar() ? horizontalScrollbar()->value() : 0;
-    int y = verticalScrollbar() ? verticalScrollbar()->value() : 0;
-    return IntPoint(x, y);
-}
-
-IntPoint ScrollableArea::minimumScrollPosition() const
-{
-    return IntPoint();
-}
-
-IntPoint ScrollableArea::maximumScrollPosition() const
-{
-    return IntPoint(contentsSize().width() - visibleWidth(), contentsSize().height() - visibleHeight());
-}
-
 IntRect ScrollableArea::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
 {
     int verticalScrollbarWidth = 0;
@@ -403,4 +402,19 @@
     return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumScrollPosition());
 }
 
+int ScrollableArea::lineStep(ScrollbarOrientation) const
+{
+    return pixelsPerLineStep();
+}
+
+int ScrollableArea::documentStep(ScrollbarOrientation orientation) const
+{
+    return scrollSize(orientation);
+}
+
+float ScrollableArea::pixelStep(ScrollbarOrientation) const
+{
+    return 1;
+}
+
 } // namespace WebCore
diff --git a/Source/core/platform/ScrollableArea.h b/Source/core/platform/ScrollableArea.h
index 4590a98..0f2bf5f 100644
--- a/Source/core/platform/ScrollableArea.h
+++ b/Source/core/platform/ScrollableArea.h
@@ -40,6 +40,10 @@
 
 class ScrollableArea {
 public:
+    static int pixelsPerLineStep();
+    static float minFractionToStepWhenPaging();
+    static int maxOverlapBetweenPages();
+
     bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
     void scrollToOffsetWithoutAnimation(const FloatPoint&);
     void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
@@ -102,7 +106,6 @@
 
     virtual bool isActive() const = 0;
     virtual int scrollSize(ScrollbarOrientation) const = 0;
-    virtual int scrollPosition(Scrollbar*) const = 0;
     virtual void invalidateScrollbar(Scrollbar*, const IntRect&);
     virtual bool isScrollCornerVisible() const = 0;
     virtual IntRect scrollCornerRect() const = 0;
@@ -132,9 +135,11 @@
     virtual Scrollbar* horizontalScrollbar() const { return 0; }
     virtual Scrollbar* verticalScrollbar() const { return 0; }
 
-    virtual IntPoint scrollPosition() const;
-    virtual IntPoint minimumScrollPosition() const;
-    virtual IntPoint maximumScrollPosition() const;
+    // scrollPosition is relative to the scrollOrigin. i.e. If the page is RTL
+    // then scrollPosition will be negative.
+    virtual IntPoint scrollPosition() const = 0;
+    virtual IntPoint minimumScrollPosition() const = 0;
+    virtual IntPoint maximumScrollPosition() const = 0;
 
     enum VisibleContentRectIncludesScrollbars { ExcludeScrollbars, IncludeScrollbars };
     virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
@@ -173,6 +178,8 @@
     virtual bool usesCompositedScrolling() const { return false; }
     virtual void updateNeedsCompositedScrolling() { }
 
+    virtual bool userInputScrollable(ScrollbarOrientation) const = 0;
+
     // Convenience functions
     int scrollPosition(ScrollbarOrientation orientation) { return orientation == HorizontalScrollbar ? scrollPosition().x() : scrollPosition().y(); }
     int minimumScrollPosition(ScrollbarOrientation orientation) { return orientation == HorizontalScrollbar ? minimumScrollPosition().x() : minimumScrollPosition().y(); }
@@ -212,6 +219,11 @@
     // scroll of the content.
     virtual void setScrollOffset(const IntPoint&) = 0;
 
+    virtual int lineStep(ScrollbarOrientation) const;
+    virtual int pageStep(ScrollbarOrientation) const = 0;
+    virtual int documentStep(ScrollbarOrientation) const;
+    virtual float pixelStep(ScrollbarOrientation) const;
+
     mutable OwnPtr<ScrollAnimator> m_scrollAnimator;
     unsigned m_constrainsScrollingToContentEdge : 1;
 
diff --git a/Source/core/platform/Scrollbar.cpp b/Source/core/platform/Scrollbar.cpp
index 742c417..8e640cc 100644
--- a/Source/core/platform/Scrollbar.cpp
+++ b/Source/core/platform/Scrollbar.cpp
@@ -55,12 +55,6 @@
     return adoptRef(new Scrollbar(scrollableArea, orientation, size));
 }
 
-int Scrollbar::maxOverlapBetweenPages()
-{
-    static int maxOverlapBetweenPages = ScrollbarTheme::theme()->maxOverlapBetweenPages();
-    return maxOverlapBetweenPages;
-}
-
 Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize,
                      ScrollbarTheme* theme)
     : m_scrollableArea(scrollableArea)
@@ -71,9 +65,6 @@
     , m_totalSize(0)
     , m_currentPos(0)
     , m_dragOrigin(0)
-    , m_lineStep(0)
-    , m_pageStep(0)
-    , m_pixelStep(1)
     , m_hoveredPart(NoPart)
     , m_pressedPart(NoPart)
     , m_pressedPos(0)
@@ -97,8 +88,7 @@
     int thickness = m_theme->scrollbarThickness(controlSize);
     Widget::setFrameRect(IntRect(0, 0, thickness, thickness));
 
-    if (m_scrollableArea)
-        m_currentPos = static_cast<float>(m_scrollableArea->scrollPosition(this));
+    m_currentPos = scrollableAreaCurrentPos();
 }
 
 Scrollbar::~Scrollbar()
@@ -136,7 +126,7 @@
 {
     ASSERT(m_scrollableArea);
 
-    float position = static_cast<float>(m_scrollableArea->scrollPosition(this));
+    float position = scrollableAreaCurrentPos();
     if (position == m_currentPos)
         return;
 
@@ -158,13 +148,6 @@
     updateThumbProportion();
 }
 
-void Scrollbar::setSteps(int lineStep, int pageStep, int pixelsPerStep)
-{
-    m_lineStep = lineStep;
-    m_pageStep = pageStep;
-    m_pixelStep = 1.0f / pixelsPerStep;
-}
-
 void Scrollbar::updateThumb()
 {
 #ifdef THUMB_POSITION_AFFECTS_BUTTONS
@@ -601,4 +584,15 @@
     return Widget::convertFromContainingView(parentPoint);
 }
 
+float Scrollbar::scrollableAreaCurrentPos() const
+{
+    if (!m_scrollableArea)
+        return 0;
+
+    if (m_orientation == HorizontalScrollbar)
+        return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimumScrollPosition().x();
+
+    return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScrollPosition().y();
+}
+
 } // namespace WebCore
diff --git a/Source/core/platform/Scrollbar.h b/Source/core/platform/Scrollbar.h
index b3cab27..0201a2d 100644
--- a/Source/core/platform/Scrollbar.h
+++ b/Source/core/platform/Scrollbar.h
@@ -85,9 +85,6 @@
     virtual int maximum() const { return m_totalSize - m_visibleSize; }
     virtual ScrollbarControlSize controlSize() const { return m_controlSize; }
 
-    virtual int lineStep() const { return m_lineStep; }
-    virtual int pageStep() const { return m_pageStep; }
-
     virtual ScrollbarPart pressedPart() const { return m_pressedPart; }
     virtual ScrollbarPart hoveredPart() const { return m_hoveredPart; }
 
@@ -99,21 +96,14 @@
     // Called by the ScrollableArea when the scroll offset changes.
     void offsetDidChange();
 
-    static int pixelsPerLineStep() { return 40; }
-    static float minFractionToStepWhenPaging() { return 0.875f; }
-    static int maxOverlapBetweenPages();
-
     void disconnectFromScrollableArea() { m_scrollableArea = 0; }
     ScrollableArea* scrollableArea() const { return m_scrollableArea; }
 
     int pressedPos() const { return m_pressedPos; }
 
-    float pixelStep() const { return m_pixelStep; }
-
     virtual void setHoveredPart(ScrollbarPart);
     virtual void setPressedPart(ScrollbarPart);
 
-    void setSteps(int lineStep, int pageStep, int pixelsPerStep = 1);
     void setProportion(int visibleSize, int totalSize);
     void setPressedPos(int p) { m_pressedPos = p; }
 
@@ -178,9 +168,6 @@
     int m_totalSize;
     float m_currentPos;
     float m_dragOrigin;
-    int m_lineStep;
-    int m_pageStep;
-    float m_pixelStep;
 
     ScrollbarPart m_hoveredPart;
     ScrollbarPart m_pressedPart;
@@ -201,6 +188,8 @@
 private:
     virtual bool isScrollbar() const { return true; }
     virtual AXObjectCache* existingAXObjectCache() const;
+
+    float scrollableAreaCurrentPos() const;
 };
 
 } // namespace WebCore
diff --git a/Source/core/platform/ScrollbarThemeClient.h b/Source/core/platform/ScrollbarThemeClient.h
index dc001b7..8372736 100644
--- a/Source/core/platform/ScrollbarThemeClient.h
+++ b/Source/core/platform/ScrollbarThemeClient.h
@@ -72,9 +72,6 @@
     virtual int maximum() const = 0;
     virtual ScrollbarControlSize controlSize() const = 0;
 
-    virtual int lineStep() const = 0;
-    virtual int pageStep() const = 0;
-
     virtual ScrollbarPart pressedPart() const = 0;
     virtual ScrollbarPart hoveredPart() const = 0;
 
diff --git a/Source/core/platform/ScrollbarThemeComposite.cpp b/Source/core/platform/ScrollbarThemeComposite.cpp
index fc8ebde..ec628ee 100644
--- a/Source/core/platform/ScrollbarThemeComposite.cpp
+++ b/Source/core/platform/ScrollbarThemeComposite.cpp
@@ -233,7 +233,12 @@
     if (!scrollbar->enabled())
         return 0;
 
-    float proportion = scrollbar->visibleSize() / usedTotalSize(scrollbar);
+    float overhang = 0;
+    if (scrollbar->currentPos() < 0)
+        overhang = -scrollbar->currentPos();
+    else if (scrollbar->visibleSize() + scrollbar->currentPos() > scrollbar->totalSize())
+        overhang = scrollbar->currentPos() + scrollbar->visibleSize() - scrollbar->totalSize();
+    float proportion = (scrollbar->visibleSize() - overhang) / usedTotalSize(scrollbar);
     int trackLen = trackLength(scrollbar);
     int length = round(proportion * trackLen);
     length = max(length, minimumThumbLength(scrollbar));
diff --git a/Source/core/platform/audio/Distance.cpp b/Source/core/platform/audio/Distance.cpp
index 2702a70..91a4a5f 100644
--- a/Source/core/platform/audio/Distance.cpp
+++ b/Source/core/platform/audio/Distance.cpp
@@ -31,6 +31,7 @@
 #if ENABLE(WEB_AUDIO)
 
 #include "core/platform/audio/Distance.h"
+#include "wtf/Assertions.h"
 
 #include <math.h>
 #include <algorithm>
diff --git a/Source/core/platform/audio/VectorMath.cpp b/Source/core/platform/audio/VectorMath.cpp
index 6b20f07..b07ad30 100644
--- a/Source/core/platform/audio/VectorMath.cpp
+++ b/Source/core/platform/audio/VectorMath.cpp
@@ -28,6 +28,8 @@
 
 #include "core/platform/audio/VectorMath.h"
 
+#include "wtf/Assertions.h"
+
 #if OS(DARWIN)
 #include <Accelerate/Accelerate.h>
 #endif
diff --git a/Source/core/platform/chromium/FileSystemChromium.cpp b/Source/core/platform/chromium/FileSystemChromium.cpp
index 6d606c2..2e2ff68 100644
--- a/Source/core/platform/chromium/FileSystemChromium.cpp
+++ b/Source/core/platform/chromium/FileSystemChromium.cpp
@@ -41,16 +41,6 @@
 
 namespace WebCore {
 
-bool deleteFile(const String& path)
-{
-    return WebKit::Platform::current()->fileUtilities()->deleteFile(path);
-}
-
-bool deleteEmptyDirectory(const String& path)
-{
-    return WebKit::Platform::current()->fileUtilities()->deleteEmptyDirectory(path);
-}
-
 bool getFileSize(const String& path, long long& result)
 {
     FileMetadata metadata;
@@ -85,21 +75,6 @@
     return WebKit::Platform::current()->fileUtilities()->directoryName(path);
 }
 
-String pathByAppendingComponent(const String& path, const String& component)
-{
-    return WebKit::Platform::current()->fileUtilities()->pathByAppendingComponent(path, component);
-}
-
-bool makeAllDirectories(const String& path)
-{
-    return WebKit::Platform::current()->fileUtilities()->makeAllDirectories(path);
-}
-
-bool fileExists(const String& path)
-{
-    return WebKit::Platform::current()->fileUtilities()->fileExists(path);
-}
-
 PlatformFileHandle openFile(const String& path, FileOpenMode mode)
 {
     return WebKit::Platform::current()->fileUtilities()->openFile(path, mode);
@@ -110,24 +85,9 @@
     WebKit::Platform::current()->fileUtilities()->closeFile(handle);
 }
 
-long long seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)
-{
-    return WebKit::Platform::current()->fileUtilities()->seekFile(handle, offset, origin);
-}
-
-bool truncateFile(PlatformFileHandle handle, long long offset)
-{
-    return WebKit::Platform::current()->fileUtilities()->truncateFile(handle, offset);
-}
-
 int readFromFile(PlatformFileHandle handle, char* data, int length)
 {
     return WebKit::Platform::current()->fileUtilities()->readFromFile(handle, data, length);
 }
 
-int writeToFile(PlatformFileHandle handle, const char* data, int length)
-{
-    return WebKit::Platform::current()->fileUtilities()->writeToFile(handle, data, length);
-}
-
 } // namespace WebCore
diff --git a/Source/core/platform/chromium/support/WebCrypto.cpp b/Source/core/platform/chromium/support/WebCrypto.cpp
index 73e8a29..9f63634 100644
--- a/Source/core/platform/chromium/support/WebCrypto.cpp
+++ b/Source/core/platform/chromium/support/WebCrypto.cpp
@@ -59,6 +59,12 @@
     reset();
 }
 
+void WebCryptoOperationResult::completeWithBoolean(bool b)
+{
+    m_impl->completeWithBoolean(b);
+    reset();
+}
+
 void WebCryptoOperationResult::reset()
 {
     m_impl.reset();
diff --git a/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp b/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp
index 309ba56..891cb10 100644
--- a/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp
+++ b/Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp
@@ -56,6 +56,11 @@
 {
 }
 
+WebCryptoAlgorithm WebCryptoAlgorithm::adoptParamsAndCreate(WebCryptoAlgorithmId id, const char* name, WebCryptoAlgorithmParams* params)
+{
+    return WebCryptoAlgorithm(id, name, adoptPtr(params));
+}
+
 WebCryptoAlgorithmId WebCryptoAlgorithm::id() const
 {
     return m_private->id;
@@ -94,6 +99,20 @@
     return 0;
 }
 
+WebCryptoRsaSsaParams* WebCryptoAlgorithm::rsaSsaParams() const
+{
+    if (paramsType() == WebCryptoAlgorithmParamsTypeRsaSsaParams)
+        return static_cast<WebCryptoRsaSsaParams*>(m_private->params.get());
+    return 0;
+}
+
+WebCryptoRsaKeyGenParams* WebCryptoAlgorithm::rsaKeyGenParams() const
+{
+    if (paramsType() == WebCryptoAlgorithmParamsTypeRsaKeyGenParams)
+        return static_cast<WebCryptoRsaKeyGenParams*>(m_private->params.get());
+    return 0;
+}
+
 void WebCryptoAlgorithm::assign(const WebCryptoAlgorithm& other)
 {
     m_private = other.m_private;
diff --git a/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.cpp b/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.cpp
index 1428191..7a3f5e0 100644
--- a/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.cpp
+++ b/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.cpp
@@ -26,6 +26,7 @@
 #include "config.h"
 
 #include "core/platform/chromium/support/WebScrollbarThemeClientImpl.h"
+#include "core/platform/ScrollbarTheme.h"
 
 using WebKit::WebScrollbar;
 
@@ -34,6 +35,12 @@
 WebScrollbarThemeClientImpl::WebScrollbarThemeClientImpl(WebScrollbar* scrollbar)
     : m_scrollbar(scrollbar)
 {
+    ScrollbarTheme::theme()->registerScrollbar(this);
+}
+
+WebScrollbarThemeClientImpl::~WebScrollbarThemeClientImpl()
+{
+    ScrollbarTheme::theme()->unregisterScrollbar(this);
 }
 
 int WebScrollbarThemeClientImpl::x() const
@@ -176,18 +183,6 @@
     return static_cast<WebCore::ScrollbarControlSize>(m_scrollbar->controlSize());
 }
 
-int WebScrollbarThemeClientImpl::lineStep() const
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-int WebScrollbarThemeClientImpl::pageStep() const
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
 WebCore::ScrollbarPart WebScrollbarThemeClientImpl::pressedPart() const
 {
     return static_cast<WebCore::ScrollbarPart>(m_scrollbar->pressedPart());
diff --git a/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.h b/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.h
index 81053e5..5f6728f 100644
--- a/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.h
+++ b/Source/core/platform/chromium/support/WebScrollbarThemeClientImpl.h
@@ -40,6 +40,7 @@
     // Caller must retain ownership of this pointer and ensure that its lifetime
     // exceeds this instance.
     WebScrollbarThemeClientImpl(WebKit::WebScrollbar*);
+    ~WebScrollbarThemeClientImpl();
 
     // Implement ScrollbarThemeClient interface
     virtual int x() const OVERRIDE;
@@ -67,8 +68,6 @@
     virtual int totalSize() const OVERRIDE;
     virtual int maximum() const OVERRIDE;
     virtual ScrollbarControlSize controlSize() const OVERRIDE;
-    virtual int lineStep() const OVERRIDE;
-    virtual int pageStep() const OVERRIDE;
     virtual ScrollbarPart pressedPart() const OVERRIDE;
     virtual ScrollbarPart hoveredPart() const OVERRIDE;
     virtual void styleChanged() OVERRIDE;
diff --git a/Source/core/platform/graphics/BitmapImage.cpp b/Source/core/platform/graphics/BitmapImage.cpp
index f00c3e0..2e32687 100644
--- a/Source/core/platform/graphics/BitmapImage.cpp
+++ b/Source/core/platform/graphics/BitmapImage.cpp
@@ -329,7 +329,7 @@
         }
     }
 
-    paintSkBitmap(ctxt, *bm, normSrcRect, normDstRect, WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
+    bm->draw(ctxt, normSrcRect, normDstRect, WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
 
     if (ImageObserver* observer = imageObserver())
         observer->didDraw(this);
diff --git a/Source/core/platform/graphics/BitmapImage.h b/Source/core/platform/graphics/BitmapImage.h
index 42a966c..0aa6692 100644
--- a/Source/core/platform/graphics/BitmapImage.h
+++ b/Source/core/platform/graphics/BitmapImage.h
@@ -29,6 +29,7 @@
 #define BitmapImage_h
 
 #include "core/platform/graphics/Color.h"
+#include "core/platform/graphics/FrameData.h"
 #include "core/platform/graphics/Image.h"
 #include "core/platform/graphics/ImageOrientation.h"
 #include "core/platform/graphics/ImageSource.h"
@@ -36,60 +37,10 @@
 #include "wtf/Forward.h"
 
 namespace WebCore {
-struct FrameData;
-}
-
-namespace WTF {
-template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {
-    static const bool canInitializeWithMemset = false; // Not all FrameData members initialize to 0.
-};
-}
-
-namespace WebCore {
 
 class NativeImageSkia;
 template <typename T> class Timer;
 
-// ================================================
-// FrameData Class
-// ================================================
-
-struct FrameData {
-    WTF_MAKE_NONCOPYABLE(FrameData);
-public:
-    FrameData()
-        : m_frame(0)
-        , m_orientation(DefaultImageOrientation)
-        , m_duration(0)
-        , m_haveMetadata(false)
-        , m_isComplete(false)
-        , m_hasAlpha(true)
-        , m_frameBytes(0)
-    {
-    }
-
-    ~FrameData()
-    {
-        clear(true);
-    }
-
-    // Clear the cached image data on the frame, and (optionally) the metadata.
-    // Returns whether there was cached image data to clear.
-    bool clear(bool clearMetadata);
-
-    RefPtr<NativeImageSkia> m_frame;
-    ImageOrientation m_orientation;
-    float m_duration;
-    bool m_haveMetadata : 1;
-    bool m_isComplete : 1;
-    bool m_hasAlpha : 1;
-    unsigned m_frameBytes;
-};
-
-// =================================================
-// BitmapImage Class
-// =================================================
-
 class BitmapImage : public Image {
     friend class GeneratedImage;
     friend class CrossfadeGeneratedImage;
diff --git a/Source/core/platform/graphics/FontCache.h b/Source/core/platform/graphics/FontCache.h
index 3f6dea6..cf43ba2 100644
--- a/Source/core/platform/graphics/FontCache.h
+++ b/Source/core/platform/graphics/FontCache.h
@@ -66,8 +66,9 @@
     PassRefPtr<FontData> getFontData(const Font&, int& familyIndex, FontSelector*);
     void releaseFontData(const SimpleFontData*);
 
-    // This method is implemented by the platform.
-    PassRefPtr<SimpleFontData> getFontDataForCharacters(const Font&, const UChar* characters, int length);
+    // This method is implemented by the plaform and used by
+    // FontFastPath to lookup the font for a given character.
+    PassRefPtr<SimpleFontData> getFontDataForCharacter(const Font&, UChar32);
 
     // Also implemented by the platform.
     void platformInit();
@@ -102,7 +103,7 @@
         bool isBold;
         bool isItalic;
     };
-    static void getFontFamilyForCharacters(const UChar* characters, size_t numCharacters, const char* preferredLocale, SimpleFontFamily*);
+    static void getFontFamilyForCharacter(UChar32, const char* preferredLocale, SimpleFontFamily*);
 
 private:
     FontCache();
diff --git a/Source/core/platform/graphics/FontCustomPlatformData.h b/Source/core/platform/graphics/FontCustomPlatformData.h
index 5647794..e9c53de 100644
--- a/Source/core/platform/graphics/FontCustomPlatformData.h
+++ b/Source/core/platform/graphics/FontCustomPlatformData.h
@@ -1,31 +1,88 @@
 /*
- * Copyright (C) 2013 Google, Inc. All rights reserved.
+ * Copyright (C) 2007 Apple Computer, Inc.
+ * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
  *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef FontCustomPlatformData_Forward_h
-#define FontCustomPlatformData_Forward_h
+#ifndef FontCustomPlatformData_h
+#define FontCustomPlatformData_h
+
+#include "core/platform/graphics/FontOrientation.h"
+#include "core/platform/graphics/FontWidthVariant.h"
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/text/WTFString.h"
+
+#if OS(WINDOWS)
+#include <windows.h>
+#endif
 
 #if OS(DARWIN)
-#include "core/platform/graphics/mac/FontCustomPlatformData.h"
-#else
-#include "core/platform/graphics/skia/FontCustomPlatformData.h"
+#include "wtf/RetainPtr.h"
+#include <CoreFoundation/CFBase.h>
+typedef struct CGFont* CGFontRef;
 #endif
 
+#if OS(DARWIN) || OS(UNIX)
+#include "wtf/RefPtr.h"
+class SkTypeface;
 #endif
 
+namespace WebCore {
+
+class FontPlatformData;
+class SharedBuffer;
+
+class FontCustomPlatformData {
+    WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
+public:
+    static PassOwnPtr<FontCustomPlatformData> create(SharedBuffer*);
+    ~FontCustomPlatformData();
+
+    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
+
+    static bool supportsFormat(const String&);
+
+private:
+#if OS(WINDOWS)
+    FontCustomPlatformData(HANDLE fontReference, const String& name);
+    HANDLE m_fontReference;
+    String m_name;
+#elif OS(DARWIN)
+    explicit FontCustomPlatformData(CGFontRef, PassRefPtr<SkTypeface>);
+    RetainPtr<CGFontRef> m_cgFont;
+    RefPtr<SkTypeface> m_typeface;
+#elif OS(UNIX)
+    explicit FontCustomPlatformData(PassRefPtr<SkTypeface>);
+    RefPtr<SkTypeface> m_typeface;
+#endif
+};
+
+} // namespace WebCore
+
+#endif // FontCustomPlatformData_h
diff --git a/Source/core/platform/graphics/FontFastPath.cpp b/Source/core/platform/graphics/FontFastPath.cpp
index f90a781..aae868a 100644
--- a/Source/core/platform/graphics/FontFastPath.cpp
+++ b/Source/core/platform/graphics/FontFastPath.cpp
@@ -270,17 +270,13 @@
     // System fallback is character-dependent. When we get here, we
     // know that the character in question isn't in the system fallback
     // font's glyph page. Try to lazily create it here.
-    UChar codeUnits[2];
-    int codeUnitsLength;
-    if (c <= 0xFFFF) {
-        codeUnits[0] = Font::normalizeSpaces(c);
-        codeUnitsLength = 1;
-    } else {
-        codeUnits[0] = U16_LEAD(c);
-        codeUnits[1] = U16_TRAIL(c);
-        codeUnitsLength = 2;
-    }
-    RefPtr<SimpleFontData> characterFontData = fontCache()->getFontDataForCharacters(*this, codeUnits, codeUnitsLength);
+
+    // FIXME: Unclear if this should normalizeSpaces above 0xFFFF.
+    // Doing so changes fast/text/international/plane2-diffs.html
+    UChar32 characterToRender = c;
+    if (characterToRender <=  0xFFFF)
+        characterToRender = Font::normalizeSpaces(characterToRender);
+    RefPtr<SimpleFontData> characterFontData = fontCache()->getFontDataForCharacter(*this, characterToRender);
     if (characterFontData) {
         if (characterFontData->platformData().orientation() == Vertical && !characterFontData->hasVerticalGlyphs() && isCJKIdeographOrSymbol(c))
             variant = BrokenIdeographVariant;
@@ -455,7 +451,6 @@
 {
     // Draw each contiguous run of glyphs that use the same font data.
     const SimpleFontData* fontData = glyphBuffer.fontDataAt(0);
-    FloatSize offset = glyphBuffer.offsetAt(0);
     FloatPoint startPoint(point);
     float nextX = startPoint.x() + glyphBuffer.advanceAt(0);
     int lastFrom = 0;
@@ -465,9 +460,8 @@
 #endif
     while (nextGlyph < glyphBuffer.size()) {
         const SimpleFontData* nextFontData = glyphBuffer.fontDataAt(nextGlyph);
-        FloatSize nextOffset = glyphBuffer.offsetAt(nextGlyph);
 
-        if (nextFontData != fontData || nextOffset != offset) {
+        if (nextFontData != fontData) {
 #if ENABLE(SVG_FONTS)
             if (renderingContext && fontData->isSVGFont())
                 renderingContext->drawSVGGlyphs(context, runInfo.run, fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint);
@@ -477,7 +471,6 @@
 
             lastFrom = nextGlyph;
             fontData = nextFontData;
-            offset = nextOffset;
             startPoint.setX(nextX);
         }
         nextX += glyphBuffer.advanceAt(nextGlyph);
diff --git a/Source/core/platform/graphics/FontWidthVariant.h b/Source/core/platform/graphics/FontWidthVariant.h
index 0e25c69..6016437 100644
--- a/Source/core/platform/graphics/FontWidthVariant.h
+++ b/Source/core/platform/graphics/FontWidthVariant.h
@@ -26,6 +26,8 @@
 #ifndef FontWidthVariant_h
 #define FontWidthVariant_h
 
+#include "wtf/Assertions.h"
+
 namespace WebCore {
 
 enum FontWidthVariant {
diff --git a/Source/core/platform/graphics/FrameData.cpp b/Source/core/platform/graphics/FrameData.cpp
new file mode 100644
index 0000000..17b4085
--- /dev/null
+++ b/Source/core/platform/graphics/FrameData.cpp
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/graphics/FrameData.h"
+
+#include "core/platform/graphics/skia/NativeImageSkia.h"
+
+namespace WebCore {
+
+FrameData::FrameData()
+    : m_frame(0)
+    , m_orientation(DefaultImageOrientation)
+    , m_duration(0)
+    , m_haveMetadata(false)
+    , m_isComplete(false)
+    , m_hasAlpha(true)
+    , m_frameBytes(0)
+{
+}
+
+FrameData::~FrameData()
+{
+    clear(true);
+}
+
+bool FrameData::clear(bool clearMetadata)
+{
+    if (clearMetadata)
+        m_haveMetadata = false;
+
+    m_orientation = DefaultImageOrientation;
+
+    if (m_frame) {
+        m_frame.clear();
+
+        return true;
+    }
+    return false;
+}
+
+} // namespace WebCore
diff --git a/Source/core/platform/graphics/FrameData.h b/Source/core/platform/graphics/FrameData.h
new file mode 100644
index 0000000..a2c2381
--- /dev/null
+++ b/Source/core/platform/graphics/FrameData.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
+ * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.  All rights reserved.
+ * Copyright (C) 2008-2009 Torch Mobile, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FrameData_h
+#define FrameData_h
+
+#include "core/platform/graphics/ImageOrientation.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/RefPtr.h"
+#include "wtf/VectorTraits.h"
+
+namespace WebCore {
+struct FrameData;
+}
+
+namespace WTF {
+template<> struct VectorTraits<WebCore::FrameData> : public SimpleClassVectorTraits {
+    static const bool canInitializeWithMemset = false; // Not all FrameData members initialize to 0.
+};
+}
+
+namespace WebCore {
+
+class NativeImageSkia;
+
+struct FrameData {
+    WTF_MAKE_NONCOPYABLE(FrameData);
+public:
+    FrameData();
+    ~FrameData();
+
+    // Clear the cached image data on the frame, and (optionally) the metadata.
+    // Returns whether there was cached image data to clear.
+    bool clear(bool clearMetadata);
+
+    RefPtr<NativeImageSkia> m_frame;
+    ImageOrientation m_orientation;
+    float m_duration;
+    bool m_haveMetadata : 1;
+    bool m_isComplete : 1;
+    bool m_hasAlpha : 1;
+    unsigned m_frameBytes;
+};
+
+} // namespace WebCore
+
+#endif // FrameData_h
diff --git a/Source/core/platform/graphics/GlyphBuffer.h b/Source/core/platform/graphics/GlyphBuffer.h
index 929c51a..97399cb 100644
--- a/Source/core/platform/graphics/GlyphBuffer.h
+++ b/Source/core/platform/graphics/GlyphBuffer.h
@@ -91,14 +91,7 @@
         return m_advances[index].width();
     }
 
-    FloatSize offsetAt(int index) const
-    {
-        // FIXME: Remove this function, it was only used in PLATFORM(WIN).
-        UNUSED_PARAM(index);
-        return FloatSize();
-    }
-
-    void add(Glyph glyph, const SimpleFontData* font, float width, const FloatSize* offset = 0)
+    void add(Glyph glyph, const SimpleFontData* font, float width)
     {
         m_fontData.append(font);
         m_glyphs.append(glyph);
@@ -109,8 +102,6 @@
 #else
         m_advances.append(FloatSize(width, 0));
 #endif
-
-        UNUSED_PARAM(offset);
     }
 
     void add(Glyph glyph, const SimpleFontData* font, GlyphBufferAdvance advance)
diff --git a/Source/core/platform/graphics/GlyphPage.h b/Source/core/platform/graphics/GlyphPage.h
index 214fcd9..c4af22c 100644
--- a/Source/core/platform/graphics/GlyphPage.h
+++ b/Source/core/platform/graphics/GlyphPage.h
@@ -68,9 +68,6 @@
 // although multiple nodes may reference it as their "page" if they are supposed
 // to be overriding the parent's node, but provide no additional information.
 class GlyphPage : public RefCounted<GlyphPage> {
-    // This is needed because we malloc() space for a GlyphPage plus optional
-    // following data, as a performance tweak.
-    NEW_DELETE_SAME_AS_MALLOC_FREE;
 public:
     static PassRefPtr<GlyphPage> createForMixedFontData(GlyphPageTreeNode* owner)
     {
diff --git a/Source/core/platform/graphics/GraphicsLayer.cpp b/Source/core/platform/graphics/GraphicsLayer.cpp
index 982a1d4..ce9e4de 100644
--- a/Source/core/platform/graphics/GraphicsLayer.cpp
+++ b/Source/core/platform/graphics/GraphicsLayer.cpp
@@ -357,15 +357,8 @@
 
 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const IntRect& clip)
 {
-    if (m_client) {
-        LayoutSize offset = offsetFromRenderer();
-        context.translate(-offset);
-
-        LayoutRect clipRect(clip);
-        clipRect.move(offset);
-
-        m_client->paintContents(this, context, m_paintingPhase, pixelSnappedIntRect(clipRect));
-    }
+    if (m_client)
+        m_client->paintContents(this, context, m_paintingPhase, clip);
 }
 
 String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
diff --git a/Source/core/platform/graphics/GraphicsTypes3D.h b/Source/core/platform/graphics/GraphicsTypes3D.h
index f4f750e..d55f10f 100644
--- a/Source/core/platform/graphics/GraphicsTypes3D.h
+++ b/Source/core/platform/graphics/GraphicsTypes3D.h
@@ -27,6 +27,7 @@
 #define GraphicsTypes3D_h
 
 #include "wtf/Forward.h"
+#include <stdint.h>
 
 // GC3D types match the corresponding GL types as defined in OpenGL ES 2.0
 // header file gl2.h from khronos.org.
diff --git a/Source/core/platform/graphics/Image.cpp b/Source/core/platform/graphics/Image.cpp
index a47afaf..36a219c 100644
--- a/Source/core/platform/graphics/Image.cpp
+++ b/Source/core/platform/graphics/Image.cpp
@@ -27,18 +27,25 @@
 #include "config.h"
 #include "core/platform/graphics/Image.h"
 
-#include <math.h>
 #include "core/platform/Length.h"
 #include "core/platform/MIMETypeRegistry.h"
 #include "core/platform/SharedBuffer.h"
+#include "core/platform/chromium/TraceEvent.h"
 #include "core/platform/graphics/BitmapImage.h"
+#include "core/platform/graphics/FloatPoint.h"
+#include "core/platform/graphics/FloatRect.h"
+#include "core/platform/graphics/FloatSize.h"
 #include "core/platform/graphics/GraphicsContext.h"
 #include "core/platform/graphics/GraphicsContextStateSaver.h"
 #include "core/platform/graphics/GraphicsTypes.h"
 #include "core/platform/graphics/IntRect.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
 #include "wtf/MainThread.h"
 #include "wtf/StdLibExtras.h"
 
+#include <math.h>
+
 namespace WebCore {
 
 Image::Image(ImageObserver* observer)
@@ -57,6 +64,17 @@
     return nullImage.get();
 }
 
+PassRefPtr<Image> Image::loadPlatformResource(const char *name)
+{
+    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
+    if (resource.isEmpty())
+        return Image::nullImage();
+
+    RefPtr<Image> image = BitmapImage::create();
+    image->setData(resource, true);
+    return image.release();
+}
+
 bool Image::supportsType(const String& type)
 {
     return MIMETypeRegistry::isSupportedImageResourceMIMEType(type);
@@ -205,6 +223,14 @@
     startAnimation();
 }
 
+void Image::drawPattern(GraphicsContext* context, const FloatRect& floatSrcRect, const FloatSize& scale,
+    const FloatPoint& phase, CompositeOperator compositeOp, const FloatRect& destRect, BlendMode blendMode)
+{
+    TRACE_EVENT0("skia", "Image::drawPattern");
+    if (RefPtr<NativeImageSkia> bitmap = nativeImageForCurrentFrame())
+        bitmap->drawPattern(context, adjustForNegativeSize(floatSrcRect), scale, phase, compositeOp, destRect, blendMode);
+}
+
 void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
 {
     intrinsicRatio = size();
diff --git a/Source/core/platform/graphics/Image.h b/Source/core/platform/graphics/Image.h
index 219a4ce..21923b2 100644
--- a/Source/core/platform/graphics/Image.h
+++ b/Source/core/platform/graphics/Image.h
@@ -60,7 +60,6 @@
 public:
     virtual ~Image();
 
-    static PassRefPtr<Image> create(ImageObserver* = 0);
     static PassRefPtr<Image> loadPlatformResource(const char* name);
     static bool supportsType(const String&);
 
@@ -125,9 +124,6 @@
     static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, const Color&, CompositeOperator);
     static FloatRect adjustForNegativeSize(const FloatRect&); // A helper method for translating negative width and height values.
 
-    // FIXME (crbug.com/242060): This does not belong on Image.
-    static void paintSkBitmap(GraphicsContext*, const NativeImageSkia&, const SkRect& /*srcRect*/, const SkRect& /*destRect*/, const SkXfermode::Mode&);
-
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode) = 0;
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator, BlendMode, RespectImageOrientationEnum);
     void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize,
diff --git a/Source/core/platform/graphics/UnitBezier.h b/Source/core/platform/graphics/UnitBezier.h
index f940dc3..ad7c3a8 100644
--- a/Source/core/platform/graphics/UnitBezier.h
+++ b/Source/core/platform/graphics/UnitBezier.h
@@ -26,6 +26,7 @@
 #ifndef UnitBezier_h
 #define UnitBezier_h
 
+#include "wtf/Assertions.h"
 #include <math.h>
 
 namespace WebCore {
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
index 45eb986..3e9a705 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
@@ -195,6 +195,7 @@
     if (m_context->webContext()->isContextLost() || !m_surfaceIsValid) {
         // Attempt to recover.
         m_layer->clearTexture();
+        m_mailboxes.clear();
         RefPtr<GraphicsContext3D> sharedContext = SharedGraphicsContext3D::get();
         if (!sharedContext || sharedContext->webContext()->isContextLost()) {
             m_surfaceIsValid = false;
diff --git a/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp b/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp
index 0b6605c..d3546f6 100644
--- a/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp
+++ b/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp
@@ -97,20 +97,10 @@
 {
 }
 
-PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
+PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacter(const Font& font, UChar32 c)
 {
-    if (!length)
-        return 0;
-
-    SkUnichar skiaChar;
-    if (U16_IS_LEAD(characters[0])) {
-        ASSERT(length >= 2);
-        skiaChar = U16_GET_SUPPLEMENTARY(characters[0], characters[1]);
-    } else
-        skiaChar = characters[0];
-
     SkString skiaFamilyName;
-    if (!SkGetFallbackFamilyNameForChar(skiaChar, &skiaFamilyName) || skiaFamilyName.isEmpty())
+    if (!SkGetFallbackFamilyNameForChar(c, &skiaFamilyName) || skiaFamilyName.isEmpty())
         return 0;
     return getCachedFontData(getCachedFontPlatformData(font.fontDescription(), AtomicString(skiaFamilyName.c_str()), DoNotRetain), DoNotRetain);
 }
diff --git a/Source/core/platform/graphics/chromium/FontCacheChromiumLinux.cpp b/Source/core/platform/graphics/chromium/FontCacheChromiumLinux.cpp
index 3c73218..17d9af5 100644
--- a/Source/core/platform/graphics/chromium/FontCacheChromiumLinux.cpp
+++ b/Source/core/platform/graphics/chromium/FontCacheChromiumLinux.cpp
@@ -30,17 +30,18 @@
 #include "public/platform/linux/WebFontInfo.h"
 #include "public/platform/linux/WebSandboxSupport.h"
 #include "public/platform/Platform.h"
+#include "wtf/text/CString.h"
 
 namespace WebCore {
 
-void FontCache::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters, const char* preferredLocale, FontCache::SimpleFontFamily* family)
+void FontCache::getFontFamilyForCharacter(UChar32 c, const char* preferredLocale, FontCache::SimpleFontFamily* family)
 {
     WebKit::WebFontFamily webFamily;
     if (WebKit::Platform::current()->sandboxSupport())
-        WebKit::Platform::current()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily);
+        WebKit::Platform::current()->sandboxSupport()->getFontFamilyForCharacter(c, preferredLocale, &webFamily);
     else
-        WebKit::WebFontInfo::familyForChars(characters, numCharacters, preferredLocale, &webFamily);
-    family->name = String::fromUTF8(webFamily.name.data(), webFamily.name.length());
+        WebKit::WebFontInfo::familyForChar(c, preferredLocale, &webFamily);
+    family->name = String::fromUTF8(CString(webFamily.name));
     family->isBold = webFamily.isBold;
     family->isItalic = webFamily.isItalic;
 }
diff --git a/Source/core/platform/graphics/chromium/FontCacheChromiumWin.cpp b/Source/core/platform/graphics/chromium/FontCacheChromiumWin.cpp
index 5574b29..55f2ff1 100644
--- a/Source/core/platform/graphics/chromium/FontCacheChromiumWin.cpp
+++ b/Source/core/platform/graphics/chromium/FontCacheChromiumWin.cpp
@@ -422,15 +422,27 @@
 
 // Given the desired base font, this will create a SimpleFontData for a specific
 // font that can be used to render the given range of characters.
-PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
+PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacter(const Font& font, UChar32 inputC)
 {
+    // FIXME: We should fix getFallbackFamily to take a UChar32
+    // and remove this split-to-UChar16 code.
+    UChar codeUnits[2];
+    int codeUnitsLength;
+    if (inputC <= 0xFFFF) {
+        codeUnits[0] = inputC;
+        codeUnitsLength = 1;
+    } else {
+        codeUnits[0] = U16_LEAD(inputC);
+        codeUnits[1] = U16_TRAIL(inputC);
+        codeUnitsLength = 2;
+    }
+
     // FIXME: Consider passing fontDescription.dominantScript()
     // to GetFallbackFamily here.
     FontDescription fontDescription = font.fontDescription();
     UChar32 c;
     UScriptCode script;
-    const wchar_t* family = getFallbackFamily(characters, length,
-        fontDescription.genericFamily(), &c, &script);
+    const wchar_t* family = getFallbackFamily(codeUnits, codeUnitsLength, fontDescription.genericFamily(), &c, &script);
     FontPlatformData* data = 0;
     if (family)
         data = getCachedFontPlatformData(font.fontDescription(),  AtomicString(family, wcslen(family)), false);
diff --git a/Source/core/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp b/Source/core/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp
index 7ac1349..dc10374 100644
--- a/Source/core/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp
+++ b/Source/core/platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp
@@ -55,7 +55,7 @@
     context.setCertainlyOpaque(m_opaque);
     context.setShouldSmoothFonts(canPaintLCDText);
 
-    if (*EventTracer::getTraceCategoryEnabledFlag("blink.graphics_context_annotations"))
+    if (*EventTracer::getTraceCategoryEnabledFlag(TRACE_DISABLED_BY_DEFAULT("blink.graphics_context_annotations")))
         context.setAnnotationMode(AnnotateAll);
 
     // Record transform prior to painting, as all opaque tracking will be
diff --git a/Source/core/platform/graphics/mac/FontCacheMac.mm b/Source/core/platform/graphics/mac/FontCacheMac.mm
index 0716d41..d87f759 100644
--- a/Source/core/platform/graphics/mac/FontCacheMac.mm
+++ b/Source/core/platform/graphics/mac/FontCacheMac.mm
@@ -7,13 +7,13 @@
  * are met:
  *
  * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
+ *     notice, this list of conditions and the following disclaimer.
  * 2.  Redistributions in binary form must reproduce the above copyright
  *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
+ *     documentation and/or other materials provided with the distribution.
  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
  *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
+ *     from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -90,19 +90,31 @@
     return appKitFontWeight >= 7;
 }
 
-PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
+PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacter(const Font& font, UChar32 character)
 {
-    UChar32 character;
-    U16_GET(characters, 0, 0, length, character);
+    // FIXME: We should fix getFallbackFamily to take a UChar32
+    // and remove this split-to-UChar16 code.
+    UChar codeUnits[2];
+    int codeUnitsLength;
+    if (character <= 0xFFFF) {
+        codeUnits[0] = character;
+        codeUnitsLength = 1;
+    } else {
+        codeUnits[0] = U16_LEAD(character);
+        codeUnits[1] = U16_TRAIL(character);
+        codeUnitsLength = 2;
+    }
+
     const FontPlatformData& platformData = font.fontDataAt(0)->fontDataForCharacter(character)->platformData();
     NSFont *nsFont = platformData.font();
 
-    NSString *string = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(characters) length:length freeWhenDone:NO];
-    NSFont *substituteFont = [NSFont findFontLike:nsFont forString:string withRange:NSMakeRange(0, length) inLanguage:nil];
+    NSString *string = [[NSString alloc] initWithCharactersNoCopy:codeUnits length:codeUnitsLength freeWhenDone:NO];
+    NSFont *substituteFont = [NSFont findFontLike:nsFont forString:string withRange:NSMakeRange(0, codeUnitsLength) inLanguage:nil];
     [string release];
 
-    if (!substituteFont && length == 1)
-        substituteFont = [NSFont findFontLike:nsFont forCharacter:characters[0] inLanguage:nil];
+    // FIXME: Remove this SPI usage: http://crbug.com/255122
+    if (!substituteFont && codeUnitsLength == 1)
+        substituteFont = [NSFont findFontLike:nsFont forCharacter:codeUnits[0] inLanguage:nil];
     if (!substituteFont)
         return 0;
 
@@ -163,7 +175,7 @@
 
 PassRefPtr<SimpleFontData> FontCache::getSimilarFontPlatformData(const Font& font)
 {
-    // Attempt to find an appropriate font using a match based on 
+    // Attempt to find an appropriate font using a match based on
     // the presence of keywords in the the requested names.  For example, we'll
     // match any name that contains "Arabic" to Geeza Pro.
     RefPtr<SimpleFontData> simpleFontData;
diff --git a/Source/core/platform/graphics/mac/FontCustomPlatformData.h b/Source/core/platform/graphics/mac/FontCustomPlatformData.h
deleted file mode 100644
index a1fe50f..0000000
--- a/Source/core/platform/graphics/mac/FontCustomPlatformData.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef FontCustomPlatformData_h
-#define FontCustomPlatformData_h
-
-#include <CoreFoundation/CFBase.h>
-#include "core/platform/graphics/FontOrientation.h"
-#include "core/platform/graphics/FontWidthVariant.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-
-typedef struct CGFont* CGFontRef;
-typedef UInt32 ATSFontContainerRef;
-typedef UInt32 ATSFontRef;
-class SkTypeface;
-
-namespace WebCore {
-
-class FontPlatformData;
-class SharedBuffer;
-
-struct FontCustomPlatformData {
-    WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
-public:
-    FontCustomPlatformData(ATSFontContainerRef container, CGFontRef cgFont)
-        : m_atsContainer(container)
-        , m_cgFont(cgFont)
-        , m_typeface(0)
-    {
-    }
-
-    ~FontCustomPlatformData();
-
-    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
-
-    static bool supportsFormat(const String&);
-
-    ATSFontContainerRef m_atsContainer;
-    CGFontRef m_cgFont;
-    SkTypeface* m_typeface;
-};
-
-FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
-
-}
-
-#endif
diff --git a/Source/core/platform/graphics/mac/FontCustomPlatformData.cpp b/Source/core/platform/graphics/mac/FontCustomPlatformDataMac.cpp
similarity index 63%
rename from Source/core/platform/graphics/mac/FontCustomPlatformData.cpp
rename to Source/core/platform/graphics/mac/FontCustomPlatformDataMac.cpp
index d2b1bc9..add7003 100644
--- a/Source/core/platform/graphics/mac/FontCustomPlatformData.cpp
+++ b/Source/core/platform/graphics/mac/FontCustomPlatformDataMac.cpp
@@ -19,7 +19,7 @@
  */
 
 #include "config.h"
-#include "core/platform/graphics/mac/FontCustomPlatformData.h"
+#include "core/platform/graphics/FontCustomPlatformData.h"
 
 #include "core/platform/SharedBuffer.h"
 #include "core/platform/graphics/FontPlatformData.h"
@@ -27,47 +27,53 @@
 #include "core/platform/graphics/skia/SkiaSharedBufferStream.h"
 #include "third_party/skia/include/core/SkStream.h"
 #include "third_party/skia/include/core/SkTypeface.h"
+#include "wtf/PassOwnPtr.h"
+
 #include <ApplicationServices/ApplicationServices.h>
 
 namespace WebCore {
 
+FontCustomPlatformData::FontCustomPlatformData(CGFontRef cgFont, PassRefPtr<SkTypeface> typeface)
+    : m_cgFont(AdoptCF, cgFont)
+    , m_typeface(typeface)
+{
+}
+
 FontCustomPlatformData::~FontCustomPlatformData()
 {
-    SkSafeUnref(m_typeface);
-    CGFontRelease(m_cgFont);
 }
 
 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant widthVariant)
 {
-    return FontPlatformData(m_cgFont, size, bold, italic, orientation, widthVariant);
+    return FontPlatformData(m_cgFont.get(), size, bold, italic, orientation, widthVariant);
 }
 
-FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
+PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer)
 {
     ASSERT_ARG(buffer, buffer);
 
     OpenTypeSanitizer sanitizer(buffer);
     RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize();
     if (!transcodeBuffer)
-        return 0; // validation failed.
+        return nullptr; // validation failed.
     buffer = transcodeBuffer.get();
 
-    ATSFontContainerRef containerRef = 0;
-
-    RetainPtr<CGFontRef> cgFontRef;
-
     RetainPtr<CFDataRef> bufferData(AdoptCF, CFDataCreate(0, reinterpret_cast<const UInt8*>(buffer->data()), buffer->size()));
     RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(bufferData.get()));
-
-    cgFontRef.adoptCF(CGFontCreateWithDataProvider(dataProvider.get()));
+    RetainPtr<CGFontRef> cgFontRef(AdoptCF, CGFontCreateWithDataProvider(dataProvider.get()));
     if (!cgFontRef)
-        return 0;
+        return nullptr;
 
-    FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.leakRef());
-    SkiaSharedBufferStream* stream = new SkiaSharedBufferStream(buffer);
-    fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);
-    stream->unref();
-    return fontCustomPlatformData;
+    // It's unclear whether this is used. It seems like it has the effect of priming the cache.
+    // Since we store this anyways, it might be worthwhile just plumbing this to FontMac.cpp in
+    // a more obvious way.
+    // FIXME: Remove this, add an explicit use, or add a comment explaining why this exists.
+    RefPtr<SkiaSharedBufferStream> stream = SkiaSharedBufferStream::create(buffer);
+    RefPtr<SkTypeface> typeface = adoptRef(SkTypeface::CreateFromStream(stream.get()));
+    if (!typeface)
+        return nullptr;
+
+    return adoptPtr(new FontCustomPlatformData(cgFontRef.leakRef(), typeface.release()));
 }
 
 bool FontCustomPlatformData::supportsFormat(const String& format)
diff --git a/Source/core/platform/graphics/mac/FontMac.cpp b/Source/core/platform/graphics/mac/FontMac.cpp
index 22ce684..4072c85 100644
--- a/Source/core/platform/graphics/mac/FontMac.cpp
+++ b/Source/core/platform/graphics/mac/FontMac.cpp
@@ -109,8 +109,10 @@
         break;
     }
 
-    if (!shouldUseSmoothing() || isRunningLayoutTest())
+    if (!shouldUseSmoothing() || isRunningLayoutTest()) {
         shouldSmoothFonts = false;
+        shouldAntialias = false;
+    }
 
     const GlyphBufferGlyph* glyphs = glyphBuffer.glyphs(from);
     SkScalar x = SkFloatToScalar(point.x());
diff --git a/Source/core/platform/graphics/skia/FontCacheSkia.cpp b/Source/core/platform/graphics/skia/FontCacheSkia.cpp
index 885b9e9..2aff081 100644
--- a/Source/core/platform/graphics/skia/FontCacheSkia.cpp
+++ b/Source/core/platform/graphics/skia/FontCacheSkia.cpp
@@ -46,18 +46,18 @@
 {
 }
 
-PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacters(const Font& font, const UChar* characters, int length)
+PassRefPtr<SimpleFontData> FontCache::getFontDataForCharacter(const Font& font, UChar32 c)
 {
     icu::Locale locale = icu::Locale::getDefault();
     FontCache::SimpleFontFamily family;
-    FontCache::getFontFamilyForCharacters(characters, length, locale.getLanguage(), &family);
+    FontCache::getFontFamilyForCharacter(c, locale.getLanguage(), &family);
     if (family.name.isEmpty())
         return 0;
 
     AtomicString atomicFamily(family.name);
     // Changes weight and/or italic of given FontDescription depends on
     // the result of fontconfig so that keeping the correct font mapping
-    // of the given characters. See http://crbug.com/32109 for details.
+    // of the given character. See http://crbug.com/32109 for details.
     bool shouldSetFakeBold = false;
     bool shouldSetFakeItalic = false;
     FontDescription description(font.fontDescription());
diff --git a/Source/core/platform/graphics/skia/FontCustomPlatformData.h b/Source/core/platform/graphics/skia/FontCustomPlatformData.h
deleted file mode 100644
index 1ab29b6..0000000
--- a/Source/core/platform/graphics/skia/FontCustomPlatformData.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2007 Apple Computer, Inc.
- * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FontCustomPlatformData_h
-#define FontCustomPlatformData_h
-
-#include "core/platform/graphics/FontOrientation.h"
-#include "core/platform/graphics/FontWidthVariant.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-
-#if OS(WINDOWS)
-#include <windows.h>
-#include "wtf/text/WTFString.h"
-#elif OS(UNIX)
-#include "SkTypeface.h"
-#endif
-
-namespace WebCore {
-
-class FontPlatformData;
-class SharedBuffer;
-
-struct FontCustomPlatformData {
-    WTF_MAKE_NONCOPYABLE(FontCustomPlatformData);
-public:
-#if OS(WINDOWS)
-    FontCustomPlatformData(HANDLE fontReference, const String& name)
-        : m_fontReference(fontReference)
-        , m_name(name)
-    {}
-#elif OS(UNIX)
-    explicit FontCustomPlatformData(SkTypeface* typeface)
-        : m_fontReference(typeface)
-    {}
-#endif
-
-    ~FontCustomPlatformData();
-
-    FontPlatformData fontPlatformData(int size, bool bold, bool italic, FontOrientation = Horizontal, FontWidthVariant = RegularWidth);
-
-    static bool supportsFormat(const String&);
-
-#if OS(WINDOWS)
-    HANDLE m_fontReference;
-    String m_name;
-#elif OS(UNIX)
-    SkTypeface* m_fontReference;
-#endif
-};
-
-FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer*);
-}
-
-#endif // FontCustomPlatformData_h
diff --git a/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp b/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp
new file mode 100644
index 0000000..0794a9c
--- /dev/null
+++ b/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2007 Apple Computer, Inc.
+ * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
+ * Copyright (C) 2010 Company 100, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/graphics/FontCustomPlatformData.h"
+
+#include "core/platform/LayoutTestSupport.h"
+#include "core/platform/NotImplemented.h"
+#include "core/platform/SharedBuffer.h"
+#include "core/platform/graphics/FontPlatformData.h"
+#include "core/platform/graphics/opentype/OpenTypeSanitizer.h"
+#include "core/platform/graphics/skia/SkiaSharedBufferStream.h"
+#include "third_party/skia/include/core/SkStream.h"
+#include "third_party/skia/include/core/SkTypeface.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace WebCore {
+
+FontCustomPlatformData::FontCustomPlatformData(PassRefPtr<SkTypeface> typeface)
+    : m_typeface(typeface)
+{
+}
+
+FontCustomPlatformData::~FontCustomPlatformData()
+{
+}
+
+FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant)
+{
+    ASSERT(m_typeface);
+    return FontPlatformData(m_typeface.get(), "", size, bold && !m_typeface->isBold(), italic && !m_typeface->isItalic(), orientation);
+}
+
+PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer)
+{
+    ASSERT_ARG(buffer, buffer);
+
+    OpenTypeSanitizer sanitizer(buffer);
+    RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize();
+    if (!transcodeBuffer)
+        return nullptr; // validation failed.
+    buffer = transcodeBuffer.get();
+
+    RefPtr<SkiaSharedBufferStream> stream = SkiaSharedBufferStream::create(buffer);
+    RefPtr<SkTypeface> typeface = adoptRef(SkTypeface::CreateFromStream(stream.get()));
+    if (!typeface)
+        return nullptr;
+
+    return adoptPtr(new FontCustomPlatformData(typeface.release()));
+}
+
+bool FontCustomPlatformData::supportsFormat(const String& format)
+{
+    return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "opentype") || OpenTypeSanitizer::supportsFormat(format);
+}
+
+}
diff --git a/Source/core/platform/graphics/skia/ImageSkia.cpp b/Source/core/platform/graphics/skia/ImageSkia.cpp
deleted file mode 100644
index f5901a1..0000000
--- a/Source/core/platform/graphics/skia/ImageSkia.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * Copyright (c) 2008, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "SkBitmap.h"
-#include "SkRect.h"
-#include "SkShader.h"
-#include "core/platform/FloatConversion.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/FloatRect.h"
-#include "core/platform/graphics/GraphicsContextStateSaver.h"
-#include "core/platform/graphics/ImageObserver.h"
-#include "core/platform/graphics/chromium/DeferredImageDecoder.h"
-#include "core/platform/graphics/skia/NativeImageSkia.h"
-#include "core/platform/graphics/skia/SkiaUtils.h"
-#include "core/platform/graphics/transforms/AffineTransform.h"
-#include "wtf/text/WTFString.h"
-
-#include <math.h>
-#include <limits>
-
-#include "core/platform/chromium/TraceEvent.h"
-
-namespace WebCore {
-
-// Used by computeResamplingMode to tell how bitmaps should be resampled.
-enum ResamplingMode {
-    // Nearest neighbor resampling. Used when we detect that the page is
-    // trying to make a pattern by stretching a small bitmap very large.
-    RESAMPLE_NONE,
-
-    // Default skia resampling. Used for large growing of images where high
-    // quality resampling doesn't get us very much except a slowdown.
-    RESAMPLE_LINEAR,
-
-    // High quality resampling.
-    RESAMPLE_AWESOME,
-};
-
-static bool nearlyIntegral(float value)
-{
-    return fabs(value - floorf(value)) < std::numeric_limits<float>::epsilon();
-}
-
-static ResamplingMode computeResamplingMode(const SkMatrix& matrix, const NativeImageSkia& bitmap, float srcWidth, float srcHeight, float destWidth, float destHeight)
-{
-    // The percent change below which we will not resample. This usually means
-    // an off-by-one error on the web page, and just doing nearest neighbor
-    // sampling is usually good enough.
-    const float kFractionalChangeThreshold = 0.025f;
-
-    // Images smaller than this in either direction are considered "small" and
-    // are not resampled ever (see below).
-    const int kSmallImageSizeThreshold = 8;
-
-    // The amount an image can be stretched in a single direction before we
-    // say that it is being stretched so much that it must be a line or
-    // background that doesn't need resampling.
-    const float kLargeStretch = 3.0f;
-
-    // Figure out if we should resample this image. We try to prune out some
-    // common cases where resampling won't give us anything, since it is much
-    // slower than drawing stretched.
-    float diffWidth = fabs(destWidth - srcWidth);
-    float diffHeight = fabs(destHeight - srcHeight);
-    bool widthNearlyEqual = diffWidth < std::numeric_limits<float>::epsilon();
-    bool heightNearlyEqual = diffHeight < std::numeric_limits<float>::epsilon();
-    // We don't need to resample if the source and destination are the same.
-    if (widthNearlyEqual && heightNearlyEqual)
-        return RESAMPLE_NONE;
-
-    if (srcWidth <= kSmallImageSizeThreshold
-        || srcHeight <= kSmallImageSizeThreshold
-        || destWidth <= kSmallImageSizeThreshold
-        || destHeight <= kSmallImageSizeThreshold) {
-        // Small image detected.
-
-        // Resample in the case where the new size would be non-integral.
-        // This can cause noticeable breaks in repeating patterns, except
-        // when the source image is only one pixel wide in that dimension.
-        if ((!nearlyIntegral(destWidth) && srcWidth > 1 + std::numeric_limits<float>::epsilon())
-            || (!nearlyIntegral(destHeight) && srcHeight > 1 + std::numeric_limits<float>::epsilon()))
-            return RESAMPLE_LINEAR;
-
-        // Otherwise, don't resample small images. These are often used for
-        // borders and rules (think 1x1 images used to make lines).
-        return RESAMPLE_NONE;
-    }
-
-    if (srcHeight * kLargeStretch <= destHeight || srcWidth * kLargeStretch <= destWidth) {
-        // Large image detected.
-
-        // Don't resample if it is being stretched a lot in only one direction.
-        // This is trying to catch cases where somebody has created a border
-        // (which might be large) and then is stretching it to fill some part
-        // of the page.
-        if (widthNearlyEqual || heightNearlyEqual)
-            return RESAMPLE_NONE;
-
-        // The image is growing a lot and in more than one direction. Resampling
-        // is slow and doesn't give us very much when growing a lot.
-        return RESAMPLE_LINEAR;
-    }
-
-    if ((diffWidth / srcWidth < kFractionalChangeThreshold)
-        && (diffHeight / srcHeight < kFractionalChangeThreshold)) {
-        // It is disappointingly common on the web for image sizes to be off by
-        // one or two pixels. We don't bother resampling if the size difference
-        // is a small fraction of the original size.
-        return RESAMPLE_NONE;
-    }
-
-    // When the image is not yet done loading, use linear. We don't cache the
-    // partially resampled images, and as they come in incrementally, it causes
-    // us to have to resample the whole thing every time.
-    if (!bitmap.isDataComplete())
-        return RESAMPLE_LINEAR;
-
-    // Everything else gets resampled.
-    // High quality interpolation only enabled for scaling and translation.
-    if (!(matrix.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)))
-        return RESAMPLE_AWESOME;
-
-    return RESAMPLE_LINEAR;
-}
-
-static ResamplingMode limitResamplingMode(GraphicsContext* context, ResamplingMode resampling)
-{
-    switch (context->imageInterpolationQuality()) {
-    case InterpolationNone:
-        return RESAMPLE_NONE;
-    case InterpolationMedium:
-        // For now we treat InterpolationMedium and InterpolationLow the same.
-    case InterpolationLow:
-        if (resampling == RESAMPLE_AWESOME)
-            return RESAMPLE_LINEAR;
-        break;
-    case InterpolationHigh:
-    case InterpolationDefault:
-        break;
-    }
-
-    return resampling;
-}
-
-// Return true if the rectangle is aligned to integer boundaries.
-// See comments for computeBitmapDrawRects() for how this is used.
-static bool areBoundariesIntegerAligned(const SkRect& rect)
-{
-    // Value is 1.19209e-007. This is the tolerance threshold.
-    const float epsilon = std::numeric_limits<float>::epsilon();
-    SkIRect roundedRect = roundedIntRect(rect);
-
-    return fabs(rect.x() - roundedRect.x()) < epsilon
-        && fabs(rect.y() - roundedRect.y()) < epsilon
-        && fabs(rect.right() - roundedRect.right()) < epsilon
-        && fabs(rect.bottom() - roundedRect.bottom()) < epsilon;
-}
-
-// This function is used to scale an image and extract a scaled fragment.
-//
-// ALGORITHM
-//
-// Because the scaled image size has to be integers, we approximate the real
-// scale with the following formula (only X direction is shown):
-//
-// scaledImageWidth = round(scaleX * imageRect.width())
-// approximateScaleX = scaledImageWidth / imageRect.width()
-//
-// With this method we maintain a constant scale factor among fragments in
-// the scaled image. This allows fragments to stitch together to form the
-// full scaled image. The downside is there will be a small difference
-// between |scaleX| and |approximateScaleX|.
-//
-// A scaled image fragment is identified by:
-//
-// - Scaled image size
-// - Scaled image fragment rectangle (IntRect)
-//
-// Scaled image size has been determined and the next step is to compute the
-// rectangle for the scaled image fragment which needs to be an IntRect.
-//
-// scaledSrcRect = srcRect * (approximateScaleX, approximateScaleY)
-// enclosingScaledSrcRect = enclosingIntRect(scaledSrcRect)
-//
-// Finally we extract the scaled image fragment using
-// (scaledImageSize, enclosingScaledSrcRect).
-//
-static SkBitmap extractScaledImageFragment(const NativeImageSkia& bitmap, const SkRect& srcRect, float scaleX, float scaleY, SkRect* scaledSrcRect)
-{
-    SkISize imageSize = SkISize::Make(bitmap.bitmap().width(), bitmap.bitmap().height());
-    SkISize scaledImageSize = SkISize::Make(clampToInteger(roundf(imageSize.width() * scaleX)),
-        clampToInteger(roundf(imageSize.height() * scaleY)));
-
-    SkRect imageRect = SkRect::MakeWH(imageSize.width(), imageSize.height());
-    SkRect scaledImageRect = SkRect::MakeWH(scaledImageSize.width(), scaledImageSize.height());
-
-    SkMatrix scaleTransform;
-    scaleTransform.setRectToRect(imageRect, scaledImageRect, SkMatrix::kFill_ScaleToFit);
-    scaleTransform.mapRect(scaledSrcRect, srcRect);
-
-    scaledSrcRect->intersect(scaledImageRect);
-    SkIRect enclosingScaledSrcRect = enclosingIntRect(*scaledSrcRect);
-
-    // |enclosingScaledSrcRect| can be larger than |scaledImageSize| because
-    // of float inaccuracy so clip to get inside.
-    enclosingScaledSrcRect.intersect(SkIRect::MakeSize(scaledImageSize));
-
-    // scaledSrcRect is relative to the pixel snapped fragment we're extracting.
-    scaledSrcRect->offset(-enclosingScaledSrcRect.x(), -enclosingScaledSrcRect.y());
-
-    return bitmap.resizedBitmap(scaledImageSize, enclosingScaledSrcRect);
-}
-
-// This does a lot of computation to resample only the portion of the bitmap
-// that will only be drawn. This is critical for performance since when we are
-// scrolling, for example, we are only drawing a small strip of the image.
-// Resampling the whole image every time is very slow, so this speeds up things
-// dramatically.
-//
-// Note: this code is only used when the canvas transformation is limited to
-// scaling or translation.
-static void drawResampledBitmap(GraphicsContext* context, SkPaint& paint, const NativeImageSkia& bitmap, const SkRect& srcRect, const SkRect& destRect)
-{
-    TRACE_EVENT0("skia", "drawResampledBitmap");
-    // We want to scale |destRect| with transformation in the canvas to obtain
-    // the final scale. The final scale is a combination of scale transform
-    // in canvas and explicit scaling (srcRect and destRect).
-    SkRect screenRect;
-    context->getTotalMatrix().mapRect(&screenRect, destRect);
-    float realScaleX = screenRect.width() / srcRect.width();
-    float realScaleY = screenRect.height() / srcRect.height();
-
-    // This part of code limits scaling only to visible portion in the
-    SkRect destRectVisibleSubset;
-    ClipRectToCanvas(context, destRect, &destRectVisibleSubset);
-
-    // ClipRectToCanvas often overshoots, resulting in a larger region than our
-    // original destRect. Intersecting gets us back inside.
-    if (!destRectVisibleSubset.intersect(destRect))
-        return; // Nothing visible in destRect.
-
-    // Find the corresponding rect in the source image.
-    SkMatrix destToSrcTransform;
-    SkRect srcRectVisibleSubset;
-    destToSrcTransform.setRectToRect(destRect, srcRect, SkMatrix::kFill_ScaleToFit);
-    destToSrcTransform.mapRect(&srcRectVisibleSubset, destRectVisibleSubset);
-
-    SkRect scaledSrcRect;
-    SkBitmap scaledImageFragment = extractScaledImageFragment(bitmap, srcRectVisibleSubset, realScaleX, realScaleY, &scaledSrcRect);
-
-    context->drawBitmapRect(scaledImageFragment, &scaledSrcRect, destRectVisibleSubset, &paint);
-}
-
-static bool hasNon90rotation(GraphicsContext* context)
-{
-    return !context->getTotalMatrix().rectStaysRect();
-}
-
-void Image::paintSkBitmap(GraphicsContext* context, const NativeImageSkia& bitmap, const SkRect& srcRect, const SkRect& destRect, const SkXfermode::Mode& compOp)
-{
-    TRACE_EVENT0("skia", "paintSkBitmap");
-    SkPaint paint;
-    paint.setXfermodeMode(compOp);
-    paint.setAlpha(context->getNormalizedAlpha());
-    paint.setLooper(context->drawLooper());
-    // only antialias if we're rotated or skewed
-    paint.setAntiAlias(hasNon90rotation(context));
-
-    ResamplingMode resampling;
-    if (context->isAccelerated())
-        resampling = RESAMPLE_LINEAR;
-    else if (context->printing())
-        resampling = RESAMPLE_NONE;
-    else {
-        // Take into account scale applied to the canvas when computing sampling mode (e.g. CSS scale or page scale).
-        SkRect destRectTarget = destRect;
-        if (!(context->getTotalMatrix().getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)))
-            context->getTotalMatrix().mapRect(&destRectTarget, destRect);
-
-        resampling = computeResamplingMode(context->getTotalMatrix(), bitmap,
-            SkScalarToFloat(srcRect.width()), SkScalarToFloat(srcRect.height()),
-            SkScalarToFloat(destRectTarget.width()), SkScalarToFloat(destRectTarget.height()));
-    }
-
-    if (resampling == RESAMPLE_NONE) {
-        // FIXME: This is to not break tests (it results in the filter bitmap flag
-        // being set to true). We need to decide if we respect RESAMPLE_NONE
-        // being returned from computeResamplingMode.
-        resampling = RESAMPLE_LINEAR;
-    }
-    resampling = limitResamplingMode(context, resampling);
-    paint.setFilterBitmap(resampling == RESAMPLE_LINEAR);
-
-    // FIXME: Bicubic filtering in Skia is only applied to defer-decoded images
-    // as an experiment. Once this filtering code path becomes stable we should
-    // turn this on for all cases, including non-defer-decoded images.
-    bool useBicubicFilter = resampling == RESAMPLE_AWESOME
-        && DeferredImageDecoder::isLazyDecoded(bitmap.bitmap());
-    if (useBicubicFilter)
-        paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
-
-    if (resampling == RESAMPLE_AWESOME && !useBicubicFilter) {
-        // Resample the image and then draw the result to canvas with bilinear
-        // filtering.
-        drawResampledBitmap(context, paint, bitmap, srcRect, destRect);
-    } else {
-        // We want to filter it if we decided to do interpolation above, or if
-        // there is something interesting going on with the matrix (like a rotation).
-        // Note: for serialization, we will want to subset the bitmap first so we
-        // don't send extra pixels.
-        context->drawBitmapRect(bitmap.bitmap(), &srcRect, destRect, &paint);
-    }
-    context->didDrawRect(destRect, paint, &bitmap.bitmap());
-}
-
-bool FrameData::clear(bool clearMetadata)
-{
-    if (clearMetadata)
-        m_haveMetadata = false;
-
-    m_orientation = DefaultImageOrientation;
-
-    if (m_frame) {
-        m_frame.clear();
-
-        return true;
-    }
-    return false;
-}
-
-void Image::drawPattern(GraphicsContext* context,
-                        const FloatRect& floatSrcRect,
-                        const FloatSize& scale,
-                        const FloatPoint& phase,
-                        CompositeOperator compositeOp,
-                        const FloatRect& destRect,
-                        BlendMode blendMode)
-{
-    TRACE_EVENT0("skia", "Image::drawPattern");
-    RefPtr<NativeImageSkia> bitmap = nativeImageForCurrentFrame();
-    if (!bitmap)
-        return;
-
-    FloatRect normSrcRect = adjustForNegativeSize(floatSrcRect);
-    normSrcRect.intersect(FloatRect(0, 0, bitmap->bitmap().width(), bitmap->bitmap().height()));
-    if (destRect.isEmpty() || normSrcRect.isEmpty())
-        return; // nothing to draw
-
-    SkMatrix totalMatrix = context->getTotalMatrix();
-    SkScalar ctmScaleX = totalMatrix.getScaleX();
-    SkScalar ctmScaleY = totalMatrix.getScaleY();
-    totalMatrix.preScale(scale.width(), scale.height());
-
-    // Figure out what size the bitmap will be in the destination. The
-    // destination rect is the bounds of the pattern, we need to use the
-    // matrix to see how big it will be.
-    SkRect destRectTarget;
-    totalMatrix.mapRect(&destRectTarget, normSrcRect);
-
-    float destBitmapWidth = SkScalarToFloat(destRectTarget.width());
-    float destBitmapHeight = SkScalarToFloat(destRectTarget.height());
-
-    // Compute the resampling mode.
-    ResamplingMode resampling;
-    if (context->isAccelerated() || context->printing())
-        resampling = RESAMPLE_LINEAR;
-    else
-        resampling = computeResamplingMode(totalMatrix, *bitmap, normSrcRect.width(), normSrcRect.height(), destBitmapWidth, destBitmapHeight);
-    resampling = limitResamplingMode(context, resampling);
-
-    SkMatrix shaderTransform;
-    RefPtr<SkShader> shader;
-
-    // Bicubic filter is only applied to defer-decoded images, see
-    // paintSkBitmap() for details.
-    bool useBicubicFilter = resampling == RESAMPLE_AWESOME
-        && DeferredImageDecoder::isLazyDecoded(bitmap->bitmap());
-
-    if (resampling == RESAMPLE_AWESOME && !useBicubicFilter) {
-        // Do nice resampling.
-        float scaleX = destBitmapWidth / normSrcRect.width();
-        float scaleY = destBitmapHeight / normSrcRect.height();
-        SkRect scaledSrcRect;
-
-        // The image fragment generated here is not exactly what is
-        // requested. The scale factor used is approximated and image
-        // fragment is slightly larger to align to integer
-        // boundaries.
-        SkBitmap resampled = extractScaledImageFragment(*bitmap, normSrcRect, scaleX, scaleY, &scaledSrcRect);
-        shader = adoptRef(SkShader::CreateBitmapShader(resampled, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
-
-        // Since we just resized the bitmap, we need to remove the scale
-        // applied to the pixels in the bitmap shader. This means we need
-        // CTM * shaderTransform to have identity scale. Since we
-        // can't modify CTM (or the rectangle will be drawn in the wrong
-        // place), we must set shaderTransform's scale to the inverse of
-        // CTM scale.
-        shaderTransform.setScale(ctmScaleX ? 1 / ctmScaleX : 1, ctmScaleY ? 1 / ctmScaleY : 1);
-    } else {
-        // No need to resample before drawing.
-        SkBitmap srcSubset;
-        bitmap->bitmap().extractSubset(&srcSubset, enclosingIntRect(normSrcRect));
-        shader = adoptRef(SkShader::CreateBitmapShader(srcSubset, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
-        // Because no resizing occurred, the shader transform should be
-        // set to the pattern's transform, which just includes scale.
-        shaderTransform.setScale(scale.width(), scale.height());
-    }
-
-    // We also need to translate it such that the origin of the pattern is the
-    // origin of the destination rect, which is what WebKit expects. Skia uses
-    // the coordinate system origin as the base for the pattern. If WebKit wants
-    // a shifted image, it will shift it from there using the shaderTransform.
-    float adjustedX = phase.x() + normSrcRect.x() * scale.width();
-    float adjustedY = phase.y() + normSrcRect.y() * scale.height();
-    shaderTransform.postTranslate(SkFloatToScalar(adjustedX), SkFloatToScalar(adjustedY));
-    shader->setLocalMatrix(shaderTransform);
-
-    SkPaint paint;
-    paint.setShader(shader.get());
-    paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
-
-    paint.setFilterBitmap(resampling == RESAMPLE_LINEAR);
-    if (useBicubicFilter)
-        paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
-
-    context->drawRect(destRect, paint);
-}
-
-} // namespace WebCore
diff --git a/Source/core/platform/graphics/skia/NativeImageSkia.cpp b/Source/core/platform/graphics/skia/NativeImageSkia.cpp
index d521c25..8e67530 100644
--- a/Source/core/platform/graphics/skia/NativeImageSkia.cpp
+++ b/Source/core/platform/graphics/skia/NativeImageSkia.cpp
@@ -29,16 +29,229 @@
  */
 
 #include "config.h"
-
-#include "skia/ext/image_operations.h"
-
-#include "core/platform/PlatformInstrumentation.h"
 #include "core/platform/graphics/skia/NativeImageSkia.h"
 
+#include "core/platform/PlatformInstrumentation.h"
+#include "core/platform/chromium/TraceEvent.h"
+#include "core/platform/graphics/FloatPoint.h"
+#include "core/platform/graphics/FloatRect.h"
+#include "core/platform/graphics/FloatSize.h"
+#include "core/platform/graphics/GraphicsContext.h"
+#include "core/platform/graphics/Image.h"
 #include "core/platform/graphics/chromium/DeferredImageDecoder.h"
+#include "core/platform/graphics/skia/SkiaUtils.h"
+#include "skia/ext/image_operations.h"
+#include "third_party/skia/include/core/SkMatrix.h"
+#include "third_party/skia/include/core/SkPaint.h"
+#include "third_party/skia/include/core/SkScalar.h"
+#include "third_party/skia/include/core/SkShader.h"
+
+#include <limits>
+#include <math.h>
 
 namespace WebCore {
 
+static bool nearlyIntegral(float value)
+{
+    return fabs(value - floorf(value)) < std::numeric_limits<float>::epsilon();
+}
+
+ResamplingMode NativeImageSkia::computeResamplingMode(const SkMatrix& matrix, float srcWidth, float srcHeight, float destWidth, float destHeight) const
+{
+    // The percent change below which we will not resample. This usually means
+    // an off-by-one error on the web page, and just doing nearest neighbor
+    // sampling is usually good enough.
+    const float kFractionalChangeThreshold = 0.025f;
+
+    // Images smaller than this in either direction are considered "small" and
+    // are not resampled ever (see below).
+    const int kSmallImageSizeThreshold = 8;
+
+    // The amount an image can be stretched in a single direction before we
+    // say that it is being stretched so much that it must be a line or
+    // background that doesn't need resampling.
+    const float kLargeStretch = 3.0f;
+
+    // Figure out if we should resample this image. We try to prune out some
+    // common cases where resampling won't give us anything, since it is much
+    // slower than drawing stretched.
+    float diffWidth = fabs(destWidth - srcWidth);
+    float diffHeight = fabs(destHeight - srcHeight);
+    bool widthNearlyEqual = diffWidth < std::numeric_limits<float>::epsilon();
+    bool heightNearlyEqual = diffHeight < std::numeric_limits<float>::epsilon();
+    // We don't need to resample if the source and destination are the same.
+    if (widthNearlyEqual && heightNearlyEqual)
+        return NoResampling;
+
+    if (srcWidth <= kSmallImageSizeThreshold
+        || srcHeight <= kSmallImageSizeThreshold
+        || destWidth <= kSmallImageSizeThreshold
+        || destHeight <= kSmallImageSizeThreshold) {
+        // Small image detected.
+
+        // Resample in the case where the new size would be non-integral.
+        // This can cause noticeable breaks in repeating patterns, except
+        // when the source image is only one pixel wide in that dimension.
+        if ((!nearlyIntegral(destWidth) && srcWidth > 1 + std::numeric_limits<float>::epsilon())
+            || (!nearlyIntegral(destHeight) && srcHeight > 1 + std::numeric_limits<float>::epsilon()))
+            return LinearResampling;
+
+        // Otherwise, don't resample small images. These are often used for
+        // borders and rules (think 1x1 images used to make lines).
+        return NoResampling;
+    }
+
+    if (srcHeight * kLargeStretch <= destHeight || srcWidth * kLargeStretch <= destWidth) {
+        // Large image detected.
+
+        // Don't resample if it is being stretched a lot in only one direction.
+        // This is trying to catch cases where somebody has created a border
+        // (which might be large) and then is stretching it to fill some part
+        // of the page.
+        if (widthNearlyEqual || heightNearlyEqual)
+            return NoResampling;
+
+        // The image is growing a lot and in more than one direction. Resampling
+        // is slow and doesn't give us very much when growing a lot.
+        return LinearResampling;
+    }
+
+    if ((diffWidth / srcWidth < kFractionalChangeThreshold)
+        && (diffHeight / srcHeight < kFractionalChangeThreshold)) {
+        // It is disappointingly common on the web for image sizes to be off by
+        // one or two pixels. We don't bother resampling if the size difference
+        // is a small fraction of the original size.
+        return NoResampling;
+    }
+
+    // When the image is not yet done loading, use linear. We don't cache the
+    // partially resampled images, and as they come in incrementally, it causes
+    // us to have to resample the whole thing every time.
+    if (!isDataComplete())
+        return LinearResampling;
+
+    // Everything else gets resampled.
+    // High quality interpolation only enabled for scaling and translation.
+    if (!(matrix.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)))
+        return AwesomeResampling;
+
+    return LinearResampling;
+}
+
+static ResamplingMode limitResamplingMode(GraphicsContext* context, ResamplingMode resampling)
+{
+    switch (context->imageInterpolationQuality()) {
+    case InterpolationNone:
+        return NoResampling;
+    case InterpolationMedium:
+        // For now we treat InterpolationMedium and InterpolationLow the same.
+    case InterpolationLow:
+        if (resampling == AwesomeResampling)
+            return LinearResampling;
+        break;
+    case InterpolationHigh:
+    case InterpolationDefault:
+        break;
+    }
+
+    return resampling;
+}
+
+// This function is used to scale an image and extract a scaled fragment.
+//
+// ALGORITHM
+//
+// Because the scaled image size has to be integers, we approximate the real
+// scale with the following formula (only X direction is shown):
+//
+// scaledImageWidth = round(scaleX * imageRect.width())
+// approximateScaleX = scaledImageWidth / imageRect.width()
+//
+// With this method we maintain a constant scale factor among fragments in
+// the scaled image. This allows fragments to stitch together to form the
+// full scaled image. The downside is there will be a small difference
+// between |scaleX| and |approximateScaleX|.
+//
+// A scaled image fragment is identified by:
+//
+// - Scaled image size
+// - Scaled image fragment rectangle (IntRect)
+//
+// Scaled image size has been determined and the next step is to compute the
+// rectangle for the scaled image fragment which needs to be an IntRect.
+//
+// scaledSrcRect = srcRect * (approximateScaleX, approximateScaleY)
+// enclosingScaledSrcRect = enclosingIntRect(scaledSrcRect)
+//
+// Finally we extract the scaled image fragment using
+// (scaledImageSize, enclosingScaledSrcRect).
+//
+SkBitmap NativeImageSkia::extractScaledImageFragment(const SkRect& srcRect, float scaleX, float scaleY, SkRect* scaledSrcRect) const
+{
+    SkISize imageSize = SkISize::Make(bitmap().width(), bitmap().height());
+    SkISize scaledImageSize = SkISize::Make(clampToInteger(roundf(imageSize.width() * scaleX)),
+        clampToInteger(roundf(imageSize.height() * scaleY)));
+
+    SkRect imageRect = SkRect::MakeWH(imageSize.width(), imageSize.height());
+    SkRect scaledImageRect = SkRect::MakeWH(scaledImageSize.width(), scaledImageSize.height());
+
+    SkMatrix scaleTransform;
+    scaleTransform.setRectToRect(imageRect, scaledImageRect, SkMatrix::kFill_ScaleToFit);
+    scaleTransform.mapRect(scaledSrcRect, srcRect);
+
+    scaledSrcRect->intersect(scaledImageRect);
+    SkIRect enclosingScaledSrcRect = enclosingIntRect(*scaledSrcRect);
+
+    // |enclosingScaledSrcRect| can be larger than |scaledImageSize| because
+    // of float inaccuracy so clip to get inside.
+    enclosingScaledSrcRect.intersect(SkIRect::MakeSize(scaledImageSize));
+
+    // scaledSrcRect is relative to the pixel snapped fragment we're extracting.
+    scaledSrcRect->offset(-enclosingScaledSrcRect.x(), -enclosingScaledSrcRect.y());
+
+    return resizedBitmap(scaledImageSize, enclosingScaledSrcRect);
+}
+
+// This does a lot of computation to resample only the portion of the bitmap
+// that will only be drawn. This is critical for performance since when we are
+// scrolling, for example, we are only drawing a small strip of the image.
+// Resampling the whole image every time is very slow, so this speeds up things
+// dramatically.
+//
+// Note: this code is only used when the canvas transformation is limited to
+// scaling or translation.
+void NativeImageSkia::drawResampledBitmap(GraphicsContext* context, SkPaint& paint, const SkRect& srcRect, const SkRect& destRect) const
+{
+    TRACE_EVENT0("skia", "drawResampledBitmap");
+    // We want to scale |destRect| with transformation in the canvas to obtain
+    // the final scale. The final scale is a combination of scale transform
+    // in canvas and explicit scaling (srcRect and destRect).
+    SkRect screenRect;
+    context->getTotalMatrix().mapRect(&screenRect, destRect);
+    float realScaleX = screenRect.width() / srcRect.width();
+    float realScaleY = screenRect.height() / srcRect.height();
+
+    // This part of code limits scaling only to visible portion in the
+    SkRect destRectVisibleSubset;
+    ClipRectToCanvas(context, destRect, &destRectVisibleSubset);
+
+    // ClipRectToCanvas often overshoots, resulting in a larger region than our
+    // original destRect. Intersecting gets us back inside.
+    if (!destRectVisibleSubset.intersect(destRect))
+        return; // Nothing visible in destRect.
+
+    // Find the corresponding rect in the source image.
+    SkMatrix destToSrcTransform;
+    SkRect srcRectVisibleSubset;
+    destToSrcTransform.setRectToRect(destRect, srcRect, SkMatrix::kFill_ScaleToFit);
+    destToSrcTransform.mapRect(&srcRectVisibleSubset, destRectVisibleSubset);
+
+    SkRect scaledSrcRect;
+    SkBitmap scaledImageFragment = extractScaledImageFragment(srcRectVisibleSubset, realScaleX, realScaleY, &scaledSrcRect);
+
+    context->drawBitmapRect(scaledImageFragment, &scaledSrcRect, destRectVisibleSubset, &paint);
+}
+
 NativeImageSkia::NativeImageSkia()
     : m_resolutionScale(1)
     , m_resizeRequests(0)
@@ -102,6 +315,161 @@
     return resizedSubset;
 }
 
+static bool hasNon90rotation(GraphicsContext* context)
+{
+    return !context->getTotalMatrix().rectStaysRect();
+}
+
+void NativeImageSkia::draw(GraphicsContext* context, const SkRect& srcRect, const SkRect& destRect, SkXfermode::Mode compOp) const
+{
+    TRACE_EVENT0("skia", "NativeImageSkia::draw");
+    SkPaint paint;
+    paint.setXfermodeMode(compOp);
+    paint.setAlpha(context->getNormalizedAlpha());
+    paint.setLooper(context->drawLooper());
+    // only antialias if we're rotated or skewed
+    paint.setAntiAlias(hasNon90rotation(context));
+
+    ResamplingMode resampling;
+    if (context->isAccelerated()) {
+        resampling = LinearResampling;
+    } else if (context->printing()) {
+        resampling = NoResampling;
+    } else {
+        // Take into account scale applied to the canvas when computing sampling mode (e.g. CSS scale or page scale).
+        SkRect destRectTarget = destRect;
+        if (!(context->getTotalMatrix().getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)))
+            context->getTotalMatrix().mapRect(&destRectTarget, destRect);
+
+        resampling = computeResamplingMode(context->getTotalMatrix(),
+            SkScalarToFloat(srcRect.width()), SkScalarToFloat(srcRect.height()),
+            SkScalarToFloat(destRectTarget.width()), SkScalarToFloat(destRectTarget.height()));
+    }
+
+    if (resampling == NoResampling) {
+        // FIXME: This is to not break tests (it results in the filter bitmap flag
+        // being set to true). We need to decide if we respect NoResampling
+        // being returned from computeResamplingMode.
+        resampling = LinearResampling;
+    }
+    resampling = limitResamplingMode(context, resampling);
+    paint.setFilterBitmap(resampling == LinearResampling);
+
+    // FIXME: Bicubic filtering in Skia is only applied to defer-decoded images
+    // as an experiment. Once this filtering code path becomes stable we should
+    // turn this on for all cases, including non-defer-decoded images.
+    bool useBicubicFilter = resampling == AwesomeResampling
+        && DeferredImageDecoder::isLazyDecoded(bitmap());
+    if (useBicubicFilter)
+        paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
+
+    if (resampling == AwesomeResampling && !useBicubicFilter) {
+        // Resample the image and then draw the result to canvas with bilinear
+        // filtering.
+        drawResampledBitmap(context, paint, srcRect, destRect);
+    } else {
+        // We want to filter it if we decided to do interpolation above, or if
+        // there is something interesting going on with the matrix (like a rotation).
+        // Note: for serialization, we will want to subset the bitmap first so we
+        // don't send extra pixels.
+        context->drawBitmapRect(bitmap(), &srcRect, destRect, &paint);
+    }
+    context->didDrawRect(destRect, paint, &bitmap());
+}
+
+void NativeImageSkia::drawPattern(
+    GraphicsContext* context,
+    const FloatRect& floatSrcRect,
+    const FloatSize& scale,
+    const FloatPoint& phase,
+    CompositeOperator compositeOp,
+    const FloatRect& destRect,
+    BlendMode blendMode) const
+{
+    FloatRect normSrcRect = floatSrcRect;
+    normSrcRect.intersect(FloatRect(0, 0, bitmap().width(), bitmap().height()));
+    if (destRect.isEmpty() || normSrcRect.isEmpty())
+        return; // nothing to draw
+
+    SkMatrix totalMatrix = context->getTotalMatrix();
+    SkScalar ctmScaleX = totalMatrix.getScaleX();
+    SkScalar ctmScaleY = totalMatrix.getScaleY();
+    totalMatrix.preScale(scale.width(), scale.height());
+
+    // Figure out what size the bitmap will be in the destination. The
+    // destination rect is the bounds of the pattern, we need to use the
+    // matrix to see how big it will be.
+    SkRect destRectTarget;
+    totalMatrix.mapRect(&destRectTarget, normSrcRect);
+
+    float destBitmapWidth = SkScalarToFloat(destRectTarget.width());
+    float destBitmapHeight = SkScalarToFloat(destRectTarget.height());
+
+    // Compute the resampling mode.
+    ResamplingMode resampling;
+    if (context->isAccelerated() || context->printing())
+        resampling = LinearResampling;
+    else
+        resampling = computeResamplingMode(totalMatrix, normSrcRect.width(), normSrcRect.height(), destBitmapWidth, destBitmapHeight);
+    resampling = limitResamplingMode(context, resampling);
+
+    SkMatrix shaderTransform;
+    RefPtr<SkShader> shader;
+
+    // Bicubic filter is only applied to defer-decoded images, see
+    // NativeImageSkia::draw for details.
+    bool useBicubicFilter = resampling == AwesomeResampling && DeferredImageDecoder::isLazyDecoded(bitmap());
+
+    if (resampling == AwesomeResampling && !useBicubicFilter) {
+        // Do nice resampling.
+        float scaleX = destBitmapWidth / normSrcRect.width();
+        float scaleY = destBitmapHeight / normSrcRect.height();
+        SkRect scaledSrcRect;
+
+        // The image fragment generated here is not exactly what is
+        // requested. The scale factor used is approximated and image
+        // fragment is slightly larger to align to integer
+        // boundaries.
+        SkBitmap resampled = extractScaledImageFragment(normSrcRect, scaleX, scaleY, &scaledSrcRect);
+        shader = adoptRef(SkShader::CreateBitmapShader(resampled, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
+
+        // Since we just resized the bitmap, we need to remove the scale
+        // applied to the pixels in the bitmap shader. This means we need
+        // CTM * shaderTransform to have identity scale. Since we
+        // can't modify CTM (or the rectangle will be drawn in the wrong
+        // place), we must set shaderTransform's scale to the inverse of
+        // CTM scale.
+        shaderTransform.setScale(ctmScaleX ? 1 / ctmScaleX : 1, ctmScaleY ? 1 / ctmScaleY : 1);
+    } else {
+        // No need to resample before drawing.
+        SkBitmap srcSubset;
+        bitmap().extractSubset(&srcSubset, enclosingIntRect(normSrcRect));
+        shader = adoptRef(SkShader::CreateBitmapShader(srcSubset, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
+        // Because no resizing occurred, the shader transform should be
+        // set to the pattern's transform, which just includes scale.
+        shaderTransform.setScale(scale.width(), scale.height());
+    }
+
+    // We also need to translate it such that the origin of the pattern is the
+    // origin of the destination rect, which is what WebKit expects. Skia uses
+    // the coordinate system origin as the base for the pattern. If WebKit wants
+    // a shifted image, it will shift it from there using the shaderTransform.
+    float adjustedX = phase.x() + normSrcRect.x() * scale.width();
+    float adjustedY = phase.y() + normSrcRect.y() * scale.height();
+    shaderTransform.postTranslate(SkFloatToScalar(adjustedX), SkFloatToScalar(adjustedY));
+    shader->setLocalMatrix(shaderTransform);
+
+    SkPaint paint;
+    paint.setShader(shader.get());
+    paint.setXfermodeMode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode));
+
+    paint.setFilterBitmap(resampling == LinearResampling);
+    if (useBicubicFilter)
+        paint.setFilterLevel(SkPaint::kHigh_FilterLevel);
+
+    context->drawRect(destRect, paint);
+}
+
 bool NativeImageSkia::shouldCacheResampling(const SkISize& scaledImageSize, const SkIRect& scaledImageSubset) const
 {
     // Check whether the requested dimensions match previous request.
diff --git a/Source/core/platform/graphics/skia/NativeImageSkia.h b/Source/core/platform/graphics/skia/NativeImageSkia.h
index 0838c0e..6ca9e55 100644
--- a/Source/core/platform/graphics/skia/NativeImageSkia.h
+++ b/Source/core/platform/graphics/skia/NativeImageSkia.h
@@ -34,12 +34,36 @@
 #include "SkBitmap.h"
 #include "SkRect.h"
 #include "SkSize.h"
+#include "SkXfermode.h"
+#include "core/platform/graphics/GraphicsTypes.h"
 #include "wtf/Forward.h"
 #include "wtf/PassRefPtr.h"
 #include "wtf/RefCounted.h"
 
+class SkMatrix;
+class SkPaint;
+
 namespace WebCore {
 
+class FloatPoint;
+class FloatRect;
+class FloatSize;
+class GraphicsContext;
+
+// Used by computeResamplingMode to tell how bitmaps should be resampled.
+enum ResamplingMode {
+    // Nearest neighbor resampling. Used when we detect that the page is
+    // trying to make a pattern by stretching a small bitmap very large.
+    NoResampling,
+
+    // Default skia resampling. Used for large growing of images where high
+    // quality resampling doesn't get us very much except a slowdown.
+    LinearResampling,
+
+    // High quality resampling.
+    AwesomeResampling,
+};
+
 // This object is used as the "native image" in our port. When WebKit uses
 // PassNativeImagePtr / NativeImagePtr, it is a smart pointer to this type.
 // It has an SkBitmap, and also stores a cached resized image.
@@ -102,6 +126,16 @@
     // Rectangle of the subset in the scaled image.
     SkBitmap resizedBitmap(const SkISize& scaledImageSize, const SkIRect& scaledImageSubset) const;
 
+    void draw(GraphicsContext*, const SkRect& srcRect, const SkRect& destRect, SkXfermode::Mode) const;
+    void drawPattern(
+        GraphicsContext*,
+        const FloatRect& srcRect,
+        const FloatSize& scale,
+        const FloatPoint& phase,
+        CompositeOperator,
+        const FloatRect& destRect,
+        BlendMode) const;
+
 private:
     NativeImageSkia();
 
@@ -138,6 +172,10 @@
     // entire thing, it's best to just do it up front.
     bool shouldCacheResampling(const SkISize& scaledImageSize, const SkIRect& scaledImageSubset) const;
 
+    ResamplingMode computeResamplingMode(const SkMatrix&, float srcWidth, float srcHeight, float destWidth, float destHeight) const;
+    SkBitmap extractScaledImageFragment(const SkRect& srcRect, float scaleX, float scaleY, SkRect* scaledSrcRect) const;
+    void drawResampledBitmap(GraphicsContext*, SkPaint&, const SkRect& srcRect, const SkRect& destRect) const;
+
     // The original image.
     SkBitmap m_image;
     float m_resolutionScale;
diff --git a/Source/core/platform/graphics/skia/SkiaSharedBufferStream.h b/Source/core/platform/graphics/skia/SkiaSharedBufferStream.h
index 8e19b40..4ffe203 100644
--- a/Source/core/platform/graphics/skia/SkiaSharedBufferStream.h
+++ b/Source/core/platform/graphics/skia/SkiaSharedBufferStream.h
@@ -31,17 +31,18 @@
 #ifndef SkiaSharedBufferStream_h
 #define SkiaSharedBufferStream_h
 
-#include "third_party/skia/include/core/SkStream.h"
 #include "core/platform/SharedBuffer.h"
+#include "third_party/skia/include/core/SkStream.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
 
 namespace WebCore {
 
 class SkiaSharedBufferStream : public SkStreamAsset {
 public:
-    explicit SkiaSharedBufferStream(PassRefPtr<SharedBuffer> buffer)
-        : m_buffer(buffer)
-        , m_offset(0)
+    static PassRefPtr<SkiaSharedBufferStream> create(PassRefPtr<SharedBuffer> buffer)
     {
+        return adoptRef(new SkiaSharedBufferStream(buffer));
     }
 
     virtual ~SkiaSharedBufferStream()
@@ -64,6 +65,12 @@
     virtual const void* getMemoryBase() OVERRIDE;
 
 private:
+    explicit SkiaSharedBufferStream(PassRefPtr<SharedBuffer> buffer)
+        : m_buffer(buffer)
+        , m_offset(0)
+    {
+    }
+
     RefPtr<SharedBuffer> m_buffer;
     size_t m_offset;
 };
diff --git a/Source/core/platform/graphics/transforms/TranslateTransformOperation.cpp b/Source/core/platform/graphics/transforms/TranslateTransformOperation.cpp
index 5e5404f..ba53b87 100644
--- a/Source/core/platform/graphics/transforms/TranslateTransformOperation.cpp
+++ b/Source/core/platform/graphics/transforms/TranslateTransformOperation.cpp
@@ -29,15 +29,14 @@
     if (from && !from->isSameType(*this))
         return this;
 
+    const Length zeroLength(0, Fixed);
     if (blendToIdentity)
-        return TranslateTransformOperation::create(Length(m_x.type()).blend(m_x, progress),
-                                                   Length(m_y.type()).blend(m_y, progress),
-                                                   Length(m_z.type()).blend(m_z, progress), m_type);
+        return TranslateTransformOperation::create(zeroLength.blend(m_x, progress), zeroLength.blend(m_y, progress), zeroLength.blend(m_z, progress), m_type);
 
     const TranslateTransformOperation* fromOp = static_cast<const TranslateTransformOperation*>(from);
-    Length fromX = fromOp ? fromOp->m_x : Length(m_x.type());
-    Length fromY = fromOp ? fromOp->m_y : Length(m_y.type());
-    Length fromZ = fromOp ? fromOp->m_z : Length(m_z.type());
+    Length fromX = fromOp ? fromOp->m_x : zeroLength;
+    Length fromY = fromOp ? fromOp->m_y : zeroLength;
+    Length fromZ = fromOp ? fromOp->m_z : zeroLength;
     return TranslateTransformOperation::create(m_x.blend(fromX, progress), m_y.blend(fromY, progress), m_z.blend(fromZ, progress), m_type);
 }
 
diff --git a/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp b/Source/core/platform/graphics/win/FontCustomPlatformDataWin.cpp
similarity index 73%
rename from Source/core/platform/graphics/skia/FontCustomPlatformData.cpp
rename to Source/core/platform/graphics/win/FontCustomPlatformDataWin.cpp
index 353a990..004b9e2 100644
--- a/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp
+++ b/Source/core/platform/graphics/win/FontCustomPlatformDataWin.cpp
@@ -1,7 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Computer, Inc.
- * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved.
- * Copyright (C) 2010 Company 100, Inc.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -31,42 +29,52 @@
  */
 
 #include "config.h"
-#include "core/platform/graphics/skia/FontCustomPlatformData.h"
-
-#if OS(WINDOWS)
-#include "core/platform/graphics/opentype/OpenTypeUtilities.h"
-#elif OS(UNIX)
-#include "third_party/skia/include/core/SkStream.h"
-#include "core/platform/graphics/skia/SkiaSharedBufferStream.h"
-#endif
+#include "core/platform/graphics/FontCustomPlatformData.h"
 
 #include "core/platform/LayoutTestSupport.h"
 #include "core/platform/NotImplemented.h"
 #include "core/platform/SharedBuffer.h"
 #include "core/platform/graphics/FontPlatformData.h"
 #include "core/platform/graphics/opentype/OpenTypeSanitizer.h"
-
-#if OS(WINDOWS)
-#include <objbase.h>
+#include "core/platform/graphics/opentype/OpenTypeUtilities.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefPtr.h"
 #include "wtf/text/Base64.h"
-#endif
+
+#include <objbase.h>
+
+namespace {
+
+// Creates a unique and unpredictable font name, in order to avoid collisions and to
+// not allow access from CSS.
+String createUniqueFontName()
+{
+    GUID fontUuid;
+    CoCreateGuid(&fontUuid);
+
+    String fontName = base64Encode(reinterpret_cast<char*>(&fontUuid), sizeof(fontUuid));
+    ASSERT(fontName.length() < LF_FACESIZE);
+    return fontName;
+}
+
+} // namespace
 
 namespace WebCore {
 
+FontCustomPlatformData::FontCustomPlatformData(HANDLE fontReference, const String& name)
+    : m_fontReference(fontReference)
+    , m_name(name)
+{
+}
+
 FontCustomPlatformData::~FontCustomPlatformData()
 {
-#if OS(WINDOWS)
     if (m_fontReference)
         RemoveFontMemResourceEx(m_fontReference);
-#elif OS(UNIX)
-    if (m_fontReference)
-        m_fontReference->unref();
-#endif
 }
 
 FontPlatformData FontCustomPlatformData::fontPlatformData(int size, bool bold, bool italic, FontOrientation orientation, FontWidthVariant)
 {
-#if OS(WINDOWS)
     ASSERT(m_fontReference);
 
     LOGFONT logFont;
@@ -90,68 +98,34 @@
     logFont.lfStrikeOut = false;
     logFont.lfCharSet = DEFAULT_CHARSET;
     logFont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
-    logFont.lfQuality = isRunningLayoutTest() ?
-                        NONANTIALIASED_QUALITY :
-                        DEFAULT_QUALITY; // Honor user's desktop settings.
+    logFont.lfQuality = isRunningLayoutTest() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY; // Honor user's desktop settings.
     logFont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
     logFont.lfItalic = italic;
     logFont.lfWeight = bold ? FW_BOLD : FW_DONTCARE;
 
     HFONT hfont = CreateFontIndirect(&logFont);
     return FontPlatformData(hfont, size, orientation);
-#elif OS(UNIX)
-    ASSERT(m_fontReference);
-    return FontPlatformData(m_fontReference, "", size, bold && !m_fontReference->isBold(), italic && !m_fontReference->isItalic(), orientation);
-#else
-    notImplemented();
-    return FontPlatformData();
-#endif
 }
 
-#if OS(WINDOWS)
-// Creates a unique and unpredictable font name, in order to avoid collisions and to
-// not allow access from CSS.
-static String createUniqueFontName()
-{
-    GUID fontUuid;
-    CoCreateGuid(&fontUuid);
-
-    String fontName = base64Encode(reinterpret_cast<char*>(&fontUuid), sizeof(fontUuid));
-    ASSERT(fontName.length() < LF_FACESIZE);
-    return fontName;
-}
-#endif
-
-FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer)
+PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer)
 {
     ASSERT_ARG(buffer, buffer);
 
     OpenTypeSanitizer sanitizer(buffer);
     RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize();
     if (!transcodeBuffer)
-        return 0; // validation failed.
+        return nullptr; // validation failed.
     buffer = transcodeBuffer.get();
 
-#if OS(WINDOWS)
     // Introduce the font to GDI. AddFontMemResourceEx should be used with care, because it will pollute the process's
     // font namespace (Windows has no API for creating an HFONT from data without exposing the font to the
     // entire process first).
     String fontName = createUniqueFontName();
     HANDLE fontReference = renameAndActivateFont(buffer, fontName);
     if (!fontReference)
-        return 0;
-    return new FontCustomPlatformData(fontReference, fontName);
-#elif OS(UNIX)
-    SkiaSharedBufferStream* stream = new SkiaSharedBufferStream(buffer);
-    SkTypeface* typeface = SkTypeface::CreateFromStream(stream);
-    stream->unref();
-    if (!typeface)
-        return 0;
-    return new FontCustomPlatformData(typeface);
-#else
-    notImplemented();
-    return 0;
-#endif
+        return nullptr;
+
+    return adoptPtr(new FontCustomPlatformData(fontReference, fontName));
 }
 
 bool FontCustomPlatformData::supportsFormat(const String& format)
@@ -159,4 +133,4 @@
     return equalIgnoringCase(format, "truetype") || equalIgnoringCase(format, "opentype") || OpenTypeSanitizer::supportsFormat(format);
 }
 
-}
+} // namespace WebCore
diff --git a/Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp b/Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp
index c620e1b..bccefbb 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp
+++ b/Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp
@@ -125,7 +125,7 @@
 {
     return (m_reader && (index < m_reader->imagesCount()) &&
         m_reader->frameContext(index)->isHeaderDefined()) ?
-        m_reader->frameContext(index)->delayTime : 0;
+        m_reader->frameContext(index)->delayTime() : 0;
 }
 
 bool GIFImageDecoder::setFailed()
@@ -144,51 +144,60 @@
     // that width == (size().width() - frameContext->xOffset), so
     // we must ensure we don't run off the end of either the source data or the
     // row's X-coordinates.
-    int xBegin = frameContext->xOffset;
-    int yBegin = frameContext->yOffset + rowNumber;
-    int xEnd = std::min(static_cast<int>(frameContext->xOffset + width), size().width());
-    int yEnd = std::min(static_cast<int>(frameContext->yOffset + rowNumber + repeatCount), size().height());
+    const int xBegin = frameContext->xOffset();
+    const int yBegin = frameContext->yOffset() + rowNumber;
+    const int xEnd = std::min(static_cast<int>(frameContext->xOffset() + width), size().width());
+    const int yEnd = std::min(static_cast<int>(frameContext->yOffset() + rowNumber + repeatCount), size().height());
     if (rowBuffer.isEmpty() || (xBegin < 0) || (yBegin < 0) || (xEnd <= xBegin) || (yEnd <= yBegin))
         return true;
 
-    // Get the colormap.
-    const unsigned char* colorMap;
-    unsigned colorMapSize;
-    if (frameContext->isLocalColormapDefined) {
-        colorMap = m_reader->localColormap(frameContext);
-        colorMapSize = m_reader->localColormapSize(frameContext);
-    } else {
-        colorMap = m_reader->globalColormap();
-        colorMapSize = m_reader->globalColormapSize();
-    }
-    if (!colorMap)
+    const GIFColorMap::Table& colorTable = frameContext->localColorMap().isDefined() ? frameContext->localColorMap().table() : m_reader->globalColorMap().table();
+
+    if (colorTable.isEmpty())
         return true;
 
+    GIFColorMap::Table::const_iterator colorTableIter = colorTable.begin();
+
     // Initialize the frame if necessary.
     ImageFrame& buffer = m_frameBufferCache[frameIndex];
     if ((buffer.status() == ImageFrame::FrameEmpty) && !initFrameBuffer(frameIndex))
         return false;
 
+    const size_t transparentPixel = frameContext->transparentPixel();
+    Vector<unsigned char>::const_iterator rowBegin = rowBuffer.begin();
+    Vector<unsigned char>::const_iterator rowEnd = rowBegin + (xEnd - xBegin);
     ImageFrame::PixelData* currentAddress = buffer.getAddr(xBegin, yBegin);
-    // Write one row's worth of data into the frame.
-    for (int x = xBegin; x < xEnd; ++x) {
-        const unsigned char sourceValue = rowBuffer[x - frameContext->xOffset];
-        if ((!frameContext->isTransparent || (sourceValue != frameContext->tpixel)) && (sourceValue < colorMapSize)) {
-            const size_t colorIndex = static_cast<size_t>(sourceValue) * 3;
-            buffer.setRGBA(currentAddress, colorMap[colorIndex], colorMap[colorIndex + 1], colorMap[colorIndex + 2], 255);
-        } else {
-            m_currentBufferSawAlpha = true;
-            // We may or may not need to write transparent pixels to the buffer.
-            // If we're compositing against a previous image, it's wrong, and if
-            // we're writing atop a cleared, fully transparent buffer, it's
-            // unnecessary; but if we're decoding an interlaced gif and
-            // displaying it "Haeberli"-style, we must write these for passes
-            // beyond the first, or the initial passes will "show through" the
-            // later ones.
-            if (writeTransparentPixels)
-                buffer.setRGBA(currentAddress, 0, 0, 0, 0);
+
+    // We may or may not need to write transparent pixels to the buffer.
+    // If we're compositing against a previous image, it's wrong, and if
+    // we're writing atop a cleared, fully transparent buffer, it's
+    // unnecessary; but if we're decoding an interlaced gif and
+    // displaying it "Haeberli"-style, we must write these for passes
+    // beyond the first, or the initial passes will "show through" the
+    // later ones.
+    //
+    // The loops below are almost identical. One writes a transparent pixel
+    // and one doesn't based on the value of |writeTransparentPixels|.
+    // The condition check is taken out of the loop to enhance performance.
+    // This optimization reduces decoding time by about 15% for a 3MB image.
+    if (writeTransparentPixels) {
+        for (; rowBegin != rowEnd; ++rowBegin, ++currentAddress) {
+            const size_t sourceValue = *rowBegin;
+            if ((sourceValue != transparentPixel) && (sourceValue < colorTable.size())) {
+                *currentAddress = colorTableIter[sourceValue];
+            } else {
+                *currentAddress = 0;
+                m_currentBufferSawAlpha = true;
+            }
         }
-        ++currentAddress;
+    } else {
+        for (; rowBegin != rowEnd; ++rowBegin, ++currentAddress) {
+            const size_t sourceValue = *rowBegin;
+            if ((sourceValue != transparentPixel) && (sourceValue < colorTable.size()))
+                *currentAddress = colorTableIter[sourceValue];
+            else
+                m_currentBufferSawAlpha = true;
+        }
     }
 
     // Tell the frame to copy the row data if need be.
@@ -289,17 +298,17 @@
         const GIFFrameContext* frameContext = m_reader->frameContext(i);
         buffer.setPremultiplyAlpha(m_premultiplyAlpha);
         buffer.setRequiredPreviousFrameIndex(findRequiredPreviousFrame(i));
-        buffer.setDuration(frameContext->delayTime);
-        buffer.setDisposalMethod(frameContext->disposalMethod);
+        buffer.setDuration(frameContext->delayTime());
+        buffer.setDisposalMethod(frameContext->disposalMethod());
 
         // Initialize the frame rect in our buffer.
-        IntRect frameRect(frameContext->xOffset, frameContext->yOffset, frameContext->width, frameContext->height);
+        IntRect frameRect = frameContext->frameRect();
 
         // Make sure the frameRect doesn't extend outside the buffer.
         if (frameRect.maxX() > size().width())
-            frameRect.setWidth(size().width() - frameContext->xOffset);
+            frameRect.setWidth(size().width() - frameRect.x());
         if (frameRect.maxY() > size().height())
-            frameRect.setHeight(size().height() - frameContext->yOffset);
+            frameRect.setHeight(size().height() - frameRect.y());
 
         buffer.setOriginalFrameRect(frameRect);
     }
diff --git a/Source/core/platform/image-decoders/gif/GIFImageReader.cpp b/Source/core/platform/image-decoders/gif/GIFImageReader.cpp
index 423b533..a26a7f5 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageReader.cpp
+++ b/Source/core/platform/image-decoders/gif/GIFImageReader.cpp
@@ -107,7 +107,7 @@
     // displaying to diminish the "venetian-blind" effect as the image is
     // loaded. Adjust pixel vertical positions to avoid the appearance of the
     // image crawling up the screen as successive passes are drawn.
-    if (m_frameContext->progressiveDisplay && m_frameContext->interlaced && ipass < 4) {
+    if (m_frameContext->progressiveDisplay() && m_frameContext->interlaced() && ipass < 4) {
         unsigned rowDup = 0;
         unsigned rowShift = 0;
 
@@ -132,34 +132,34 @@
         drowEnd = drowStart + rowDup;
 
         // Extend if bottom edge isn't covered because of the shift upward.
-        if (((m_frameContext->height - 1) - drowEnd) <= rowShift)
-            drowEnd = m_frameContext->height - 1;
+        if (((m_frameContext->height() - 1) - drowEnd) <= rowShift)
+            drowEnd = m_frameContext->height() - 1;
 
         // Clamp first and last rows to upper and lower edge of image.
         if (drowStart < 0)
             drowStart = 0;
 
-        if ((unsigned)drowEnd >= m_frameContext->height)
-            drowEnd = m_frameContext->height - 1;
+        if ((unsigned)drowEnd >= m_frameContext->height())
+            drowEnd = m_frameContext->height() - 1;
     }
 
     // Protect against too much image data.
-    if ((unsigned)drowStart >= m_frameContext->height)
+    if ((unsigned)drowStart >= m_frameContext->height())
         return true;
 
     // CALLBACK: Let the client know we have decoded a row.
-    if (!m_client->haveDecodedRow(m_frameContext->frameId, rowBuffer, m_frameContext->width,
-        drowStart, drowEnd - drowStart + 1, m_frameContext->progressiveDisplay && m_frameContext->interlaced && ipass > 1))
+    if (!m_client->haveDecodedRow(m_frameContext->frameId(), rowBuffer, m_frameContext->width(),
+        drowStart, drowEnd - drowStart + 1, m_frameContext->progressiveDisplay() && m_frameContext->interlaced() && ipass > 1))
         return false;
 
-    if (!m_frameContext->interlaced)
+    if (!m_frameContext->interlaced())
         irow++;
     else {
         do {
             switch (ipass) {
             case 1:
                 irow += 8;
-                if (irow >= m_frameContext->height) {
+                if (irow >= m_frameContext->height()) {
                     ipass++;
                     irow = 4;
                 }
@@ -167,7 +167,7 @@
 
             case 2:
                 irow += 8;
-                if (irow >= m_frameContext->height) {
+                if (irow >= m_frameContext->height()) {
                     ipass++;
                     irow = 2;
                 }
@@ -175,7 +175,7 @@
 
             case 3:
                 irow += 4;
-                if (irow >= m_frameContext->height) {
+                if (irow >= m_frameContext->height()) {
                     ipass++;
                     irow = 1;
                 }
@@ -183,7 +183,7 @@
 
             case 4:
                 irow += 2;
-                if (irow >= m_frameContext->height) {
+                if (irow >= m_frameContext->height()) {
                     ipass++;
                     irow = 0;
                 }
@@ -192,7 +192,7 @@
             default:
                 break;
             }
-        } while (irow > (m_frameContext->height - 1));
+        } while (irow > (m_frameContext->height() - 1));
     }
     return true;
 }
@@ -233,7 +233,7 @@
 
             // Reset the dictionary to its original state, if requested.
             if (code == clearCode) {
-                codesize = m_frameContext->datasize + 1;
+                codesize = m_frameContext->dataSize() + 1;
                 codemask = (1 << codesize) - 1;
                 avail = clearCode + 2;
                 oldcode = -1;
@@ -311,11 +311,27 @@
     return true;
 }
 
+void GIFColorMap::buildTable(const unsigned char* data, size_t length)
+{
+    if (!m_isDefined || !m_table.isEmpty())
+        return;
+
+    RELEASE_ASSERT(m_position + m_colors * GIF_COLORS <= length);
+    const unsigned char* srcColormap = data + m_position;
+    m_table.resize(m_colors);
+    for (Table::iterator iter = m_table.begin(); iter != m_table.end(); ++iter) {
+        *iter = SkPackARGB32NoCheck(255, srcColormap[0], srcColormap[1], srcColormap[2]);
+        srcColormap += GIF_COLORS;
+    }
+}
+
 // Perform decoding for this frame. frameDecoded will be true if the entire frame is decoded.
 // Returns false if a decoding error occurred. This is a fatal error and causes the GIFImageReader to set the "decode failed" flag.
 // Otherwise, either not enough data is available to decode further than before, or the new data has been decoded successfully; returns true in this case.
 bool GIFFrameContext::decode(const unsigned char* data, size_t length, WebCore::GIFImageDecoder* client, bool* frameDecoded)
 {
+    m_localColorMap.buildTable(data, length);
+
     *frameDecoded = false;
     if (!m_lzwContext) {
         // Wait for more data to properly initialize GIFLZWContext.
@@ -356,6 +372,8 @@
 // Return true if decoding has progressed. Return false if an error has occurred.
 bool GIFImageReader::decode(size_t frameIndex)
 {
+    m_globalColorMap.buildTable(data(0), m_data->size());
+
     bool frameDecoded = false;
     GIFFrameContext* currentFrame = m_frames[frameIndex].get();
 
@@ -434,34 +452,20 @@
             if (m_client && !m_client->setSize(m_screenWidth, m_screenHeight))
                 return false;
 
-            m_globalColormapSize = 2 << (currentComponent[4] & 0x07);
+            const size_t globalColorMapColors = 2 << (currentComponent[4] & 0x07);
 
-            if ((currentComponent[4] & 0x80) && m_globalColormapSize > 0) { /* global map */
-                // Get the global colormap
-                const size_t globalColormapBytes = 3 * m_globalColormapSize;
-                m_globalColormapPosition = dataPosition;
-
-                if (len < globalColormapBytes) {
-                    // Wait until we have enough bytes to consume the entire colormap at once.
-                    GETN(globalColormapBytes, GIFGlobalColormap);
-                    break;
-                }
-
-                m_isGlobalColormapDefined = true;
-                dataPosition += globalColormapBytes;
-                len -= globalColormapBytes;
+            if ((currentComponent[4] & 0x80) && globalColorMapColors > 0) { /* global map */
+                m_globalColorMap.setTablePositionAndSize(dataPosition, globalColorMapColors);
+                GETN(GIF_COLORS * globalColorMapColors, GIFGlobalColormap);
+                break;
             }
 
             GETN(1, GIFImageStart);
-
-            // currentComponent[6] = Pixel Aspect Ratio
-            //   Not used
-            //   float aspect = (float)((currentComponent[6] + 15) / 64.0);
             break;
         }
 
         case GIFGlobalColormap: {
-            m_isGlobalColormapDefined = true;
+            m_globalColorMap.setDefined();
             GETN(1, GIFImageStart);
             break;
         }
@@ -544,21 +548,20 @@
         case GIFControlExtension: {
             addFrameIfNecessary();
             GIFFrameContext* currentFrame = m_frames.last().get();
-            currentFrame->isTransparent = *currentComponent & 0x1;
-            if (currentFrame->isTransparent)
-                currentFrame->tpixel = currentComponent[3];
+            if (*currentComponent & 0x1)
+                currentFrame->setTransparentPixel(currentComponent[3]);
 
             // We ignore the "user input" bit.
 
             // NOTE: This relies on the values in the FrameDisposalMethod enum
             // matching those in the GIF spec!
             int disposalMethod = ((*currentComponent) >> 2) & 0x7;
-            currentFrame->disposalMethod = static_cast<WebCore::ImageFrame::FrameDisposalMethod>(disposalMethod);
+            currentFrame->setDisposalMethod(static_cast<WebCore::ImageFrame::FrameDisposalMethod>(disposalMethod));
             // Some specs say that disposal method 3 is "overwrite previous", others that setting
             // the third bit of the field (i.e. method 4) is. We map both to the same value.
             if (disposalMethod == 4)
-                currentFrame->disposalMethod = WebCore::ImageFrame::DisposeOverwritePrevious;
-            currentFrame->delayTime = GETINT16(currentComponent + 1) * 10;
+                currentFrame->setDisposalMethod(WebCore::ImageFrame::DisposeOverwritePrevious);
+            currentFrame->setDelayTime(GETINT16(currentComponent + 1) * 10);
             GETN(1, GIFConsumeBlock);
             break;
         }
@@ -670,13 +673,10 @@
             GIFFrameContext* currentFrame = m_frames.last().get();
 
             currentFrame->setHeaderDefined();
-            currentFrame->xOffset = xOffset;
-            currentFrame->yOffset = yOffset;
-            currentFrame->height = height;
-            currentFrame->width = width;
+            currentFrame->setRect(xOffset, yOffset, width, height);
             m_screenWidth = std::max(m_screenWidth, width);
             m_screenHeight = std::max(m_screenHeight, height);
-            currentFrame->interlaced = currentComponent[8] & 0x40;
+            currentFrame->setInterlaced(currentComponent[8] & 0x40);
 
             // Overlaying interlaced, transparent GIFs over
             // existing image data using the Haeberli display hack
@@ -687,38 +687,24 @@
             // frame can be progressively displayed.
             // FIXME: It is possible that a non-transparent frame
             // can be interlaced and progressively displayed.
-            currentFrame->progressiveDisplay = currentFrameIsFirstFrame();
+            currentFrame->setProgressiveDisplay(currentFrameIsFirstFrame());
 
             const bool isLocalColormapDefined = currentComponent[8] & 0x80;
             if (isLocalColormapDefined) {
                 // The three low-order bits of currentComponent[8] specify the bits per pixel.
-                int numColors = 2 << (currentComponent[8] & 0x7);
-                const size_t localColormapBytes = 3 * numColors;
-
-                // Switch to the new local palette after it loads
-                currentFrame->localColormapPosition = dataPosition;
-                currentFrame->localColormapSize = numColors;
-
-                if (len < localColormapBytes) {
-                    // Wait until we have enough bytes to consume the entire colormap at once.
-                    GETN(localColormapBytes, GIFImageColormap);
-                    break;
-                }
-
-                currentFrame->isLocalColormapDefined = true;
-                dataPosition += localColormapBytes;
-                len -= localColormapBytes;
-            } else {
-                // Switch back to the global palette
-                currentFrame->isLocalColormapDefined = false;
+                const size_t numColors = 2 << (currentComponent[8] & 0x7);
+                currentFrame->localColorMap().setTablePositionAndSize(dataPosition, numColors);
+                GETN(GIF_COLORS * numColors, GIFImageColormap);
+                break;
             }
+
             GETN(1, GIFLZWStart);
             break;
         }
 
         case GIFImageColormap: {
             ASSERT(!m_frames.isEmpty());
-            m_frames.last()->isLocalColormapDefined = true;
+            m_frames.last()->localColorMap().setDefined();
             GETN(1, GIFLZWStart);
             break;
         }
@@ -774,24 +760,24 @@
     // Since we use a codesize of 1 more than the datasize, we need to ensure
     // that our datasize is strictly less than the MAX_LZW_BITS value (12).
     // This sets the largest possible codemask correctly at 4095.
-    if (m_frameContext->datasize >= MAX_LZW_BITS)
+    if (m_frameContext->dataSize() >= MAX_LZW_BITS)
         return false;
-    clearCode = 1 << m_frameContext->datasize;
+    clearCode = 1 << m_frameContext->dataSize();
     if (clearCode >= MAX_BYTES)
         return false;
 
     avail = clearCode + 2;
     oldcode = -1;
-    codesize = m_frameContext->datasize + 1;
+    codesize = m_frameContext->dataSize() + 1;
     codemask = (1 << codesize) - 1;
     datum = bits = 0;
-    ipass = m_frameContext->interlaced ? 1 : 0;
+    ipass = m_frameContext->interlaced() ? 1 : 0;
     irow = 0;
 
     // Initialize output row buffer.
-    rowBuffer.resize(m_frameContext->width);
+    rowBuffer.resize(m_frameContext->width());
     rowIter = rowBuffer.begin();
-    rowsRemaining = m_frameContext->height;
+    rowsRemaining = m_frameContext->height();
 
     // Clearing the whole suffix table lets us be more tolerant of bad data.
     memset(suffix, 0, sizeof(suffix));
diff --git a/Source/core/platform/image-decoders/gif/GIFImageReader.h b/Source/core/platform/image-decoders/gif/GIFImageReader.h
index f80f04a..025e199 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageReader.h
+++ b/Source/core/platform/image-decoders/gif/GIFImageReader.h
@@ -147,45 +147,54 @@
     size_t blockSize;
 };
 
+class GIFColorMap {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    typedef Vector<WebCore::ImageFrame::PixelData> Table;
+
+    GIFColorMap()
+        : m_isDefined(false)
+        , m_position(0)
+        , m_colors(0)
+    {
+    }
+
+    // Set position and number of colors for the RGB table in the data stream.
+    void setTablePositionAndSize(size_t position, size_t colors)
+    {
+        m_position = position;
+        m_colors = colors;
+    }
+    void setDefined() { m_isDefined = true; }
+    bool isDefined() const { return m_isDefined; }
+
+    // Build RGBA table using the data stream.
+    void buildTable(const unsigned char* data, size_t length);
+    const Table& table() const { return m_table; }
+
+private:
+    bool m_isDefined;
+    size_t m_position;
+    size_t m_colors;
+    Table m_table;
+};
+
 // Frame output state machine.
 struct GIFFrameContext {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    // FIXME: Move these members to private section.
-    int frameId;
-    unsigned xOffset;
-    unsigned yOffset; // With respect to "screen" origin.
-    unsigned width;
-    unsigned height;
-    int tpixel; // Index of transparent pixel.
-    WebCore::ImageFrame::FrameDisposalMethod disposalMethod; // Restore to background, leave in place, etc.
-    size_t localColormapPosition; // Per-image colormap.
-    int localColormapSize; // Size of local colormap array.
-    int datasize;
-
-    bool isLocalColormapDefined : 1;
-    bool progressiveDisplay : 1; // If true, do Haeberli interlace hack.
-    bool interlaced : 1; // True, if scanlines arrive interlaced order.
-    bool isTransparent : 1; // TRUE, if tpixel is valid.
-
-    unsigned delayTime; // Display time, in milliseconds, for this image in a multi-image GIF.
-
     GIFFrameContext(int id)
-        : frameId(id)
-        , xOffset(0)
-        , yOffset(0)
-        , width(0)
-        , height(0)
-        , tpixel(0)
-        , disposalMethod(WebCore::ImageFrame::DisposeNotSpecified)
-        , localColormapPosition(0)
-        , localColormapSize(0)
-        , datasize(0)
-        , isLocalColormapDefined(false)
-        , progressiveDisplay(false)
-        , interlaced(false)
-        , isTransparent(false)
-        , delayTime(0)
+        : m_frameId(id)
+        , m_xOffset(0)
+        , m_yOffset(0)
+        , m_width(0)
+        , m_height(0)
+        , m_transparentPixel(notFound)
+        , m_disposalMethod(WebCore::ImageFrame::DisposeNotSpecified)
+        , m_dataSize(0)
+        , m_progressiveDisplay(false)
+        , m_interlaced(false)
+        , m_delayTime(0)
         , m_currentLzwBlock(0)
         , m_isComplete(false)
         , m_isHeaderDefined(false)
@@ -204,20 +213,64 @@
 
     bool decode(const unsigned char* data, size_t length, WebCore::GIFImageDecoder* client, bool* frameDecoded);
 
+    int frameId() const { return m_frameId; }
+    void setRect(unsigned x, unsigned y, unsigned width, unsigned height)
+    {
+        m_xOffset = x;
+        m_yOffset = y;
+        m_width = width;
+        m_height = height;
+    }
+    WebCore::IntRect frameRect() const { return WebCore::IntRect(m_xOffset, m_yOffset, m_width, m_height); }
+    unsigned xOffset() const { return m_xOffset; }
+    unsigned yOffset() const { return m_yOffset; }
+    unsigned width() const { return m_width; }
+    unsigned height() const { return m_height; }
+    size_t transparentPixel() const { return m_transparentPixel; }
+    void setTransparentPixel(size_t pixel) { m_transparentPixel = pixel; }
+    WebCore::ImageFrame::FrameDisposalMethod disposalMethod() const { return m_disposalMethod; }
+    void setDisposalMethod(WebCore::ImageFrame::FrameDisposalMethod method) { m_disposalMethod = method; }
+    unsigned delayTime() const { return m_delayTime; }
+    void setDelayTime(unsigned delay) { m_delayTime = delay; }
     bool isComplete() const { return m_isComplete; }
     void setComplete() { m_isComplete = true; }
     bool isHeaderDefined() const { return m_isHeaderDefined; }
     void setHeaderDefined() { m_isHeaderDefined = true; }
     bool isDataSizeDefined() const { return m_isDataSizeDefined; }
+    int dataSize() const { return m_dataSize; }
     void setDataSize(int size)
     {
-        datasize = size;
+        m_dataSize = size;
         m_isDataSizeDefined = true;
     }
+    bool progressiveDisplay() const { return m_progressiveDisplay; }
+    void setProgressiveDisplay(bool progressiveDisplay) { m_progressiveDisplay = progressiveDisplay; }
+    bool interlaced() const { return m_interlaced; }
+    void setInterlaced(bool interlaced) { m_interlaced = interlaced; }
+
     void clearDecodeState() { m_lzwContext.clear(); }
+    const GIFColorMap& localColorMap() const { return m_localColorMap; }
+    GIFColorMap& localColorMap() { return m_localColorMap; }
+
 private:
+    int m_frameId;
+    unsigned m_xOffset;
+    unsigned m_yOffset; // With respect to "screen" origin.
+    unsigned m_width;
+    unsigned m_height;
+    size_t m_transparentPixel; // Index of transparent pixel. Value is notFound if there is no transparent pixel.
+    WebCore::ImageFrame::FrameDisposalMethod m_disposalMethod; // Restore to background, leave in place, etc.
+    int m_dataSize;
+
+    bool m_progressiveDisplay; // If true, do Haeberli interlace hack.
+    bool m_interlaced; // True, if scanlines arrive interlaced order.
+
+    unsigned m_delayTime; // Display time, in milliseconds, for this image in a multi-image GIF.
+
     OwnPtr<GIFLZWContext> m_lzwContext;
     Vector<GIFLZWBlock> m_lzwBlocks; // LZW blocks for this frame.
+    GIFColorMap m_localColorMap;
+
     size_t m_currentLzwBlock;
     bool m_isComplete;
     bool m_isHeaderDefined;
@@ -236,8 +289,6 @@
         , m_screenWidth(0)
         , m_screenHeight(0)
         , m_isGlobalColormapDefined(false)
-        , m_globalColormapPosition(0)
-        , m_globalColormapSize(0)
         , m_loopCount(cLoopCountNotSeen)
         , m_parseCompleted(false)
     {
@@ -263,22 +314,9 @@
     }
     int loopCount() const { return m_loopCount; }
 
-    const unsigned char* globalColormap() const
+    const GIFColorMap& globalColorMap() const
     {
-        return m_isGlobalColormapDefined ? data(m_globalColormapPosition) : 0;
-    }
-    int globalColormapSize() const
-    {
-        return m_isGlobalColormapDefined ? m_globalColormapSize : 0;
-    }
-
-    const unsigned char* localColormap(const GIFFrameContext* frame) const
-    {
-        return frame->isLocalColormapDefined ? data(frame->localColormapPosition) : 0;
-    }
-    int localColormapSize(const GIFFrameContext* frame) const
-    {
-        return frame->isLocalColormapDefined ? frame->localColormapSize : 0;
+        return m_globalColorMap;
     }
 
     const GIFFrameContext* frameContext(size_t index) const
@@ -317,8 +355,7 @@
     unsigned m_screenWidth; // Logical screen width & height.
     unsigned m_screenHeight;
     bool m_isGlobalColormapDefined;
-    size_t m_globalColormapPosition; // (3* MAX_COLORS in size) Default colormap if local not supplied, 3 bytes for each color.
-    int m_globalColormapSize; // Size of global colormap array.
+    GIFColorMap m_globalColorMap;
     int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders.
 
     Vector<OwnPtr<GIFFrameContext> > m_frames;
diff --git a/Source/core/platform/mac/BlockExceptions.h b/Source/core/platform/mac/BlockExceptions.h
index 9761cb5..3968a55 100644
--- a/Source/core/platform/mac/BlockExceptions.h
+++ b/Source/core/platform/mac/BlockExceptions.h
@@ -24,6 +24,7 @@
  */
 
 #import <Foundation/NSException.h>
+#import <wtf/Assertions.h>
 
 NO_RETURN_DUE_TO_ASSERT void ReportBlockedObjCException(NSException *);
 
diff --git a/Source/core/platform/mac/ScrollAnimatorMac.h b/Source/core/platform/mac/ScrollAnimatorMac.h
index 92d9b52..648d445 100644
--- a/Source/core/platform/mac/ScrollAnimatorMac.h
+++ b/Source/core/platform/mac/ScrollAnimatorMac.h
@@ -67,6 +67,8 @@
 
     void setVisibleScrollerThumbRect(const IntRect&);
 
+    static bool canUseCoordinatedScrollbar();
+
 private:
     RetainPtr<id> m_scrollAnimationHelper;
     RetainPtr<WebScrollAnimationHelperDelegate> m_scrollAnimationHelperDelegate;
diff --git a/Source/core/platform/mac/ScrollAnimatorMac.mm b/Source/core/platform/mac/ScrollAnimatorMac.mm
index b2aee69..a92ab24 100644
--- a/Source/core/platform/mac/ScrollAnimatorMac.mm
+++ b/Source/core/platform/mac/ScrollAnimatorMac.mm
@@ -37,6 +37,7 @@
 #include "core/platform/mac/EmptyProtocolDefinitions.h"
 #include "core/platform/mac/NSScrollerImpDetails.h"
 #include "core/platform/mac/ScrollbarThemeMac.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
 #include "wtf/MainThread.h"
 #include "wtf/PassOwnPtr.h"
 #include "wtf/UnusedParam.h"
@@ -63,15 +64,16 @@
     return globalSupportsContentAreaScrolledInDirection;
 }
 
-static ScrollbarThemeMac* macScrollbarTheme()
+static ScrollbarThemeMacOverlayAPI* macOverlayScrollbarTheme()
 {
+    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(isScrollbarOverlayAPIAvailable());
     ScrollbarTheme* scrollbarTheme = ScrollbarTheme::theme();
-    return !scrollbarTheme->isMockTheme() ? static_cast<ScrollbarThemeMac*>(scrollbarTheme) : 0;
+    return !scrollbarTheme->isMockTheme() ? static_cast<ScrollbarThemeMacOverlayAPI*>(scrollbarTheme) : 0;
 }
 
 static ScrollbarPainter scrollbarPainterForScrollbar(Scrollbar* scrollbar)
 {
-    if (ScrollbarThemeMac* scrollbarTheme = macScrollbarTheme())
+    if (ScrollbarThemeMacOverlayAPI* scrollbarTheme = macOverlayScrollbarTheme())
         return scrollbarTheme->painterForScrollbar(scrollbar);
 
     return nil;
@@ -1189,7 +1191,7 @@
         return;
     }
 
-    ScrollbarThemeMac* macTheme = macScrollbarTheme();
+    ScrollbarThemeMacOverlayAPI* macTheme = macOverlayScrollbarTheme();
     if (!macTheme) {
         m_needsScrollerStyleUpdate = false;
         return;
@@ -1294,4 +1296,8 @@
     m_visibleScrollerThumbRect = rectInViewCoordinates;
 }
 
+bool ScrollAnimatorMac::canUseCoordinatedScrollbar() {
+    return isScrollbarOverlayAPIAvailable();
+}
+
 } // namespace WebCore
diff --git a/Source/core/platform/mac/ScrollbarThemeMac.h b/Source/core/platform/mac/ScrollbarThemeMac.h
index 16d008a..5849d37 100644
--- a/Source/core/platform/mac/ScrollbarThemeMac.h
+++ b/Source/core/platform/mac/ScrollbarThemeMac.h
@@ -28,60 +28,34 @@
 
 #include "core/platform/ScrollbarThemeComposite.h"
 
-typedef id ScrollbarPainter;
-
 namespace WebCore {
 
-class ScrollbarThemeMac : public ScrollbarThemeComposite {
+class ScrollbarThemeMacCommon : public ScrollbarThemeComposite {
 public:
-    ScrollbarThemeMac();
-    virtual ~ScrollbarThemeMac();
+    ScrollbarThemeMacCommon();
+    virtual ~ScrollbarThemeMacCommon();
 
+    virtual void registerScrollbar(ScrollbarThemeClient*);
+    virtual void unregisterScrollbar(ScrollbarThemeClient*);
     void preferencesChanged();
 
-    virtual void updateEnabledState(ScrollbarThemeClient*);
-
-    virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
-
     virtual bool supportsControlTints() const { return true; }
-    virtual bool usesOverlayScrollbars() const;
-    virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*);
 
     virtual double initialAutoscrollTimerDelay();
     virtual double autoscrollTimerDelay();
 
-    virtual ScrollbarButtonsPlacement buttonsPlacement() const;
-
-    virtual void registerScrollbar(ScrollbarThemeClient*);
-    virtual void unregisterScrollbar(ScrollbarThemeClient*);
-
-    void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter);
-    ScrollbarPainter painterForScrollbar(ScrollbarThemeClient*);
-
-    static bool isCurrentlyDrawingIntoLayer();
-    static void setIsCurrentlyDrawingIntoLayer(bool);
-
-    virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& damageRect);
     virtual void paintOverhangAreas(ScrollView*, GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
     virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntRect&) OVERRIDE;
 
 protected:
-
-    virtual bool hasButtons(ScrollbarThemeClient*);
-    virtual bool hasThumb(ScrollbarThemeClient*);
-
-    virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
-    virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
-    virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
-
     virtual int maxOverlapBetweenPages() { return 40; }
 
-    virtual int minimumThumbLength(ScrollbarThemeClient*);
-
     virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
     virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent&);
     int scrollbarPartToHIPressedState(ScrollbarPart);
 
+    virtual void updateButtonPlacement() { }
+
     void paintGivenTickmarks(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, const Vector<IntRect>&);
 
     RefPtr<Pattern> m_overhangPattern;
diff --git a/Source/core/platform/mac/ScrollbarThemeMac.mm b/Source/core/platform/mac/ScrollbarThemeMac.mm
index 25f83a9..6b7975a 100644
--- a/Source/core/platform/mac/ScrollbarThemeMac.mm
+++ b/Source/core/platform/mac/ScrollbarThemeMac.mm
@@ -39,6 +39,8 @@
 #include "core/platform/mac/LocalCurrentGraphicsContext.h"
 #include "core/platform/mac/NSScrollerImpDetails.h"
 #include "core/platform/mac/ScrollAnimatorMac.h"
+#include "core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
 #include "public/platform/mac/WebThemeEngine.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebRect.h"
@@ -59,11 +61,11 @@
 
 namespace WebCore {
 
-typedef HashMap<ScrollbarThemeClient*, RetainPtr<ScrollbarPainter> > ScrollbarPainterMap;
+typedef HashMap<ScrollbarThemeClient*, ScrollbarThemeClient*> ScrollbarMap;
 
-static ScrollbarPainterMap* scrollbarMap()
+static ScrollbarMap* scrollbarMap()
 {
-    static ScrollbarPainterMap* map = new ScrollbarPainterMap;
+    static ScrollbarMap* map = new ScrollbarMap;
     return map;
 }
 
@@ -89,11 +91,11 @@
     if (theme->isMockTheme())
         return;
 
-    static_cast<ScrollbarThemeMac*>(ScrollbarTheme::theme())->preferencesChanged();
+    static_cast<ScrollbarThemeMacCommon*>(ScrollbarTheme::theme())->preferencesChanged();
     if (scrollbarMap()->isEmpty())
         return;
-    ScrollbarPainterMap::iterator end = scrollbarMap()->end();
-    for (ScrollbarPainterMap::iterator it = scrollbarMap()->begin(); it != end; ++it) {
+    ScrollbarMap::iterator end = scrollbarMap()->end();
+    for (ScrollbarMap::iterator it = scrollbarMap()->begin(); it != end; ++it) {
         it->key->styleChanged();
         it->key->invalidate();
     }
@@ -107,7 +109,7 @@
     if (theme->isMockTheme())
         return;
 
-    static_cast<ScrollbarThemeMac*>(ScrollbarTheme::theme())->preferencesChanged();
+    static_cast<ScrollbarThemeMacCommon*>(ScrollbarTheme::theme())->preferencesChanged();
 }
 
 + (void)registerAsObserver
@@ -120,298 +122,33 @@
 
 namespace WebCore {
 
-// FIXME: Get these numbers from CoreUI.
-static int cRealButtonLength[] = { 28, 21 };
-static int cButtonHitInset[] = { 3, 2 };
-// cRealButtonLength - cButtonInset
-static int cButtonLength[] = { 14, 10 };
-static int cScrollbarThickness[] = { 15, 11 };
-static int cButtonInset[] = { 14, 11 };
-static int cThumbMinLength[] = { 26, 20 };
-
-static int cOuterButtonLength[] = { 16, 14 }; // The outer button in a double button pair is a bit bigger.
-static int cOuterButtonOverlap = 2;
-
 static float gInitialButtonDelay = 0.5f;
 static float gAutoscrollButtonDelay = 0.05f;
 static bool gJumpOnTrackClick = false;
 
-static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsDoubleEnd;
-
-static bool supportsExpandedScrollbars()
-{
-    // FIXME: This is temporary until all platforms that support ScrollbarPainter support this part of the API.
-    static bool globalSupportsExpandedScrollbars = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(setExpanded:)];
-    return globalSupportsExpandedScrollbars;
-}
-
-static void updateArrowPlacement()
-{
-    if (isScrollbarOverlayAPIAvailable())
-        return;
-
-    NSString *buttonPlacement = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleScrollBarVariant"];
-    if ([buttonPlacement isEqualToString:@"Single"])
-        gButtonPlacement = ScrollbarButtonsSingle;
-    else if ([buttonPlacement isEqualToString:@"DoubleMin"])
-        gButtonPlacement = ScrollbarButtonsDoubleStart;
-    else if ([buttonPlacement isEqualToString:@"DoubleBoth"])
-        gButtonPlacement = ScrollbarButtonsDoubleBoth;
-    else {
-
-        gButtonPlacement = ScrollbarButtonsDoubleEnd;
-    }
-}
-
 ScrollbarTheme* ScrollbarTheme::nativeTheme()
 {
-    DEFINE_STATIC_LOCAL(ScrollbarThemeMac, theme, ());
-    return &theme;
-}
-
-static WebKit::WebThemeEngine::State scrollbarStateToThemeState(ScrollbarThemeClient* scrollbar)
-{
-    if (!scrollbar->enabled())
-        return WebKit::WebThemeEngine::StateDisabled;
-    if (!scrollbar->isScrollableAreaActive())
-        return WebKit::WebThemeEngine::StateInactive;
-    if (scrollbar->pressedPart() == ThumbPart)
-        return WebKit::WebThemeEngine::StatePressed;
-
-    return WebKit::WebThemeEngine::StateActive;
-}
-
-void ScrollbarThemeMac::registerScrollbar(ScrollbarThemeClient* scrollbar)
-{
     if (isScrollbarOverlayAPIAvailable()) {
-        bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
-        ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];
-        scrollbarMap()->add(scrollbar, scrollbarPainter);
-        updateEnabledState(scrollbar);
-        updateScrollbarOverlayStyle(scrollbar);
+        DEFINE_STATIC_LOCAL(ScrollbarThemeMacOverlayAPI, theme, ());
+        return &theme;
     } else {
-        scrollbarMap()->add(scrollbar, nil);
+        DEFINE_STATIC_LOCAL(ScrollbarThemeMacNonOverlayAPI, theme, ());
+        return &theme;
     }
+    return NULL;
 }
 
-void ScrollbarThemeMac::unregisterScrollbar(ScrollbarThemeClient* scrollbar)
+void ScrollbarThemeMacCommon::registerScrollbar(ScrollbarThemeClient* scrollbar)
+{
+    scrollbarMap()->add(scrollbar, scrollbar);
+}
+
+void ScrollbarThemeMacCommon::unregisterScrollbar(ScrollbarThemeClient* scrollbar)
 {
     scrollbarMap()->remove(scrollbar);
 }
 
-void ScrollbarThemeMac::setNewPainterForScrollbar(ScrollbarThemeClient* scrollbar, ScrollbarPainter newPainter)
-{
-    scrollbarMap()->set(scrollbar, newPainter);
-    updateEnabledState(scrollbar);
-    updateScrollbarOverlayStyle(scrollbar);
-}
-
-ScrollbarPainter ScrollbarThemeMac::painterForScrollbar(ScrollbarThemeClient* scrollbar)
-{
-    return scrollbarMap()->get(scrollbar).get();
-}
-
-static bool g_isCurrentlyDrawingIntoLayer;
-    
-bool ScrollbarThemeMac::isCurrentlyDrawingIntoLayer()
-{
-    return g_isCurrentlyDrawingIntoLayer;
-}
-
-void ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer(bool b)
-{
-    g_isCurrentlyDrawingIntoLayer = b;
-}
-
-static void scrollbarPainterPaintTrack(ScrollbarPainter scrollbarPainter, bool enabled, double value, CGFloat proportion, CGRect frameRect)
-{
-    [scrollbarPainter setEnabled:enabled];
-    [scrollbarPainter setBoundsSize: NSSizeFromCGSize(frameRect.size)];
-    [scrollbarPainter setDoubleValue:value];
-    [scrollbarPainter setKnobProportion:proportion];
-
-    // The scrollbar's frameRect includes a side inset for overlay scrollers, so we have to use the
-    // trackWidth for drawKnobSlotInRect
-    NSRect trackRect;
-    if ([scrollbarPainter isHorizontal])
-        trackRect = NSMakeRect(0, 0, frameRect.size.width, [scrollbarPainter trackWidth]);
-    else
-        trackRect = NSMakeRect(0, 0, [scrollbarPainter trackWidth], frameRect.size.height);
-    [scrollbarPainter drawKnobSlotInRect:trackRect highlight:NO];
-}
-
-// Override ScrollbarThemeMac::paint() to add support for the following:
-//     - drawing using WebThemeEngine functions
-//     - drawing tickmarks
-//     - Skia specific changes
-bool ScrollbarThemeMac::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* context, const IntRect& damageRect)
-{
-    // Get the tickmarks for the frameview.
-    Vector<IntRect> tickmarks;
-    scrollbar->getTickmarks(tickmarks);
-
-    if (isScrollbarOverlayAPIAvailable()) {
-        float value = 0;
-        float overhang = 0;
-
-        if (scrollbar->currentPos() < 0) {
-            // Scrolled past the top.
-            value = 0;
-            overhang = -scrollbar->currentPos();
-        } else if (scrollbar->visibleSize() + scrollbar->currentPos() > scrollbar->totalSize()) {
-            // Scrolled past the bottom.
-            value = 1;
-            overhang = scrollbar->currentPos() + scrollbar->visibleSize() - scrollbar->totalSize();
-        } else {
-            // Within the bounds of the scrollable area.
-            int maximum = scrollbar->maximum();
-            if (maximum > 0)
-                value = scrollbar->currentPos() / maximum;
-            else
-                value = 0;
-        }
-
-        setIsCurrentlyDrawingIntoLayer(false);
-
-        CGFloat oldKnobAlpha = 0;
-        CGFloat oldTrackAlpha = 0;
-        BOOL oldIsExpanded = NO;
-        bool hasTickmarks = tickmarks.size() > 0 && scrollbar->orientation() == VerticalScrollbar;
-        ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
-        if (hasTickmarks) {
-            scrollbar->setIsAlphaLocked(true);
-            oldKnobAlpha = [scrollbarPainter knobAlpha];
-            [scrollbarPainter setKnobAlpha:1.0];
-            oldTrackAlpha = [scrollbarPainter trackAlpha];
-            [scrollbarPainter setTrackAlpha:1.0];
-            if ([scrollbarPainter respondsToSelector:@selector(setExpanded:)]) {
-              oldIsExpanded = [scrollbarPainter isExpanded];
-              [scrollbarPainter setExpanded:YES];
-            }
-        } else
-            scrollbar->setIsAlphaLocked(false);
-
-        GraphicsContextStateSaver stateSaver(*context);
-        context->clip(damageRect);
-        context->translate(scrollbar->frameRect().x(), scrollbar->frameRect().y());
-        LocalCurrentGraphicsContext localContext(context);
-        scrollbarPainterPaintTrack(scrollbarPainter,
-                                   scrollbar->enabled(),
-                                   value,
-                                   (static_cast<CGFloat>(scrollbar->visibleSize()) - overhang) / scrollbar->totalSize(),
-                                   scrollbar->frameRect());
-
-        IntRect tickmarkTrackRect(IntPoint(), trackRect(scrollbar, false).size());
-        if (tickmarkTrackRect.width() <= 10) {
-            // For narrow scrollbars inset by 1 on the left and 3 on the right.
-            tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1);
-            tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 4);
-        } else {
-            // For wide scrollbars inset by 2 on the left and 3 on the right.
-            tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
-            tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
-        }
-        paintGivenTickmarks(context, scrollbar, tickmarkTrackRect, tickmarks);
-
-        if (scrollbar->enabled())
-            [scrollbarPainter drawKnob];
-
-        setIsCurrentlyDrawingIntoLayer(false);
-
-        if (hasTickmarks) {
-            [scrollbarPainter setKnobAlpha:oldKnobAlpha];
-            [scrollbarPainter setTrackAlpha:oldTrackAlpha];
-            if ([scrollbarPainter respondsToSelector:@selector(setExpanded:)])
-              [scrollbarPainter setExpanded:oldIsExpanded];
-        }
-
-        return true;
-    }
-
-    HIThemeTrackDrawInfo trackInfo;
-    trackInfo.version = 0;
-    trackInfo.kind = scrollbar->controlSize() == RegularScrollbar ? kThemeMediumScrollBar : kThemeSmallScrollBar;
-    trackInfo.bounds = scrollbar->frameRect();
-    trackInfo.min = 0;
-    trackInfo.max = scrollbar->maximum();
-    trackInfo.value = scrollbar->currentPos();
-    trackInfo.trackInfo.scrollbar.viewsize = scrollbar->visibleSize();
-    trackInfo.attributes = 0;
-    if (scrollbar->orientation() == HorizontalScrollbar)
-        trackInfo.attributes |= kThemeTrackHorizontal;
-
-    if (!scrollbar->enabled())
-        trackInfo.enableState = kThemeTrackDisabled;
-    else
-        trackInfo.enableState = scrollbar->isScrollableAreaActive() ? kThemeTrackActive : kThemeTrackInactive;
-
-    if (!hasButtons(scrollbar))
-        trackInfo.enableState = kThemeTrackNothingToScroll;
-    trackInfo.trackInfo.scrollbar.pressState = scrollbarPartToHIPressedState(scrollbar->pressedPart());
-
-    SkCanvas* canvas = context->canvas();
-    CGAffineTransform currentCTM = gfx::SkMatrixToCGAffineTransform(canvas->getTotalMatrix());
-
-    // The Aqua scrollbar is buggy when rotated and scaled.  We will just draw into a bitmap if we detect a scale or rotation.
-    bool canDrawDirectly = currentCTM.a == 1.0f && currentCTM.b == 0.0f && currentCTM.c == 0.0f && (currentCTM.d == 1.0f || currentCTM.d == -1.0f);
-    GraphicsContext* drawingContext = context;
-    OwnPtr<ImageBuffer> imageBuffer;
-    if (!canDrawDirectly) {
-        trackInfo.bounds = IntRect(IntPoint(), scrollbar->frameRect().size());
-
-        IntRect bufferRect(scrollbar->frameRect());
-        bufferRect.intersect(damageRect);
-        bufferRect.move(-scrollbar->frameRect().x(), -scrollbar->frameRect().y());
-
-        imageBuffer = ImageBuffer::create(bufferRect.size());
-        if (!imageBuffer)
-            return true;
-
-        drawingContext = imageBuffer->context();
-    }
-
-    // Draw thumbless.
-    gfx::SkiaBitLocker bitLocker(drawingContext->canvas());
-    CGContextRef cgContext = bitLocker.cgContext();
-    HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
-
-    IntRect tickmarkTrackRect = trackRect(scrollbar, false);
-    if (!canDrawDirectly) {
-        tickmarkTrackRect.setX(0);
-        tickmarkTrackRect.setY(0);
-    }
-    // The ends are rounded and the thumb doesn't go there.
-    tickmarkTrackRect.inflateY(-tickmarkTrackRect.width());
-    // Inset a bit.
-    tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
-    tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
-    paintGivenTickmarks(drawingContext, scrollbar, tickmarkTrackRect, tickmarks);
-
-    if (hasThumb(scrollbar)) {
-        WebKit::WebThemeEngine::ScrollbarInfo scrollbarInfo;
-        scrollbarInfo.orientation = scrollbar->orientation() == HorizontalScrollbar ? WebKit::WebThemeEngine::ScrollbarOrientationHorizontal : WebKit::WebThemeEngine::ScrollbarOrientationVertical;
-        scrollbarInfo.parent = scrollbar->isScrollViewScrollbar() ? WebKit::WebThemeEngine::ScrollbarParentScrollView : WebKit::WebThemeEngine::ScrollbarParentRenderLayer;
-        scrollbarInfo.maxValue = scrollbar->maximum();
-        scrollbarInfo.currentValue = scrollbar->currentPos();
-        scrollbarInfo.visibleSize = scrollbar->visibleSize();
-        scrollbarInfo.totalSize = scrollbar->totalSize();
-
-        WebKit::WebCanvas* webCanvas = drawingContext->canvas();
-        WebKit::Platform::current()->themeEngine()->paintScrollbarThumb(
-            webCanvas,
-            scrollbarStateToThemeState(scrollbar),
-            scrollbar->controlSize() == RegularScrollbar ? WebKit::WebThemeEngine::SizeRegular : WebKit::WebThemeEngine::SizeSmall,
-            WebKit::WebRect(scrollbar->frameRect()),
-            scrollbarInfo);
-    }
-
-    if (!canDrawDirectly)
-        context->drawImageBuffer(imageBuffer.get(), scrollbar->frameRect().location());
-
-    return true;
-}
-
-void ScrollbarThemeMac::paintGivenTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, const Vector<IntRect>& tickmarks)
+void ScrollbarThemeMacCommon::paintGivenTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect, const Vector<IntRect>& tickmarks)
 {
     if (scrollbar->orientation() != VerticalScrollbar)
         return;
@@ -443,7 +180,7 @@
     }
 }
 
-void ScrollbarThemeMac::paintOverhangAreas(ScrollView* view, GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect, const IntRect& dirtyRect)
+void ScrollbarThemeMacCommon::paintOverhangAreas(ScrollView* view, GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect, const IntRect& dirtyRect)
 {
     // The extent of each shadow in pixels.
     const int kShadowSize = 4;
@@ -565,7 +302,7 @@
     }
 }
 
-void ScrollbarThemeMac::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
+void ScrollbarThemeMacCommon::paintTickmarks(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
 {
     // Note: This is only used for css-styled scrollbars on mac.
     if (scrollbar->orientation() != VerticalScrollbar)
@@ -586,12 +323,11 @@
     paintGivenTickmarks(context, scrollbar, tickmarkTrackRect, tickmarks);
 }
 
-ScrollbarThemeMac::ScrollbarThemeMac()
+ScrollbarThemeMacCommon::ScrollbarThemeMacCommon()
 {
     static bool initialized;
     if (!initialized) {
         initialized = true;
-        gButtonPlacement = isScrollbarOverlayAPIAvailable() ? ScrollbarButtonsNone : ScrollbarButtonsDoubleEnd;
         [WebScrollbarPrefsObserver registerAsObserver];
         preferencesChanged();
     }
@@ -601,230 +337,31 @@
     m_overhangPattern = Pattern::create(patternImage, true, true);
 }
 
-ScrollbarThemeMac::~ScrollbarThemeMac()
+ScrollbarThemeMacCommon::~ScrollbarThemeMacCommon()
 {
 }
 
-void ScrollbarThemeMac::preferencesChanged()
+void ScrollbarThemeMacCommon::preferencesChanged()
 {
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     [defaults synchronize];
-    updateArrowPlacement();
+    updateButtonPlacement();
     gInitialButtonDelay = [defaults floatForKey:@"NSScrollerButtonDelay"];
     gAutoscrollButtonDelay = [defaults floatForKey:@"NSScrollerButtonPeriod"];
     gJumpOnTrackClick = [defaults boolForKey:@"AppleScrollerPagingBehavior"];
 }
 
-int ScrollbarThemeMac::scrollbarThickness(ScrollbarControlSize controlSize)
-{
-    if (isScrollbarOverlayAPIAvailable()) {
-        ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];
-        if (supportsExpandedScrollbars())
-            [scrollbarPainter setExpanded:YES];
-        return [scrollbarPainter trackBoxWidth];
-    } else
-        return cScrollbarThickness[controlSize];
-}
-
-bool ScrollbarThemeMac::usesOverlayScrollbars() const
-{
-    if (isScrollbarOverlayAPIAvailable())
-        return recommendedScrollerStyle() == NSScrollerStyleOverlay;
-    else
-        return false;
-}
-
-void ScrollbarThemeMac::updateScrollbarOverlayStyle(ScrollbarThemeClient* scrollbar)
-{
-    ScrollbarPainter painter = painterForScrollbar(scrollbar);
-    switch (scrollbar->scrollbarOverlayStyle()) {
-    case ScrollbarOverlayStyleDefault:
-        [painter setKnobStyle:NSScrollerKnobStyleDefault];
-        break;
-    case ScrollbarOverlayStyleDark:
-        [painter setKnobStyle:NSScrollerKnobStyleDark];
-        break;
-    case ScrollbarOverlayStyleLight:
-        [painter setKnobStyle:NSScrollerKnobStyleLight];
-        break;
-    }
-}
-
-double ScrollbarThemeMac::initialAutoscrollTimerDelay()
+double ScrollbarThemeMacCommon::initialAutoscrollTimerDelay()
 {
     return gInitialButtonDelay;
 }
 
-double ScrollbarThemeMac::autoscrollTimerDelay()
+double ScrollbarThemeMacCommon::autoscrollTimerDelay()
 {
     return gAutoscrollButtonDelay;
 }
-    
-ScrollbarButtonsPlacement ScrollbarThemeMac::buttonsPlacement() const
-{
-    return gButtonPlacement;
-}
 
-bool ScrollbarThemeMac::hasButtons(ScrollbarThemeClient* scrollbar)
-{
-    return scrollbar->enabled() && buttonsPlacement() != ScrollbarButtonsNone
-             && (scrollbar->orientation() == HorizontalScrollbar
-             ? scrollbar->width()
-             : scrollbar->height()) >= 2 * (cRealButtonLength[scrollbar->controlSize()] - cButtonHitInset[scrollbar->controlSize()]);
-}
-
-bool ScrollbarThemeMac::hasThumb(ScrollbarThemeClient* scrollbar)
-{
-    int minLengthForThumb;
-    if (isScrollbarOverlayAPIAvailable()) {
-        ScrollbarPainter painter = scrollbarMap()->get(scrollbar).get();
-        minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset]
-            + 2 * ([painter trackEndInset] + [painter knobEndInset]);
-    } else
-        minLengthForThumb = 2 * cButtonInset[scrollbar->controlSize()] + cThumbMinLength[scrollbar->controlSize()] + 1;
-    return scrollbar->enabled() && (scrollbar->orientation() == HorizontalScrollbar ? 
-             scrollbar->width() : 
-             scrollbar->height()) >= minLengthForThumb;
-}
-
-static IntRect buttonRepaintRect(const IntRect& buttonRect, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, bool start)
-{
-    ASSERT(gButtonPlacement != ScrollbarButtonsNone);
-
-    IntRect paintRect(buttonRect);
-    if (orientation == HorizontalScrollbar) {
-        paintRect.setWidth(cRealButtonLength[controlSize]);
-        if (!start)
-            paintRect.setX(buttonRect.x() - (cRealButtonLength[controlSize] - buttonRect.width()));
-    } else {
-        paintRect.setHeight(cRealButtonLength[controlSize]);
-        if (!start)
-            paintRect.setY(buttonRect.y() - (cRealButtonLength[controlSize] - buttonRect.height()));
-    }
-
-    return paintRect;
-}
-
-IntRect ScrollbarThemeMac::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
-{
-    IntRect result;
-    
-    if (part == BackButtonStartPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleEnd))
-        return result;
-    
-    if (part == BackButtonEndPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleStart || buttonsPlacement() == ScrollbarButtonsSingle))
-        return result;
-        
-    int thickness = scrollbarThickness(scrollbar->controlSize());
-    bool outerButton = part == BackButtonStartPart && (buttonsPlacement() == ScrollbarButtonsDoubleStart || buttonsPlacement() == ScrollbarButtonsDoubleBoth);
-    if (outerButton) {
-        if (scrollbar->orientation() == HorizontalScrollbar)
-            result = IntRect(scrollbar->x(), scrollbar->y(), cOuterButtonLength[scrollbar->controlSize()] + (painting ? cOuterButtonOverlap : 0), thickness);
-        else
-            result = IntRect(scrollbar->x(), scrollbar->y(), thickness, cOuterButtonLength[scrollbar->controlSize()] + (painting ? cOuterButtonOverlap : 0));
-        return result;
-    }
-    
-    // Our repaint rect is slightly larger, since we are a button that is adjacent to the track.
-    if (scrollbar->orientation() == HorizontalScrollbar) {
-        int start = part == BackButtonStartPart ? scrollbar->x() : scrollbar->x() + scrollbar->width() - cOuterButtonLength[scrollbar->controlSize()] - cButtonLength[scrollbar->controlSize()];
-        result = IntRect(start, scrollbar->y(), cButtonLength[scrollbar->controlSize()], thickness);
-    } else {
-        int start = part == BackButtonStartPart ? scrollbar->y() : scrollbar->y() + scrollbar->height() - cOuterButtonLength[scrollbar->controlSize()] - cButtonLength[scrollbar->controlSize()];
-        result = IntRect(scrollbar->x(), start, thickness, cButtonLength[scrollbar->controlSize()]);
-    }
-    
-    if (painting)
-        return buttonRepaintRect(result, scrollbar->orientation(), scrollbar->controlSize(), part == BackButtonStartPart);
-    return result;
-}
-
-IntRect ScrollbarThemeMac::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
-{
-    IntRect result;
-    
-    if (part == ForwardButtonEndPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleStart))
-        return result;
-    
-    if (part == ForwardButtonStartPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleEnd || buttonsPlacement() == ScrollbarButtonsSingle))
-        return result;
-        
-    int thickness = scrollbarThickness(scrollbar->controlSize());
-    int outerButtonLength = cOuterButtonLength[scrollbar->controlSize()];
-    int buttonLength = cButtonLength[scrollbar->controlSize()];
-    
-    bool outerButton = part == ForwardButtonEndPart && (buttonsPlacement() == ScrollbarButtonsDoubleEnd || buttonsPlacement() == ScrollbarButtonsDoubleBoth);
-    if (outerButton) {
-        if (scrollbar->orientation() == HorizontalScrollbar) {
-            result = IntRect(scrollbar->x() + scrollbar->width() - outerButtonLength, scrollbar->y(), outerButtonLength, thickness);
-            if (painting)
-                result.inflateX(cOuterButtonOverlap);
-        } else {
-            result = IntRect(scrollbar->x(), scrollbar->y() + scrollbar->height() - outerButtonLength, thickness, outerButtonLength);
-            if (painting)
-                result.inflateY(cOuterButtonOverlap);
-        }
-        return result;
-    }
-    
-    if (scrollbar->orientation() == HorizontalScrollbar) {
-        int start = part == ForwardButtonEndPart ? scrollbar->x() + scrollbar->width() - buttonLength : scrollbar->x() + outerButtonLength;
-        result = IntRect(start, scrollbar->y(), buttonLength, thickness);
-    } else {
-        int start = part == ForwardButtonEndPart ? scrollbar->y() + scrollbar->height() - buttonLength : scrollbar->y() + outerButtonLength;
-        result = IntRect(scrollbar->x(), start, thickness, buttonLength);
-    }
-    if (painting)
-        return buttonRepaintRect(result, scrollbar->orientation(), scrollbar->controlSize(), part == ForwardButtonStartPart);
-    return result;
-}
-
-IntRect ScrollbarThemeMac::trackRect(ScrollbarThemeClient* scrollbar, bool painting)
-{
-    if (painting || !hasButtons(scrollbar))
-        return scrollbar->frameRect();
-    
-    IntRect result;
-    int thickness = scrollbarThickness(scrollbar->controlSize());
-    int startWidth = 0;
-    int endWidth = 0;
-    int outerButtonLength = cOuterButtonLength[scrollbar->controlSize()];
-    int buttonLength = cButtonLength[scrollbar->controlSize()];
-    int doubleButtonLength = outerButtonLength + buttonLength;
-    switch (buttonsPlacement()) {
-        case ScrollbarButtonsSingle:
-            startWidth = buttonLength;
-            endWidth = buttonLength;
-            break;
-        case ScrollbarButtonsDoubleStart:
-            startWidth = doubleButtonLength;
-            break;
-        case ScrollbarButtonsDoubleEnd:
-            endWidth = doubleButtonLength;
-            break;
-        case ScrollbarButtonsDoubleBoth:
-            startWidth = doubleButtonLength;
-            endWidth = doubleButtonLength;
-            break;
-        default:
-            break;
-    }
-    
-    int totalWidth = startWidth + endWidth;
-    if (scrollbar->orientation() == HorizontalScrollbar)
-        return IntRect(scrollbar->x() + startWidth, scrollbar->y(), scrollbar->width() - totalWidth, thickness);
-    return IntRect(scrollbar->x(), scrollbar->y() + startWidth, thickness, scrollbar->height() - totalWidth);
-}
-
-int ScrollbarThemeMac::minimumThumbLength(ScrollbarThemeClient* scrollbar)
-{
-    if (isScrollbarOverlayAPIAvailable())
-        return [scrollbarMap()->get(scrollbar).get() knobMinLength];
-    else
-        return cThumbMinLength[scrollbar->controlSize()];
-}
-
-bool ScrollbarThemeMac::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
+bool ScrollbarThemeMacCommon::shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseEvent& evt)
 {
     if (evt.button() != LeftButton)
         return false;
@@ -833,12 +370,12 @@
     return evt.altKey();
 }
 
-bool ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent& event)
+bool ScrollbarThemeMacCommon::shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const PlatformMouseEvent& event)
 {
     return event.altKey();
 }
 
-int ScrollbarThemeMac::scrollbarPartToHIPressedState(ScrollbarPart part)
+int ScrollbarThemeMacCommon::scrollbarPartToHIPressedState(ScrollbarPart part)
 {
     switch (part) {
         case BackButtonStartPart:
@@ -856,10 +393,4 @@
     }
 }
 
-void ScrollbarThemeMac::updateEnabledState(ScrollbarThemeClient* scrollbar)
-{
-    if (isScrollbarOverlayAPIAvailable())
-        [scrollbarMap()->get(scrollbar).get() setEnabled:scrollbar->enabled()];
-}
-
 } // namespace WebCore
diff --git a/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h b/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h
new file mode 100644
index 0000000..a2345c7
--- /dev/null
+++ b/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollbarThemeMacNonOverlayAPI_h
+#define ScrollbarThemeMacNonOverlayAPI_h
+
+#include "core/platform/mac/ScrollbarThemeMac.h"
+
+namespace WebCore {
+
+class ScrollbarThemeMacNonOverlayAPI : public ScrollbarThemeMacCommon {
+public:
+    virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+    virtual bool usesOverlayScrollbars() const { return false; }
+    virtual ScrollbarButtonsPlacement buttonsPlacement() const;
+
+    virtual bool paint(ScrollbarThemeClient*, GraphicsContext*, const IntRect& damageRect);
+
+protected:
+    virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
+    virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+    virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+
+    virtual void updateButtonPlacement();
+
+    virtual bool hasButtons(ScrollbarThemeClient*);
+    virtual bool hasThumb(ScrollbarThemeClient*);
+
+    virtual int minimumThumbLength(ScrollbarThemeClient*);
+};
+
+}
+
+#endif
diff --git a/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm b/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm
new file mode 100644
index 0000000..62e2db5
--- /dev/null
+++ b/Source/core/platform/mac/ScrollbarThemeMacNonOverlayAPI.mm
@@ -0,0 +1,336 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/mac/ScrollbarThemeMacNonOverlayAPI.h"
+
+#include <Carbon/Carbon.h>
+#include "core/platform/ScrollbarThemeClient.h"
+#include "public/platform/mac/WebThemeEngine.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebRect.h"
+#include "skia/ext/skia_utils_mac.h"
+
+namespace WebCore {
+
+// FIXME: Get these numbers from CoreUI.
+static int cRealButtonLength[] = { 28, 21 };
+static int cButtonHitInset[] = { 3, 2 };
+// cRealButtonLength - cButtonInset
+static int cButtonLength[] = { 14, 10 };
+static int cScrollbarThickness[] = { 15, 11 };
+static int cButtonInset[] = { 14, 11 };
+static int cThumbMinLength[] = { 26, 20 };
+
+static int cOuterButtonLength[] = { 16, 14 }; // The outer button in a double button pair is a bit bigger.
+static int cOuterButtonOverlap = 2;
+
+static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsDoubleEnd;
+
+void ScrollbarThemeMacNonOverlayAPI::updateButtonPlacement()
+{
+    NSString *buttonPlacement = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleScrollBarVariant"];
+    if ([buttonPlacement isEqualToString:@"Single"])
+        gButtonPlacement = ScrollbarButtonsSingle;
+    else if ([buttonPlacement isEqualToString:@"DoubleMin"])
+        gButtonPlacement = ScrollbarButtonsDoubleStart;
+    else if ([buttonPlacement isEqualToString:@"DoubleBoth"])
+        gButtonPlacement = ScrollbarButtonsDoubleBoth;
+    else {
+        gButtonPlacement = ScrollbarButtonsDoubleEnd;
+    }
+}
+
+static WebKit::WebThemeEngine::State scrollbarStateToThemeState(ScrollbarThemeClient* scrollbar)
+{
+    if (!scrollbar->enabled())
+        return WebKit::WebThemeEngine::StateDisabled;
+    if (!scrollbar->isScrollableAreaActive())
+        return WebKit::WebThemeEngine::StateInactive;
+    if (scrollbar->pressedPart() == ThumbPart)
+        return WebKit::WebThemeEngine::StatePressed;
+
+    return WebKit::WebThemeEngine::StateActive;
+}
+
+// Override ScrollbarThemeMacCommon::paint() to add support for the following:
+//     - drawing using WebThemeEngine functions
+//     - drawing tickmarks
+//     - Skia specific changes
+bool ScrollbarThemeMacNonOverlayAPI::paint(ScrollbarThemeClient* scrollbar, GraphicsContext* context, const IntRect& damageRect)
+{
+    // Get the tickmarks for the frameview.
+    Vector<IntRect> tickmarks;
+    scrollbar->getTickmarks(tickmarks);
+
+    HIThemeTrackDrawInfo trackInfo;
+    trackInfo.version = 0;
+    trackInfo.kind = scrollbar->controlSize() == RegularScrollbar ? kThemeMediumScrollBar : kThemeSmallScrollBar;
+    trackInfo.bounds = scrollbar->frameRect();
+    trackInfo.min = 0;
+    trackInfo.max = scrollbar->maximum();
+    trackInfo.value = scrollbar->currentPos();
+    trackInfo.trackInfo.scrollbar.viewsize = scrollbar->visibleSize();
+    trackInfo.attributes = 0;
+    if (scrollbar->orientation() == HorizontalScrollbar)
+        trackInfo.attributes |= kThemeTrackHorizontal;
+
+    if (!scrollbar->enabled())
+        trackInfo.enableState = kThemeTrackDisabled;
+    else
+        trackInfo.enableState = scrollbar->isScrollableAreaActive() ? kThemeTrackActive : kThemeTrackInactive;
+
+    if (!hasButtons(scrollbar))
+        trackInfo.enableState = kThemeTrackNothingToScroll;
+    trackInfo.trackInfo.scrollbar.pressState = scrollbarPartToHIPressedState(scrollbar->pressedPart());
+
+    SkCanvas* canvas = context->canvas();
+    CGAffineTransform currentCTM = gfx::SkMatrixToCGAffineTransform(canvas->getTotalMatrix());
+
+    // The Aqua scrollbar is buggy when rotated and scaled.  We will just draw into a bitmap if we detect a scale or rotation.
+    bool canDrawDirectly = currentCTM.a == 1.0f && currentCTM.b == 0.0f && currentCTM.c == 0.0f && (currentCTM.d == 1.0f || currentCTM.d == -1.0f);
+    GraphicsContext* drawingContext = context;
+    OwnPtr<ImageBuffer> imageBuffer;
+    if (!canDrawDirectly) {
+        trackInfo.bounds = IntRect(IntPoint(), scrollbar->frameRect().size());
+
+        IntRect bufferRect(scrollbar->frameRect());
+        bufferRect.intersect(damageRect);
+        bufferRect.move(-scrollbar->frameRect().x(), -scrollbar->frameRect().y());
+
+        imageBuffer = ImageBuffer::create(bufferRect.size());
+        if (!imageBuffer)
+            return true;
+
+        drawingContext = imageBuffer->context();
+    }
+
+    // Draw thumbless.
+    gfx::SkiaBitLocker bitLocker(drawingContext->canvas());
+    CGContextRef cgContext = bitLocker.cgContext();
+    HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
+
+    IntRect tickmarkTrackRect = trackRect(scrollbar, false);
+    if (!canDrawDirectly) {
+        tickmarkTrackRect.setX(0);
+        tickmarkTrackRect.setY(0);
+    }
+    // The ends are rounded and the thumb doesn't go there.
+    tickmarkTrackRect.inflateY(-tickmarkTrackRect.width());
+    // Inset a bit.
+    tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
+    tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
+    paintGivenTickmarks(drawingContext, scrollbar, tickmarkTrackRect, tickmarks);
+
+    if (hasThumb(scrollbar)) {
+        WebKit::WebThemeEngine::ScrollbarInfo scrollbarInfo;
+        scrollbarInfo.orientation = scrollbar->orientation() == HorizontalScrollbar ? WebKit::WebThemeEngine::ScrollbarOrientationHorizontal : WebKit::WebThemeEngine::ScrollbarOrientationVertical;
+        scrollbarInfo.parent = scrollbar->isScrollViewScrollbar() ? WebKit::WebThemeEngine::ScrollbarParentScrollView : WebKit::WebThemeEngine::ScrollbarParentRenderLayer;
+        scrollbarInfo.maxValue = scrollbar->maximum();
+        scrollbarInfo.currentValue = scrollbar->currentPos();
+        scrollbarInfo.visibleSize = scrollbar->visibleSize();
+        scrollbarInfo.totalSize = scrollbar->totalSize();
+
+        WebKit::WebCanvas* webCanvas = drawingContext->canvas();
+        WebKit::Platform::current()->themeEngine()->paintScrollbarThumb(
+            webCanvas,
+            scrollbarStateToThemeState(scrollbar),
+            scrollbar->controlSize() == RegularScrollbar ? WebKit::WebThemeEngine::SizeRegular : WebKit::WebThemeEngine::SizeSmall,
+            WebKit::WebRect(scrollbar->frameRect()),
+            scrollbarInfo);
+    }
+
+    if (!canDrawDirectly)
+        context->drawImageBuffer(imageBuffer.get(), scrollbar->frameRect().location());
+
+    return true;
+}
+
+int ScrollbarThemeMacNonOverlayAPI::scrollbarThickness(ScrollbarControlSize controlSize)
+{
+    return cScrollbarThickness[controlSize];
+}
+
+ScrollbarButtonsPlacement ScrollbarThemeMacNonOverlayAPI::buttonsPlacement() const
+{
+    return gButtonPlacement;
+}
+
+bool ScrollbarThemeMacNonOverlayAPI::hasButtons(ScrollbarThemeClient* scrollbar)
+{
+    return scrollbar->enabled() && buttonsPlacement() != ScrollbarButtonsNone
+             && (scrollbar->orientation() == HorizontalScrollbar
+             ? scrollbar->width()
+             : scrollbar->height()) >= 2 * (cRealButtonLength[scrollbar->controlSize()] - cButtonHitInset[scrollbar->controlSize()]);
+}
+
+bool ScrollbarThemeMacNonOverlayAPI::hasThumb(ScrollbarThemeClient* scrollbar)
+{
+    int minLengthForThumb = 2 * cButtonInset[scrollbar->controlSize()] + cThumbMinLength[scrollbar->controlSize()] + 1;
+    return scrollbar->enabled() && (scrollbar->orientation() == HorizontalScrollbar ?
+             scrollbar->width() :
+             scrollbar->height()) >= minLengthForThumb;
+}
+
+static IntRect buttonRepaintRect(const IntRect& buttonRect, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, bool start)
+{
+    ASSERT(gButtonPlacement != ScrollbarButtonsNone);
+
+    IntRect paintRect(buttonRect);
+    if (orientation == HorizontalScrollbar) {
+        paintRect.setWidth(cRealButtonLength[controlSize]);
+        if (!start)
+            paintRect.setX(buttonRect.x() - (cRealButtonLength[controlSize] - buttonRect.width()));
+    } else {
+        paintRect.setHeight(cRealButtonLength[controlSize]);
+        if (!start)
+            paintRect.setY(buttonRect.y() - (cRealButtonLength[controlSize] - buttonRect.height()));
+    }
+
+    return paintRect;
+}
+
+IntRect ScrollbarThemeMacNonOverlayAPI::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
+{
+    IntRect result;
+
+    if (part == BackButtonStartPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleEnd))
+        return result;
+
+    if (part == BackButtonEndPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleStart || buttonsPlacement() == ScrollbarButtonsSingle))
+        return result;
+
+    int thickness = scrollbarThickness(scrollbar->controlSize());
+    bool outerButton = part == BackButtonStartPart && (buttonsPlacement() == ScrollbarButtonsDoubleStart || buttonsPlacement() == ScrollbarButtonsDoubleBoth);
+    if (outerButton) {
+        if (scrollbar->orientation() == HorizontalScrollbar)
+            result = IntRect(scrollbar->x(), scrollbar->y(), cOuterButtonLength[scrollbar->controlSize()] + (painting ? cOuterButtonOverlap : 0), thickness);
+        else
+            result = IntRect(scrollbar->x(), scrollbar->y(), thickness, cOuterButtonLength[scrollbar->controlSize()] + (painting ? cOuterButtonOverlap : 0));
+        return result;
+    }
+
+    // Our repaint rect is slightly larger, since we are a button that is adjacent to the track.
+    if (scrollbar->orientation() == HorizontalScrollbar) {
+        int start = part == BackButtonStartPart ? scrollbar->x() : scrollbar->x() + scrollbar->width() - cOuterButtonLength[scrollbar->controlSize()] - cButtonLength[scrollbar->controlSize()];
+        result = IntRect(start, scrollbar->y(), cButtonLength[scrollbar->controlSize()], thickness);
+    } else {
+        int start = part == BackButtonStartPart ? scrollbar->y() : scrollbar->y() + scrollbar->height() - cOuterButtonLength[scrollbar->controlSize()] - cButtonLength[scrollbar->controlSize()];
+        result = IntRect(scrollbar->x(), start, thickness, cButtonLength[scrollbar->controlSize()]);
+    }
+
+    if (painting)
+        return buttonRepaintRect(result, scrollbar->orientation(), scrollbar->controlSize(), part == BackButtonStartPart);
+    return result;
+}
+
+IntRect ScrollbarThemeMacNonOverlayAPI::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
+{
+    IntRect result;
+
+    if (part == ForwardButtonEndPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleStart))
+        return result;
+
+    if (part == ForwardButtonStartPart && (buttonsPlacement() == ScrollbarButtonsNone || buttonsPlacement() == ScrollbarButtonsDoubleEnd || buttonsPlacement() == ScrollbarButtonsSingle))
+        return result;
+
+    int thickness = scrollbarThickness(scrollbar->controlSize());
+    int outerButtonLength = cOuterButtonLength[scrollbar->controlSize()];
+    int buttonLength = cButtonLength[scrollbar->controlSize()];
+
+    bool outerButton = part == ForwardButtonEndPart && (buttonsPlacement() == ScrollbarButtonsDoubleEnd || buttonsPlacement() == ScrollbarButtonsDoubleBoth);
+    if (outerButton) {
+        if (scrollbar->orientation() == HorizontalScrollbar) {
+            result = IntRect(scrollbar->x() + scrollbar->width() - outerButtonLength, scrollbar->y(), outerButtonLength, thickness);
+            if (painting)
+                result.inflateX(cOuterButtonOverlap);
+        } else {
+            result = IntRect(scrollbar->x(), scrollbar->y() + scrollbar->height() - outerButtonLength, thickness, outerButtonLength);
+            if (painting)
+                result.inflateY(cOuterButtonOverlap);
+        }
+        return result;
+    }
+
+    if (scrollbar->orientation() == HorizontalScrollbar) {
+        int start = part == ForwardButtonEndPart ? scrollbar->x() + scrollbar->width() - buttonLength : scrollbar->x() + outerButtonLength;
+        result = IntRect(start, scrollbar->y(), buttonLength, thickness);
+    } else {
+        int start = part == ForwardButtonEndPart ? scrollbar->y() + scrollbar->height() - buttonLength : scrollbar->y() + outerButtonLength;
+        result = IntRect(scrollbar->x(), start, thickness, buttonLength);
+    }
+    if (painting)
+        return buttonRepaintRect(result, scrollbar->orientation(), scrollbar->controlSize(), part == ForwardButtonStartPart);
+    return result;
+}
+
+IntRect ScrollbarThemeMacNonOverlayAPI::trackRect(ScrollbarThemeClient* scrollbar, bool painting)
+{
+    if (painting || !hasButtons(scrollbar))
+        return scrollbar->frameRect();
+
+    IntRect result;
+    int thickness = scrollbarThickness(scrollbar->controlSize());
+    int startWidth = 0;
+    int endWidth = 0;
+    int outerButtonLength = cOuterButtonLength[scrollbar->controlSize()];
+    int buttonLength = cButtonLength[scrollbar->controlSize()];
+    int doubleButtonLength = outerButtonLength + buttonLength;
+    switch (buttonsPlacement()) {
+        case ScrollbarButtonsSingle:
+            startWidth = buttonLength;
+            endWidth = buttonLength;
+            break;
+        case ScrollbarButtonsDoubleStart:
+            startWidth = doubleButtonLength;
+            break;
+        case ScrollbarButtonsDoubleEnd:
+            endWidth = doubleButtonLength;
+            break;
+        case ScrollbarButtonsDoubleBoth:
+            startWidth = doubleButtonLength;
+            endWidth = doubleButtonLength;
+            break;
+        default:
+            break;
+    }
+
+    int totalWidth = startWidth + endWidth;
+    if (scrollbar->orientation() == HorizontalScrollbar)
+        return IntRect(scrollbar->x() + startWidth, scrollbar->y(), scrollbar->width() - totalWidth, thickness);
+    return IntRect(scrollbar->x(), scrollbar->y() + startWidth, thickness, scrollbar->height() - totalWidth);
+}
+
+int ScrollbarThemeMacNonOverlayAPI::minimumThumbLength(ScrollbarThemeClient* scrollbar)
+{
+    return cThumbMinLength[scrollbar->controlSize()];
+}
+
+}
diff --git a/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
new file mode 100644
index 0000000..890c3ce
--- /dev/null
+++ b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollbarThemeMacOverlayAPI_h
+#define ScrollbarThemeMacOverlayAPI_h
+
+#include "core/platform/mac/ScrollbarThemeMac.h"
+
+typedef id ScrollbarPainter;
+
+namespace WebCore {
+
+class ScrollbarThemeMacOverlayAPI : public ScrollbarThemeMacCommon {
+public:
+    virtual void updateEnabledState(ScrollbarThemeClient*);
+    virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+    virtual bool usesOverlayScrollbars() const;
+    virtual void updateScrollbarOverlayStyle(ScrollbarThemeClient*);
+    virtual ScrollbarButtonsPlacement buttonsPlacement() const;
+
+    virtual void registerScrollbar(ScrollbarThemeClient*);
+    virtual void unregisterScrollbar(ScrollbarThemeClient*);
+
+    void setNewPainterForScrollbar(ScrollbarThemeClient*, ScrollbarPainter);
+    ScrollbarPainter painterForScrollbar(ScrollbarThemeClient*);
+
+    virtual void paintTrackBackground(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
+    virtual void paintThumb(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
+
+protected:
+    virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
+    virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+    virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
+
+    virtual bool hasButtons(ScrollbarThemeClient*) { return false; }
+    virtual bool hasThumb(ScrollbarThemeClient*);
+
+    virtual int minimumThumbLength(ScrollbarThemeClient*);
+};
+
+}
+
+#endif
diff --git a/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm
new file mode 100644
index 0000000..a0ad14f
--- /dev/null
+++ b/Source/core/platform/mac/ScrollbarThemeMacOverlayAPI.mm
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/mac/ScrollbarThemeMacOverlayAPI.h"
+
+#include "core/platform/graphics/GraphicsContext.h"
+#include "core/platform/graphics/GraphicsContextStateSaver.h"
+#include "core/platform/mac/LocalCurrentGraphicsContext.h"
+#include "core/platform/mac/NSScrollerImpDetails.h"
+#include "core/platform/ScrollbarThemeClient.h"
+
+namespace WebCore {
+
+typedef HashMap<ScrollbarThemeClient*, RetainPtr<ScrollbarPainter> > ScrollbarPainterMap;
+
+static ScrollbarPainterMap* scrollbarPainterMap()
+{
+    static ScrollbarPainterMap* map = new ScrollbarPainterMap;
+    return map;
+}
+
+static bool supportsExpandedScrollbars()
+{
+    // FIXME: This is temporary until all platforms that support ScrollbarPainter support this part of the API.
+    static bool globalSupportsExpandedScrollbars = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(setExpanded:)];
+    return globalSupportsExpandedScrollbars;
+}
+
+void ScrollbarThemeMacOverlayAPI::registerScrollbar(ScrollbarThemeClient* scrollbar)
+{
+    ScrollbarThemeMacCommon::registerScrollbar(scrollbar);
+
+    bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
+    ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:(NSControlSize)scrollbar->controlSize() horizontal:isHorizontal replacingScrollerImp:nil];
+    scrollbarPainterMap()->add(scrollbar, scrollbarPainter);
+    updateEnabledState(scrollbar);
+    updateScrollbarOverlayStyle(scrollbar);
+}
+
+void ScrollbarThemeMacOverlayAPI::unregisterScrollbar(ScrollbarThemeClient* scrollbar)
+{
+    scrollbarPainterMap()->remove(scrollbar);
+
+    ScrollbarThemeMacCommon::unregisterScrollbar(scrollbar);
+}
+
+void ScrollbarThemeMacOverlayAPI::setNewPainterForScrollbar(ScrollbarThemeClient* scrollbar, ScrollbarPainter newPainter)
+{
+    scrollbarPainterMap()->set(scrollbar, newPainter);
+    updateEnabledState(scrollbar);
+    updateScrollbarOverlayStyle(scrollbar);
+}
+
+ScrollbarPainter ScrollbarThemeMacOverlayAPI::painterForScrollbar(ScrollbarThemeClient* scrollbar)
+{
+    return scrollbarPainterMap()->get(scrollbar).get();
+}
+
+void ScrollbarThemeMacOverlayAPI::paintTrackBackground(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
+    ASSERT(isScrollbarOverlayAPIAvailable());
+
+    GraphicsContextStateSaver stateSaver(*context);
+    context->translate(rect.x(), rect.y());
+    LocalCurrentGraphicsContext localContext(context);
+
+    CGRect frameRect = scrollbar->frameRect();
+    ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
+    [scrollbarPainter setEnabled:scrollbar->enabled()];
+    [scrollbarPainter setBoundsSize: NSSizeFromCGSize(frameRect.size)];
+
+    NSRect trackRect = NSMakeRect(0, 0, frameRect.size.width, frameRect.size.height);
+    [scrollbarPainter drawKnobSlotInRect:trackRect highlight:NO];
+}
+
+void ScrollbarThemeMacOverlayAPI::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect) {
+    ASSERT(isScrollbarOverlayAPIAvailable());
+
+    GraphicsContextStateSaver stateSaver(*context);
+    context->translate(rect.x(), rect.y());
+    LocalCurrentGraphicsContext localContext(context);
+
+    ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
+    CGRect frameRect = scrollbar->frameRect();
+    [scrollbarPainter setEnabled:scrollbar->enabled()];
+    [scrollbarPainter setBoundsSize:NSSizeFromCGSize(rect.size())];
+    [scrollbarPainter setDoubleValue:0];
+    [scrollbarPainter setKnobProportion:1];
+    if (scrollbar->enabled())
+        [scrollbarPainter drawKnob];
+
+    // If this state is not set, then moving the cursor over the scrollbar area will only cause the
+    // scrollbar to engorge when moved over the top of the scrollbar area.
+    [scrollbarPainter setBoundsSize: NSSizeFromCGSize(scrollbar->frameRect().size())];
+}
+
+int ScrollbarThemeMacOverlayAPI::scrollbarThickness(ScrollbarControlSize controlSize)
+{
+    ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];
+    if (supportsExpandedScrollbars())
+        [scrollbarPainter setExpanded:YES];
+    return [scrollbarPainter trackBoxWidth];
+}
+
+bool ScrollbarThemeMacOverlayAPI::usesOverlayScrollbars() const
+{
+    return recommendedScrollerStyle() == NSScrollerStyleOverlay;
+}
+
+void ScrollbarThemeMacOverlayAPI::updateScrollbarOverlayStyle(ScrollbarThemeClient* scrollbar)
+{
+    ScrollbarPainter painter = painterForScrollbar(scrollbar);
+    switch (scrollbar->scrollbarOverlayStyle()) {
+    case ScrollbarOverlayStyleDefault:
+        [painter setKnobStyle:NSScrollerKnobStyleDefault];
+        break;
+    case ScrollbarOverlayStyleDark:
+        [painter setKnobStyle:NSScrollerKnobStyleDark];
+        break;
+    case ScrollbarOverlayStyleLight:
+        [painter setKnobStyle:NSScrollerKnobStyleLight];
+        break;
+    }
+}
+
+ScrollbarButtonsPlacement ScrollbarThemeMacOverlayAPI::buttonsPlacement() const
+{
+    return ScrollbarButtonsNone;
+}
+
+bool ScrollbarThemeMacOverlayAPI::hasThumb(ScrollbarThemeClient* scrollbar)
+{
+    ScrollbarPainter painter = painterForScrollbar(scrollbar);
+    int minLengthForThumb = [painter knobMinLength] + [painter trackOverlapEndInset] + [painter knobOverlapEndInset]
+        + 2 * ([painter trackEndInset] + [painter knobEndInset]);
+    return scrollbar->enabled() && (scrollbar->orientation() == HorizontalScrollbar ?
+             scrollbar->width() :
+             scrollbar->height()) >= minLengthForThumb;
+}
+
+IntRect ScrollbarThemeMacOverlayAPI::backButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
+{
+    ASSERT(buttonsPlacement() == ScrollbarButtonsNone);
+    return IntRect();
+}
+
+IntRect ScrollbarThemeMacOverlayAPI::forwardButtonRect(ScrollbarThemeClient* scrollbar, ScrollbarPart part, bool painting)
+{
+    ASSERT(buttonsPlacement() == ScrollbarButtonsNone);
+    return IntRect();
+}
+
+IntRect ScrollbarThemeMacOverlayAPI::trackRect(ScrollbarThemeClient* scrollbar, bool painting)
+{
+    ASSERT(!hasButtons(scrollbar));
+    return scrollbar->frameRect();
+}
+
+int ScrollbarThemeMacOverlayAPI::minimumThumbLength(ScrollbarThemeClient* scrollbar)
+{
+    return [painterForScrollbar(scrollbar) knobMinLength];
+}
+
+void ScrollbarThemeMacOverlayAPI::updateEnabledState(ScrollbarThemeClient* scrollbar)
+{
+    [painterForScrollbar(scrollbar) setEnabled:scrollbar->enabled()];
+}
+
+} // namespace WebCore
diff --git a/Source/core/platform/mediastream/RTCDataChannelHandler.cpp b/Source/core/platform/mediastream/RTCDataChannelHandler.cpp
index adc6fbf..cd3d749 100644
--- a/Source/core/platform/mediastream/RTCDataChannelHandler.cpp
+++ b/Source/core/platform/mediastream/RTCDataChannelHandler.cpp
@@ -53,16 +53,46 @@
     m_webHandler->setClient(m_client ? this : 0);
 }
 
-String RTCDataChannelHandler::label()
+String RTCDataChannelHandler::label() const
 {
     return m_webHandler->label();
 }
 
-bool RTCDataChannelHandler::isReliable()
+bool RTCDataChannelHandler::isReliable() const
 {
     return m_webHandler->isReliable();
 }
 
+bool RTCDataChannelHandler::ordered() const
+{
+    return m_webHandler->ordered();
+}
+
+unsigned short RTCDataChannelHandler::maxRetransmitTime() const
+{
+    return m_webHandler->maxRetransmitTime();
+}
+
+unsigned short RTCDataChannelHandler::maxRetransmits() const
+{
+    return m_webHandler->maxRetransmits();
+}
+
+String RTCDataChannelHandler::protocol() const
+{
+    return m_webHandler->protocol();
+}
+
+bool RTCDataChannelHandler::negotiated() const
+{
+    return m_webHandler->negotiated();
+}
+
+unsigned short RTCDataChannelHandler::id() const
+{
+    return m_webHandler->id();
+}
+
 unsigned long RTCDataChannelHandler::bufferedAmount()
 {
     return m_webHandler->bufferedAmount();
diff --git a/Source/core/platform/mediastream/RTCDataChannelHandler.h b/Source/core/platform/mediastream/RTCDataChannelHandler.h
index 18a4055..70a3076 100644
--- a/Source/core/platform/mediastream/RTCDataChannelHandler.h
+++ b/Source/core/platform/mediastream/RTCDataChannelHandler.h
@@ -43,8 +43,18 @@
 
     void setClient(RTCDataChannelHandlerClient*);
 
-    String label();
-    bool isReliable();
+    String label() const;
+
+    // DEPRECATED
+    bool isReliable() const;
+
+    bool ordered() const;
+    unsigned short maxRetransmitTime() const;
+    unsigned short maxRetransmits() const;
+    String protocol() const;
+    bool negotiated() const;
+    unsigned short id() const;
+
     unsigned long bufferedAmount();
     bool sendStringData(const String&);
     bool sendRawData(const char*, size_t);
diff --git a/Source/core/platform/text/BidiResolver.h b/Source/core/platform/text/BidiResolver.h
index b42879b..71802f9 100644
--- a/Source/core/platform/text/BidiResolver.h
+++ b/Source/core/platform/text/BidiResolver.h
@@ -135,8 +135,6 @@
         }
     }
 
-    void destroy() { delete this; }
-
     int start() const { return m_start; }
     int stop() const { return m_stop; }
     unsigned char level() const { return m_level; }
diff --git a/Source/core/platform/text/BidiRunList.h b/Source/core/platform/text/BidiRunList.h
index 269b7fc..e4d701e 100644
--- a/Source/core/platform/text/BidiRunList.h
+++ b/Source/core/platform/text/BidiRunList.h
@@ -167,7 +167,7 @@
         m_logicallyLastRun = newRuns.logicallyLastRun();
     m_runCount += newRuns.runCount() - 1; // We added the new runs and removed toReplace.
 
-    toReplace->destroy();
+    delete toReplace;
     newRuns.clearWithoutDestroyingRuns();
 }
 
@@ -189,7 +189,7 @@
     Run* curr = m_firstRun;
     while (curr) {
         Run* s = curr->next();
-        curr->destroy();
+        delete curr;
         curr = s;
     }
 
diff --git a/Source/core/platform/text/Hyphenation.cpp b/Source/core/platform/text/Hyphenation.cpp
deleted file mode 100644
index 45ab3ea..0000000
--- a/Source/core/platform/text/Hyphenation.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "core/platform/text/Hyphenation.h"
-
-#include "public/platform/Platform.h"
-#include "public/platform/WebHyphenator.h"
-
-namespace WebCore {
-
-bool canHyphenate(const AtomicString& localeIdentifier)
-{
-    return WebKit::Platform::current()->hyphenator()->canHyphenate(localeIdentifier);
-}
-
-size_t lastHyphenLocation(const String& word, size_t beforeIndex, const AtomicString& localeIdentifier)
-{
-    return WebKit::Platform::current()->hyphenator()->computeLastHyphenLocation(word, beforeIndex, localeIdentifier);
-}
-
-} // namespace WebCore
diff --git a/Source/core/platform/text/Hyphenation.h b/Source/core/platform/text/Hyphenation.h
deleted file mode 100644
index 0f8aeaf..0000000
--- a/Source/core/platform/text/Hyphenation.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef Hyphenation_h
-#define Hyphenation_h
-
-#include "wtf/Forward.h"
-#include "wtf/unicode/Unicode.h"
-
-namespace WebCore {
-
-bool canHyphenate(const AtomicString& localeIdentifier);
-size_t lastHyphenLocation(const String& word, size_t beforeIndex, const AtomicString& localeIdentifier);
-
-} // namespace WebCore
-
-#endif // Hyphenation_h
diff --git a/Source/core/platform/text/win/LocaleWin.cpp b/Source/core/platform/text/win/LocaleWin.cpp
index 2d565de..cc757a4 100644
--- a/Source/core/platform/text/win/LocaleWin.cpp
+++ b/Source/core/platform/text/win/LocaleWin.cpp
@@ -42,6 +42,7 @@
 #include "wtf/HashMap.h"
 #include "wtf/OwnPtr.h"
 #include "wtf/PassOwnPtr.h"
+#include "wtf/text/StringBuffer.h"
 #include "wtf/text/StringBuilder.h"
 #include "wtf/text/StringHash.h"
 
@@ -179,8 +180,8 @@
     int bufferSizeWithNUL = ::GetLocaleInfo(m_lcid, type, 0, 0);
     if (bufferSizeWithNUL <= 0)
         return String();
-    Vector<UChar> buffer(bufferSizeWithNUL);
-    ::GetLocaleInfo(m_lcid, type, buffer.data(), bufferSizeWithNUL);
+    StringBuffer<UChar> buffer(bufferSizeWithNUL);
+    ::GetLocaleInfo(m_lcid, type, buffer.characters(), bufferSizeWithNUL);
     buffer.shrink(bufferSizeWithNUL - 1);
     return String::adopt(buffer);
 }
diff --git a/Source/core/rendering/BidiRun.cpp b/Source/core/rendering/BidiRun.cpp
index 8e56a0b..12e83a5 100644
--- a/Source/core/rendering/BidiRun.cpp
+++ b/Source/core/rendering/BidiRun.cpp
@@ -23,7 +23,7 @@
 
 #include "config.h"
 #include "core/rendering/BidiRun.h"
-#include "core/rendering/RenderArena.h"
+#include "core/platform/Partitions.h"
 #include "wtf/RefCountedLeakCounter.h"
 #include "wtf/StdLibExtras.h"
 
@@ -33,42 +33,20 @@
 
 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, bidiRunCounter, ("BidiRun"));
 
-#ifndef NDEBUG
-static bool inBidiRunDestroy;
-#endif
-
-void BidiRun::destroy()
-{
-#ifndef NDEBUG
-    inBidiRunDestroy = true;
-#endif
-    RenderArena* renderArena = m_object->renderArena();
-    delete this;
-#ifndef NDEBUG
-    inBidiRunDestroy = false;
-#endif
-
-    // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*reinterpret_cast<size_t*>(this), this);
-}
-
-void* BidiRun::operator new(size_t sz, RenderArena* renderArena)
+void* BidiRun::operator new(size_t sz)
 {
 #ifndef NDEBUG
     bidiRunCounter.increment();
 #endif
-    return renderArena->allocate(sz);
+    return partitionAlloc(Partitions::getRenderingPartition(), sz);
 }
 
-void BidiRun::operator delete(void* ptr, size_t sz)
+void BidiRun::operator delete(void* ptr)
 {
 #ifndef NDEBUG
     bidiRunCounter.decrement();
 #endif
-    ASSERT(inBidiRunDestroy);
-
-    // Stash size where destroy() can find it.
-    *(size_t*)ptr = sz;
+    partitionFree(ptr);
 }
 
 }
diff --git a/Source/core/rendering/BidiRun.h b/Source/core/rendering/BidiRun.h
index 74f3fad..abfe2d1 100644
--- a/Source/core/rendering/BidiRun.h
+++ b/Source/core/rendering/BidiRun.h
@@ -44,21 +44,13 @@
         m_startsSegment = false;
     }
 
-    void destroy();
-
-    // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
-
-    // Overridden to prevent the normal delete from being called.
-    void operator delete(void*, size_t);
+    // BidiRuns are allocated out of the rendering partition.
+    void* operator new(size_t);
+    void operator delete(void*);
 
     BidiRun* next() { return static_cast<BidiRun*>(m_next); }
     RenderObject* object() { return m_object; }
 
-private:
-    // The normal operator new is disallowed.
-    void* operator new(size_t) throw();
-
 public:
     RenderObject* m_object;
     InlineBox* m_box;
diff --git a/Source/core/rendering/InlineBox.cpp b/Source/core/rendering/InlineBox.cpp
index a1bc0b9..bfd9db6 100644
--- a/Source/core/rendering/InlineBox.cpp
+++ b/Source/core/rendering/InlineBox.cpp
@@ -20,10 +20,10 @@
 #include "config.h"
 #include "core/rendering/InlineBox.h"
 
+#include "core/platform/Partitions.h"
 #include "core/platform/graphics/FontMetrics.h"
 #include "core/rendering/InlineFlowBox.h"
 #include "core/rendering/PaintInfo.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderBlock.h"
 #include "core/rendering/RootInlineBox.h"
 
@@ -68,31 +68,14 @@
         parent()->removeChild(this);
 }
 
-void InlineBox::destroy(RenderArena* renderArena)
+void* InlineBox::operator new(size_t sz)
 {
-#ifndef NDEBUG
-    inInlineBoxDetach = true;
-#endif
-    delete this;
-#ifndef NDEBUG
-    inInlineBoxDetach = false;
-#endif
-
-    // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*(size_t *)this, this);
+    return partitionAlloc(Partitions::getRenderingPartition(), sz);
 }
 
-void* InlineBox::operator new(size_t sz, RenderArena* renderArena)
+void InlineBox::operator delete(void* ptr)
 {
-    return renderArena->allocate(sz);
-}
-
-void InlineBox::operator delete(void* ptr, size_t sz)
-{
-    ASSERT(inInlineBoxDetach);
-
-    // Stash size where destroy can find it.
-    *(size_t *)ptr = sz;
+    partitionFree(ptr);
 }
 
 #ifndef NDEBUG
@@ -183,11 +166,11 @@
         curr->markDirty();
 }
 
-void InlineBox::deleteLine(RenderArena* arena)
+void InlineBox::deleteLine()
 {
     if (!m_bitfields.extracted() && m_renderer->isBox())
         toRenderBox(m_renderer)->setInlineBoxWrapper(0);
-    destroy(arena);
+    destroy();
 }
 
 void InlineBox::extractLine()
diff --git a/Source/core/rendering/InlineBox.h b/Source/core/rendering/InlineBox.h
index b94346c..fdb04d5 100644
--- a/Source/core/rendering/InlineBox.h
+++ b/Source/core/rendering/InlineBox.h
@@ -63,9 +63,9 @@
 
     virtual ~InlineBox();
 
-    virtual void destroy(RenderArena*);
+    virtual void destroy() { delete this; }
 
-    virtual void deleteLine(RenderArena*);
+    virtual void deleteLine();
     virtual void extractLine();
     virtual void attachLine();
 
@@ -97,15 +97,9 @@
     virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
 
-    // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
-
-    // Overridden to prevent the normal delete from being called.
-    void operator delete(void*, size_t);
-
-private:
-    // The normal operator new is disallowed.
-    void* operator new(size_t) throw();
+    // InlineBoxes are allocated out of the rendering partition.
+    void* operator new(size_t);
+    void operator delete(void*);
 
 public:
 #ifndef NDEBUG
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp
index 8fc9a48..e9890ff 100644
--- a/Source/core/rendering/InlineFlowBox.cpp
+++ b/Source/core/rendering/InlineFlowBox.cpp
@@ -198,7 +198,7 @@
     checkConsistency();
 }
 
-void InlineFlowBox::deleteLine(RenderArena* arena)
+void InlineFlowBox::deleteLine()
 {
     InlineBox* child = firstChild();
     InlineBox* next = 0;
@@ -208,7 +208,7 @@
 #ifndef NDEBUG
         child->setParent(0);
 #endif
-        child->deleteLine(arena);
+        child->deleteLine();
         child = next;
     }
 #ifndef NDEBUG
@@ -217,7 +217,7 @@
 #endif
 
     removeLineBoxFromRenderObject();
-    destroy(arena);
+    destroy();
 }
 
 void InlineFlowBox::removeLineBoxFromRenderObject()
diff --git a/Source/core/rendering/InlineFlowBox.h b/Source/core/rendering/InlineFlowBox.h
index 8128326..e81e426 100644
--- a/Source/core/rendering/InlineFlowBox.h
+++ b/Source/core/rendering/InlineFlowBox.h
@@ -96,7 +96,7 @@
     }
 
     void addToLine(InlineBox* child);
-    virtual void deleteLine(RenderArena*) OVERRIDE FINAL;
+    virtual void deleteLine() OVERRIDE FINAL;
     virtual void extractLine() OVERRIDE FINAL;
     virtual void attachLine() OVERRIDE FINAL;
     virtual void adjustPosition(float dx, float dy);
diff --git a/Source/core/rendering/InlineIterator.h b/Source/core/rendering/InlineIterator.h
index 6750b85..eae2dca 100644
--- a/Source/core/rendering/InlineIterator.h
+++ b/Source/core/rendering/InlineIterator.h
@@ -444,7 +444,7 @@
 static inline void addPlaceholderRunForIsolatedInline(InlineBidiResolver& resolver, RenderObject* obj, unsigned pos)
 {
     ASSERT(obj);
-    BidiRun* isolatedRun = new (obj->renderArena()) BidiRun(pos, 0, obj, resolver.context(), resolver.dir());
+    BidiRun* isolatedRun = new BidiRun(pos, 0, obj, resolver.context(), resolver.dir());
     resolver.runs().addRun(isolatedRun);
     // FIXME: isolatedRuns() could be a hash of object->run and then we could cheaply
     // ASSERT here that we didn't create multiple objects for the same inline.
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 3a22c0f..e2eeae0 100644
--- a/Source/core/rendering/InlineTextBox.cpp
+++ b/Source/core/rendering/InlineTextBox.cpp
@@ -65,11 +65,11 @@
 
 static const int misspellingLineThickness = 3;
 
-void InlineTextBox::destroy(RenderArena* arena)
+void InlineTextBox::destroy()
 {
     if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
         gTextBoxesWithOverflow->remove(this);
-    InlineBox::destroy(arena);
+    InlineBox::destroy();
 }
 
 void InlineTextBox::markDirty(bool dirty)
@@ -238,10 +238,10 @@
     return LayoutRect(topPoint, LayoutSize(width, height));
 }
 
-void InlineTextBox::deleteLine(RenderArena* arena)
+void InlineTextBox::deleteLine()
 {
     toRenderText(renderer())->removeTextBox(this);
-    destroy(arena);
+    destroy();
 }
 
 void InlineTextBox::extractLine()
diff --git a/Source/core/rendering/InlineTextBox.h b/Source/core/rendering/InlineTextBox.h
index 2647d65..8778f97 100644
--- a/Source/core/rendering/InlineTextBox.h
+++ b/Source/core/rendering/InlineTextBox.h
@@ -57,7 +57,7 @@
     {
     }
 
-    virtual void destroy(RenderArena*) OVERRIDE FINAL;
+    virtual void destroy() OVERRIDE FINAL;
 
     InlineTextBox* prevTextBox() const { return m_prevTextBox; }
     InlineTextBox* nextTextBox() const { return m_nextTextBox; }
@@ -125,7 +125,7 @@
     RenderText* textRenderer() const;
 
 private:
-    virtual void deleteLine(RenderArena*) OVERRIDE FINAL;
+    virtual void deleteLine() OVERRIDE FINAL;
     virtual void extractLine() OVERRIDE FINAL;
     virtual void attachLine() OVERRIDE FINAL;
 
diff --git a/Source/core/rendering/LayoutState.cpp b/Source/core/rendering/LayoutState.cpp
index fe30cda..6d1b6fa 100644
--- a/Source/core/rendering/LayoutState.cpp
+++ b/Source/core/rendering/LayoutState.cpp
@@ -26,8 +26,8 @@
 #include "config.h"
 #include "core/rendering/LayoutState.h"
 
+#include "core/platform/Partitions.h"
 #include "core/rendering/ColumnInfo.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderInline.h"
 #include "core/rendering/RenderLayer.h"
 #include "core/rendering/RenderView.h"
@@ -161,31 +161,14 @@
     }
 }
 
-#ifndef NDEBUG
-static bool inLayoutStateDestroy;
-#endif
-
-void LayoutState::destroy(RenderArena* renderArena)
+void* LayoutState::operator new(size_t sz)
 {
-#ifndef NDEBUG
-    inLayoutStateDestroy = true;
-#endif
-    delete this;
-#ifndef NDEBUG
-    inLayoutStateDestroy = false;
-#endif
-    renderArena->free(*(size_t*)this, this);
+    return partitionAlloc(Partitions::getRenderingPartition(), sz);
 }
 
-void* LayoutState::operator new(size_t sz, RenderArena* renderArena)
+void LayoutState::operator delete(void* ptr)
 {
-    return renderArena->allocate(sz);
-}
-
-void LayoutState::operator delete(void* ptr, size_t sz)
-{
-    ASSERT(inLayoutStateDestroy);
-    *(size_t*)ptr = sz;
+    partitionFree(ptr);
 }
 
 void LayoutState::clearPaginationInformation()
diff --git a/Source/core/rendering/LayoutState.h b/Source/core/rendering/LayoutState.h
index 058aa43..1bd336c 100644
--- a/Source/core/rendering/LayoutState.h
+++ b/Source/core/rendering/LayoutState.h
@@ -33,7 +33,6 @@
 
 namespace WebCore {
 
-class RenderArena;
 class RenderBlock;
 class RenderBox;
 class RenderObject;
@@ -65,13 +64,9 @@
     LayoutState(LayoutState*, RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged, ColumnInfo*);
     LayoutState(RenderObject*);
 
-    void destroy(RenderArena*);
-
-    // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
-
-    // Overridden to prevent the normal delete from being called.
-    void operator delete(void*, size_t);
+    // LayoutState is allocated out of the rendering partition.
+    void* operator new(size_t);
+    void operator delete(void*);
 
     void clearPaginationInformation();
     bool isPaginatingColumns() const { return m_columnInfo && m_columnInfo->paginationUnit() == ColumnInfo::Column; }
@@ -96,9 +91,6 @@
 
     ShapeInsideInfo* shapeInsideInfo() const { return m_shapeInsideInfo; }
 private:
-    // The normal operator new is disallowed.
-    void* operator new(size_t) throw();
-
     void propagateLineGridInfo(RenderBox*);
     void establishLineGrid(RenderBlock*);
 
diff --git a/Source/core/rendering/RenderArena.cpp b/Source/core/rendering/RenderArena.cpp
deleted file mode 100644
index 69a4f29..0000000
--- a/Source/core/rendering/RenderArena.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (C) 2003 Apple Computer, Inc.
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- *
- * Portions are Copyright (C) 1998 Netscape Communications Corporation.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Alternatively, the contents of this file may be used under the terms
- * of either the Mozilla Public License Version 1.1, found at
- * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
- * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
- * (the "GPL"), in which case the provisions of the MPL or the GPL are
- * applicable instead of those above.  If you wish to allow use of your
- * version of this file only under the terms of one of those two
- * licenses (the MPL or the GPL) and not to allow others to use your
- * version of this file under the LGPL, indicate your decision by
- * deletingthe provisions above and replace them with the notice and
- * other provisions required by the MPL or the GPL, as the case may be.
- * If you do not delete the provisions above, a recipient may use your
- * version of this file under any of the LGPL, the MPL or the GPL.
- */
-
-#include "config.h"
-#include "core/rendering/RenderArena.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <limits>
-
-#include "wtf/Assertions.h"
-#include "wtf/CryptographicallyRandomNumber.h"
-
-#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
-
-#ifdef NDEBUG
-static void* MaskPtr(void* p, uintptr_t mask)
-{
-    return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(p) ^ mask);
-}
-#endif
-
-namespace WebCore {
-
-#ifndef NDEBUG
-
-const int signature = 0xDBA00AEA;
-const int signatureDead = 0xDBA00AED;
-
-typedef struct {
-    RenderArena* arena;
-    size_t size;
-    int signature;
-} RenderArenaDebugHeader;
-
-static const size_t debugHeaderSize = ARENA_ALIGN(sizeof(RenderArenaDebugHeader));
-
-#endif
-
-RenderArena::RenderArena(unsigned arenaSize)
-    : m_totalSize(0)
-    , m_totalAllocated(0)
-{
-    ASSERT(arenaSize > sizeof(Arena) + ARENA_ALIGN_MASK);
-    // The underlying Arena class allocates some metadata on top of our
-    // requested size. Factor this in so that we can get perfect power-of-two
-    // allocation sizes passed to the underlying malloc() call.
-    arenaSize -= (sizeof(Arena) + ARENA_ALIGN_MASK);
-    // Initialize the arena pool
-    INIT_ARENA_POOL(&m_pool, "RenderArena", arenaSize);
-
-    // Zero out the recyclers array
-    memset(m_recyclers, 0, sizeof(m_recyclers));
-
-    // Mask freelist pointers to detect corruption and stop freelist spraying.
-    // We use an arbitray function and rely on ASLR to randomize it.
-    // The first value in RenderObject (or any class) is a vtable pointer, which
-    // always overlaps with the next pointer. This change guarantees that the
-    // masked vtable/next pointer will never point to valid memory. So, we
-    // should immediately crash on the first invalid vtable access for a stale
-    // RenderObject pointer.
-    // See http://download.crowdstrike.com/papers/hes-exploiting-a-coalmine.pdf.
-    WTF::cryptographicallyRandomValues(&m_mask, sizeof(m_mask));
-    m_mask |= (static_cast<uintptr_t>(3) << (std::numeric_limits<uintptr_t>::digits - 2)) | 1;
-}
-
-RenderArena::~RenderArena()
-{
-    FinishArenaPool(&m_pool);
-}
-
-void* RenderArena::allocate(size_t size)
-{
-    ASSERT(size <= gMaxRecycledSize - 32);
-    m_totalSize += size;
-
-#ifdef ADDRESS_SANITIZER
-    return ::malloc(size);
-#elif !defined(NDEBUG)
-    // Use standard malloc so that memory debugging tools work.
-    ASSERT(this);
-    void* block = ::malloc(debugHeaderSize + size);
-    RenderArenaDebugHeader* header = static_cast<RenderArenaDebugHeader*>(block);
-    header->arena = this;
-    header->size = size;
-    header->signature = signature;
-    return static_cast<char*>(block) + debugHeaderSize;
-#else
-    // Ensure we have correct alignment for pointers.  Important for Tru64
-    size = ROUNDUP(size, sizeof(void*));
-
-    const size_t index = size >> kRecyclerShift;
-
-    void* result = m_recyclers[index];
-    if (result) {
-        // Need to move to the next object
-        void* next = MaskPtr(*((void**)result), m_mask);
-        m_recyclers[index] = next;
-    }
-
-    if (!result) {
-        // Allocate a new chunk from the arena
-        unsigned bytesAllocated = 0;
-        ARENA_ALLOCATE(result, &m_pool, size, &bytesAllocated);
-        m_totalAllocated += bytesAllocated;
-    }
-
-    return result;
-#endif
-}
-
-void RenderArena::free(size_t size, void* ptr)
-{
-    ASSERT(size <= gMaxRecycledSize - 32);
-    m_totalSize -= size;
-
-#ifdef ADDRESS_SANITIZER
-    ::free(ptr);
-#elif !defined(NDEBUG)
-    // Use standard free so that memory debugging tools work.
-    void* block = static_cast<char*>(ptr) - debugHeaderSize;
-    RenderArenaDebugHeader* header = static_cast<RenderArenaDebugHeader*>(block);
-    ASSERT(header->signature == signature);
-    ASSERT_UNUSED(size, header->size == size);
-    ASSERT(header->arena == this);
-    header->signature = signatureDead;
-    ::free(block);
-#else
-    // Ensure we have correct alignment for pointers.  Important for Tru64
-    size = ROUNDUP(size, sizeof(void*));
-
-    const size_t index = size >> kRecyclerShift;
-    void* currentTop = m_recyclers[index];
-    m_recyclers[index] = ptr;
-    *((void**)ptr) = MaskPtr(currentTop, m_mask);
-#endif
-}
-
-} // namespace WebCore
diff --git a/Source/core/rendering/RenderArena.h b/Source/core/rendering/RenderArena.h
deleted file mode 100644
index 255509e..0000000
--- a/Source/core/rendering/RenderArena.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2003 Apple Computer, Inc.
- *
- * Portions are Copyright (C) 1998 Netscape Communications Corporation.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Alternatively, the contents of this file may be used under the terms
- * of either the Mozilla Public License Version 1.1, found at
- * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public
- * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html
- * (the "GPL"), in which case the provisions of the MPL or the GPL are
- * applicable instead of those above.  If you wish to allow use of your
- * version of this file only under the terms of one of those two
- * licenses (the MPL or the GPL) and not to allow others to use your
- * version of this file under the LGPL, indicate your decision by
- * deletingthe provisions above and replace them with the notice and
- * other provisions required by the MPL or the GPL, as the case may be.
- * If you do not delete the provisions above, a recipient may use your
- * version of this file under any of the LGPL, the MPL or the GPL.
- */
-
-#ifndef RenderArena_h
-#define RenderArena_h
-
-#include "core/platform/Arena.h"
-#include "wtf/FastAllocBase.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-
-namespace WebCore {
-
-static const size_t gMaxRecycledSize = 1024;
-
-class RenderArena : public RefCounted<RenderArena> {
-public:
-    static PassRefPtr<RenderArena> create() { return adoptRef(new RenderArena); }
-    ~RenderArena();
-
-    // Memory management functions
-    void* allocate(size_t);
-    void free(size_t, void*);
-
-    size_t totalRenderArenaSize() const { return m_totalSize; }
-    size_t totalRenderArenaAllocatedBytes() const { return m_totalAllocated; }
-
-private:
-    RenderArena(unsigned arenaSize = 8192);
-
-    // Underlying arena pool
-    ArenaPool m_pool;
-
-    // The mask used to secure the recycled freelist pointers.
-    uintptr_t m_mask;
-    // The recycler array is sparse with the indices being multiples of the
-    // rounding size, sizeof(void*), i.e., 0, 4, 8, 12, 16, 20, ... on 32-bit.
-    static const size_t kRecyclerShift = (sizeof(void*) == 8) ? 3 : 2;
-    void* m_recyclers[gMaxRecycledSize >> kRecyclerShift];
-
-    size_t m_totalSize;
-    size_t m_totalAllocated;
-};
-
-} // namespace WebCore
-
-#endif // RenderArena_h
diff --git a/Source/core/rendering/RenderBR.cpp b/Source/core/rendering/RenderBR.cpp
index df38fd9..27fa7c7 100644
--- a/Source/core/rendering/RenderBR.cpp
+++ b/Source/core/rendering/RenderBR.cpp
@@ -23,7 +23,6 @@
 #include "core/rendering/RenderBR.h"
 
 #include "core/dom/Document.h"
-#include "core/editing/VisiblePosition.h"
 
 namespace WebCore {
 
@@ -73,9 +72,9 @@
     return 1;
 }
 
-VisiblePosition RenderBR::positionForPoint(const LayoutPoint&)
+PositionWithAffinity RenderBR::positionForPoint(const LayoutPoint&)
 {
-    return createVisiblePosition(0, DOWNSTREAM);
+    return createPositionWithAffinity(0, DOWNSTREAM);
 }
 
 } // namespace WebCore
diff --git a/Source/core/rendering/RenderBR.h b/Source/core/rendering/RenderBR.h
index c504a6e..a5ad8ff 100644
--- a/Source/core/rendering/RenderBR.h
+++ b/Source/core/rendering/RenderBR.h
@@ -51,7 +51,7 @@
     virtual int caretMinOffset() const;
     virtual int caretMaxOffset() const;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
 
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index b969ed8..e456543 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -228,23 +228,17 @@
 {
     FloatingObjects* floats = floatingObjects();
 
-    // Container map entries are only cleared when the RenderBlock or the float are being destroyed.
-    // This means that it might contain obsolete entries, but the performance cost of modifying the
-    // container map during layout is very high, and it is much easier to deal with the extra entries
-    // when iterating container maps.
-    if (beingDestroyed()) {
-        FloatingObjectSetIterator end = floats->set().end();
-        for (FloatingObjectSetIterator floatIterator = floats->set().begin(); floatIterator != end; ++floatIterator) {
-            TrackedContainerMap::iterator it = gFloatingObjectContainerMap->find((*floatIterator)->m_renderer);
-            ASSERT(it != gFloatingObjectContainerMap->end());
-            if (it == gFloatingObjectContainerMap->end())
-                continue;
-            HashSet<RenderBlock*>* containerSet = it->value.get();
-            ASSERT(containerSet->contains(this));
-            containerSet->remove(this);
-            if (containerSet->isEmpty())
-                gFloatingObjectContainerMap->remove(it);
-        }
+    FloatingObjectSetIterator end = floats->set().end();
+    for (FloatingObjectSetIterator floatIterator = floats->set().begin(); floatIterator != end; ++floatIterator) {
+        TrackedContainerMap::iterator it = gFloatingObjectContainerMap->find((*floatIterator)->m_renderer);
+        ASSERT(it != gFloatingObjectContainerMap->end());
+        if (it == gFloatingObjectContainerMap->end())
+            continue;
+        HashSet<RenderBlock*>* containerSet = it->value.get();
+        ASSERT(containerSet->contains(this));
+        containerSet->remove(this);
+        if (containerSet->isEmpty())
+            gFloatingObjectContainerMap->remove(it);
     }
     if (deleteValues == DeleteAllValues)
         deleteAllValues(floats->set());
@@ -269,7 +263,7 @@
 
 RenderBlock* RenderBlock::createAnonymous(Document* document)
 {
-    RenderBlock* renderer = new (document->renderArena()) RenderBlock(0);
+    RenderBlock* renderer = new RenderBlock(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -279,16 +273,6 @@
     // Mark as being destroyed to avoid trouble with merges in removeChild().
     m_beingDestroyed = true;
 
-    if (!documentBeingDestroyed()) {
-        if (firstChild() && firstChild()->isRunIn()) {
-            // If we are moving inline children(run-in) from |this| to |parent|, then we need
-            // to clear our line box tree.
-            if (childrenInline())
-                deleteLineBoxTree();
-            moveRunInToOriginalPosition(firstChild());
-        }
-    }
-
     // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
     // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.
     children()->destroyLeftoverChildren();
@@ -324,10 +308,10 @@
             parent()->dirtyLinesFromChangedChild(this);
     }
 
-    m_lineBoxes.deleteLineBoxes(renderArena());
+    m_lineBoxes.deleteLineBoxes();
 
     if (lineGridBox())
-        lineGridBox()->destroy(renderArena());
+        lineGridBox()->destroy();
 
     if (UNLIKELY(gDelayedUpdateScrollInfoSet != 0))
         gDelayedUpdateScrollInfoSet->remove(this);
@@ -734,9 +718,6 @@
     // time in makeChildrenNonInline by just setting this explicitly up front.
     newBlockBox->setChildrenInline(false);
 
-    // We delayed adding the newChild until now so that the |newBlockBox| would be fully
-    // connected, thus allowing newChild access to a renderArena should it need
-    // to wrap itself in additional boxes (e.g., table construction).
     newBlockBox->addChild(newChild);
 
     // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
@@ -786,9 +767,6 @@
     // time in makeChildrenNonInline by just setting this explicitly up front.
     newBlockBox->setChildrenInline(false);
 
-    // We delayed adding the newChild until now so that the |newBlockBox| would be fully
-    // connected, thus allowing newChild access to a renderArena should it need
-    // to wrap itself in additional boxes (e.g., table construction).
     newBlockBox->addChild(newChild);
 
     // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
@@ -1026,7 +1004,7 @@
             (*it)->m_originatingLine = 0;
         }
     }
-    m_lineBoxes.deleteLineBoxTree(renderArena());
+    m_lineBoxes.deleteLineBoxTree();
 
     if (AXObjectCache* cache = document()->existingAXObjectCache())
         cache->recomputeIsIgnored(this);
@@ -1034,7 +1012,7 @@
 
 RootInlineBox* RenderBlock::createRootInlineBox()
 {
-    return new (renderArena()) RootInlineBox(this);
+    return new RootInlineBox(this);
 }
 
 RootInlineBox* RenderBlock::createAndAppendRootInlineBox()
@@ -1952,9 +1930,9 @@
 
     RenderBoxModelObject* newRunIn = 0;
     if (!runIn->isRenderBlock())
-        newRunIn = new (renderArena()) RenderBlock(runIn->node());
+        newRunIn = new RenderBlock(runIn->node());
     else
-        newRunIn = new (renderArena()) RenderInline(toElement(runIn->node()));
+        newRunIn = new RenderInline(toElement(runIn->node()));
 
     runIn->node()->setRenderer(newRunIn);
     newRunIn->setStyle(runIn->style());
@@ -1991,9 +1969,6 @@
     if (!curr || !curr->isRenderBlock() || !curr->childrenInline())
         return;
 
-    if (toRenderBlock(curr)->beingDestroyed())
-        return;
-
     // Per CSS3, "A run-in cannot run in to a block that already starts with a
     // run-in or that itself is a run-in".
     if (curr->isRunIn() || (curr->firstChild() && curr->firstChild()->isRunIn()))
@@ -2880,10 +2855,8 @@
         r->layoutIfNeeded();
 
         // Lay out again if our estimate was wrong.
-        if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop) {
-            r->setChildNeedsLayout(true, MarkOnlyThis);
-            r->layoutIfNeeded();
-        }
+        if (needsBlockDirectionLocationSetBeforeLayout && logicalTopForChild(r) != oldLogicalTop)
+            r->forceChildLayout();
     }
 
     if (hasColumns())
@@ -3919,6 +3892,7 @@
     FloatingObjects* floats = floatingObjects();
     HashSet<RenderBlock*>* containerSet = gFloatingObjectContainerMap->get(floatingObject->renderer());
 
+    ASSERT(!containerSet || containerSet->contains(this) == floats->set().contains(floatingObject));
     floats->add(floatingObject);
 
     if (!containerSet) {
@@ -3941,11 +3915,13 @@
         RenderBlock* container = *it;
 
         TrackedFloatMap::iterator floatIterator = gFloatingObjectMap->find(container);
+        ASSERT(floatIterator != gFloatingObjectMap->end());
         if (floatIterator == gFloatingObjectMap->end())
             continue;
         FloatingObjects* floatingObjects = floatIterator->value.get();
         const FloatingObjectSet& floatingObjectSet = floatingObjects->set();
         FloatingObjectSetIterator floatIt = floatingObjectSet.find<RenderBox*, FloatingObjectHashTranslator>(floatingObject);
+        ASSERT(floatIt != floatingObjectSet.end());
         if (floatIt != floatingObjectSet.end())
             floatingObjects->remove(*floatIt);
         if (floatingObjects->set().isEmpty())
@@ -5271,7 +5247,7 @@
 // FIXME: This function should go on RenderObject as an instance method. Then
 // all cases in which positionForPoint recurs could call this instead to
 // prevent crossing editable boundaries. This would require many tests.
-static VisiblePosition positionForPointRespectingEditingBoundaries(RenderBlock* parent, RenderBox* child, const LayoutPoint& pointInParentCoordinates)
+static PositionWithAffinity positionForPointRespectingEditingBoundaries(RenderBlock* parent, RenderBox* child, const LayoutPoint& pointInParentCoordinates)
 {
     LayoutPoint childLocation = child->location();
     if (child->isInFlowPositioned())
@@ -5299,16 +5275,16 @@
     LayoutUnit childMiddle = parent->logicalWidthForChild(child) / 2;
     LayoutUnit logicalLeft = parent->isHorizontalWritingMode() ? pointInChildCoordinates.x() : pointInChildCoordinates.y();
     if (logicalLeft < childMiddle)
-        return ancestor->createVisiblePosition(childNode->nodeIndex(), DOWNSTREAM);
-    return ancestor->createVisiblePosition(childNode->nodeIndex() + 1, UPSTREAM);
+        return ancestor->createPositionWithAffinity(childNode->nodeIndex(), DOWNSTREAM);
+    return ancestor->createPositionWithAffinity(childNode->nodeIndex() + 1, UPSTREAM);
 }
 
-VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents)
+PositionWithAffinity RenderBlock::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents)
 {
     ASSERT(childrenInline());
 
     if (!firstRootBox())
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     bool linesAreFlipped = style()->isFlippedLinesWritingMode();
     bool blocksAreFlipped = style()->isFlippedBlocksWritingMode();
@@ -5364,7 +5340,7 @@
                         box = newBox;
                 }
                 // y coordinate is above first root line box, so return the start of the first
-                return VisiblePosition(positionForBox(box, true), DOWNSTREAM);
+                return PositionWithAffinity(positionForBox(box, true), DOWNSTREAM);
             }
         }
 
@@ -5382,13 +5358,13 @@
         ASSERT(moveCaretToBoundary);
         InlineBox* logicallyLastBox;
         if (lastRootBoxWithChildren->getLogicalEndBoxWithNode(logicallyLastBox))
-            return VisiblePosition(positionForBox(logicallyLastBox, false), DOWNSTREAM);
+            return PositionWithAffinity(positionForBox(logicallyLastBox, false), DOWNSTREAM);
     }
 
     // Can't reach this. We have a root line box, but it has no kids.
     // FIXME: This should ASSERT_NOT_REACHED(), but clicking on placeholder text
     // seems to hit this code path.
-    return createVisiblePosition(0, DOWNSTREAM);
+    return createPositionWithAffinity(0, DOWNSTREAM);
 }
 
 static inline bool isChildHitTestCandidate(RenderBox* box)
@@ -5396,7 +5372,7 @@
     return box->height() && box->style()->visibility() == VISIBLE && !box->isFloatingOrOutOfFlowPositioned();
 }
 
-VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderBlock::positionForPoint(const LayoutPoint& point)
 {
     if (isTable())
         return RenderBox::positionForPoint(point);
@@ -5407,9 +5383,9 @@
         LayoutUnit pointLogicalTop = isHorizontalWritingMode() ? point.y() : point.x();
 
         if (pointLogicalTop < 0 || (pointLogicalTop < logicalHeight() && pointLogicalLeft < 0))
-            return createVisiblePosition(caretMinOffset(), DOWNSTREAM);
+            return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
         if (pointLogicalTop >= logicalHeight() || (pointLogicalTop >= 0 && pointLogicalLeft >= logicalWidth()))
-            return createVisiblePosition(caretMaxOffset(), DOWNSTREAM);
+            return createPositionWithAffinity(caretMaxOffset(), DOWNSTREAM);
     }
 
     LayoutPoint pointInContents = point;
@@ -6525,15 +6501,25 @@
         // the normal flow.  We make an exception for marquees, since their baselines are meaningless
         // (the content inside them moves).  This matches WinIE as well, which just bottom-aligns them.
         // We also give up on finding a baseline if we have a vertical scrollbar, or if we are scrolled
-        // vertically (e.g., an overflow:hidden block that has had scrollTop moved) or if the baseline is outside
-        // of our content box.
+        // vertically (e.g., an overflow:hidden block that has had scrollTop moved).
+        // inline-block with overflow should use the bottom of margin box as well.
         bool ignoreBaseline = (layer() && (isMarquee() || (direction == HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset())
-            : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
+            : (layer()->horizontalScrollbar() || layer()->scrollXOffset())))) || (isWritingModeRoot() && !isRubyRun())
+            || (style()->isDisplayInlineType() && style()->overflowY() != OVISIBLE);
 
         int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
 
-        LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
-        if (baselinePos != -1 && baselinePos <= bottomOfContent)
+        if (isDeprecatedFlexibleBox()) {
+            // Historically, we did this check for all baselines. But we can't
+            // remove this code from deprecated flexbox, because it effectively
+            // breaks -webkit-line-clamp, which is used in the wild -- we would
+            // calculate the baseline as if -webkit-line-clamp wasn't used.
+            // For simplicity, we use this for all uses of deprecated flexbox.
+            LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
+            if (baselinePos > bottomOfContent)
+                baselinePos = -1;
+        }
+        if (baselinePos != -1)
             return direction == HorizontalLine ? marginTop() + baselinePos : marginRight() + baselinePos;
 
         return RenderBox::baselinePosition(baselineType, firstLine, direction, linePositionMode);
@@ -6791,7 +6777,7 @@
         // Construct a text fragment for the text after the first letter.
         // This text fragment might be empty.
         RenderTextFragment* remainingText =
-            new (renderArena()) RenderTextFragment(textObj->node() ? textObj->node() : textObj->document(), oldText.get(), length, oldText->length() - length);
+            new RenderTextFragment(textObj->node() ? textObj->node() : textObj->document(), oldText.get(), length, oldText->length() - length);
         remainingText->setStyle(textObj->style());
         if (remainingText->node())
             remainingText->node()->setRenderer(remainingText);
@@ -6803,7 +6789,7 @@
 
         // construct text fragment for the first letter
         RenderTextFragment* letter =
-            new (renderArena()) RenderTextFragment(remainingText->node() ? remainingText->node() : remainingText->document(), oldText.get(), 0, length);
+            new RenderTextFragment(remainingText->node() ? remainingText->node() : remainingText->document(), oldText.get(), 0, length);
         letter->setStyle(pseudoStyle);
         firstLetter->addChild(letter);
 
diff --git a/Source/core/rendering/RenderBlock.h b/Source/core/rendering/RenderBlock.h
index 1ee2475..feca5d0 100644
--- a/Source/core/rendering/RenderBlock.h
+++ b/Source/core/rendering/RenderBlock.h
@@ -227,7 +227,7 @@
     LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
     LayoutUnit textIndentOffset() const;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE;
 
     // Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.)
     virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL;
@@ -331,7 +331,7 @@
         if (!m_rareData)
             m_rareData = adoptPtr(new RenderBlockRareData(this));
         if (m_rareData->m_lineGridBox)
-            m_rareData->m_lineGridBox->destroy(renderArena());
+            m_rareData->m_lineGridBox->destroy();
         m_rareData->m_lineGridBox = box;
     }
     void layoutLineGridBox();
@@ -965,7 +965,7 @@
     void newLine(EClear);
 
     Position positionForBox(InlineBox*, bool start = true) const;
-    VisiblePosition positionForPointWithInlineChildren(const LayoutPoint&);
+    PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&);
 
     virtual void calcColumnWidth();
     void makeChildrenAnonymousColumnBlocks(RenderObject* beforeChild, RenderBlock* newBlockBox, RenderObject* newChild);
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index 4d9d6ec..eb77321 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -23,7 +23,6 @@
 #include "config.h"
 
 #include "core/platform/text/BidiResolver.h"
-#include "core/platform/text/Hyphenation.h"
 #include "core/rendering/InlineIterator.h"
 #include "core/rendering/InlineTextBox.h"
 #include "core/rendering/RenderCombineText.h"
@@ -427,7 +426,7 @@
 
 static inline BidiRun* createRun(int start, int end, RenderObject* obj, InlineBidiResolver& resolver)
 {
-    return new (obj->renderArena()) BidiRun(start, end, obj, resolver.context(), resolver.dir());
+    return new BidiRun(start, end, obj, resolver.context(), resolver.dir());
 }
 
 void RenderBlock::appendRunsForObject(BidiRunList<BidiRun>& runs, int start, int end, RenderObject* obj, InlineBidiResolver& resolver)
@@ -1203,7 +1202,7 @@
         while (BidiContext* parent = baseContext->parent())
             baseContext = parent;
 
-        BidiRun* newTrailingRun = new (renderArena()) BidiRun(firstSpace, trailingSpaceRun->m_stop, trailingSpaceRun->m_object, baseContext, OtherNeutral);
+        BidiRun* newTrailingRun = new BidiRun(firstSpace, trailingSpaceRun->m_stop, trailingSpaceRun->m_object, baseContext, OtherNeutral);
         trailingSpaceRun->m_stop = firstSpace;
         if (direction == LTR)
             bidiRuns.addRun(newTrailingRun);
@@ -1481,15 +1480,15 @@
     RenderFlowThread* m_flowThread;
 };
 
-static void deleteLineRange(LineLayoutState& layoutState, RenderArena* arena, RootInlineBox* startLine, RootInlineBox* stopLine = 0)
+static void deleteLineRange(LineLayoutState& layoutState, RootInlineBox* startLine, RootInlineBox* stopLine = 0)
 {
     RootInlineBox* boxToDelete = startLine;
     while (boxToDelete && boxToDelete != stopLine) {
         layoutState.updateRepaintRangeFromBox(boxToDelete);
-        // Note: deleteLineRange(renderArena(), firstRootBox()) is not identical to deleteLineBoxTree().
+        // Note: deleteLineRange(firstRootBox()) is not identical to deleteLineBoxTree().
         // deleteLineBoxTree uses nextLineBox() instead of nextRootBox() when traversing.
         RootInlineBox* next = boxToDelete->nextRootBox();
-        boxToDelete->deleteLine(arena);
+        boxToDelete->deleteLine();
         boxToDelete = next;
     }
 }
@@ -1534,7 +1533,7 @@
     if (startLine) {
         if (!layoutState.usesRepaintBounds())
             layoutState.setRepaintRange(logicalHeight());
-        deleteLineRange(layoutState, renderArena(), startLine);
+        deleteLineRange(layoutState, startLine);
     }
 
     if (!layoutState.isFullLayout() && lastRootBox() && lastRootBox()->endsWithBreak()) {
@@ -1847,7 +1846,7 @@
 
                         if (availableLogicalWidthForLine(oldLogicalHeight + adjustment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) {
                             // We have to delete this line, remove all floats that got added, and let line layout re-run.
-                            lineBox->deleteLine(renderArena());
+                            lineBox->deleteLine();
                             end = restartLayoutRunsAndFloatsInRange(oldLogicalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, oldEnd);
                             continue;
                         }
@@ -1987,7 +1986,7 @@
             setLogicalHeight(lastRootBox()->lineBottomWithLeading());
         } else {
             // Delete all the remaining lines.
-            deleteLineRange(layoutState, renderArena(), layoutState.endLine());
+            deleteLineRange(layoutState, layoutState.endLine());
         }
     }
 
@@ -1998,7 +1997,7 @@
         if (layoutState.checkForFloatsFromLastLine()) {
             LayoutUnit bottomVisualOverflow = lastRootBox()->logicalBottomVisualOverflow();
             LayoutUnit bottomLayoutOverflow = lastRootBox()->logicalBottomLayoutOverflow();
-            TrailingFloatsRootInlineBox* trailingFloatsLineBox = new (renderArena()) TrailingFloatsRootInlineBox(this);
+            TrailingFloatsRootInlineBox* trailingFloatsLineBox = new TrailingFloatsRootInlineBox(this);
             m_lineBoxes.appendLineBox(trailingFloatsLineBox);
             trailingFloatsLineBox->setConstructed();
             GlyphOverflowAndFallbackFontsMap textBoxDataMap;
@@ -2061,7 +2060,7 @@
     LineLayoutState layoutState(isFullLayout, repaintLogicalTop, repaintLogicalBottom, flowThread);
 
     if (isFullLayout)
-        lineBoxes()->deleteLineBoxes(renderArena());
+        lineBoxes()->deleteLineBoxes();
 
     // Text truncation kicks in in two cases:
     //     1) If your overflow isn't visible and your text-overflow-mode isn't clip.
@@ -2229,12 +2228,11 @@
     if (layoutState.isFullLayout()) {
         // FIXME: This should just call deleteLineBoxTree, but that causes
         // crashes for fast/repaint tests.
-        RenderArena* arena = renderArena();
         curr = firstRootBox();
         while (curr) {
             // Note: This uses nextRootBox() insted of nextLineBox() like deleteLineBoxTree does.
             RootInlineBox* next = curr->nextRootBox();
-            curr->deleteLine(arena);
+            curr->deleteLine();
             curr = next;
         }
         ASSERT(!firstLineBox() && !lastLineBox());
@@ -2413,7 +2411,7 @@
             }
 
             // Now delete the lines that we failed to sync.
-            deleteLineRange(layoutState, renderArena(), originalEndLine, result);
+            deleteLineRange(layoutState, originalEndLine, result);
             return matched;
         }
     }
@@ -2565,72 +2563,6 @@
     return font.width(run, fallbackFonts, &glyphOverflow);
 }
 
-static void tryHyphenating(RenderText* text, const Font& font, const AtomicString& localeIdentifier, unsigned consecutiveHyphenatedLines, int consecutiveHyphenatedLinesLimit, int minimumPrefixLimit, int minimumSuffixLimit, unsigned lastSpace, unsigned pos, float xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
-{
-    // Map 'hyphenate-limit-{before,after}: auto;' to 2.
-    unsigned minimumPrefixLength;
-    unsigned minimumSuffixLength;
-
-    if (minimumPrefixLimit < 0)
-        minimumPrefixLength = 2;
-    else
-        minimumPrefixLength = static_cast<unsigned>(minimumPrefixLimit);
-
-    if (minimumSuffixLimit < 0)
-        minimumSuffixLength = 2;
-    else
-        minimumSuffixLength = static_cast<unsigned>(minimumSuffixLimit);
-
-    if (pos - lastSpace <= minimumSuffixLength)
-        return;
-
-    if (consecutiveHyphenatedLinesLimit >= 0 && consecutiveHyphenatedLines >= static_cast<unsigned>(consecutiveHyphenatedLinesLimit))
-        return;
-
-    int hyphenWidth = measureHyphenWidth(text, font);
-
-    float maxPrefixWidth = availableWidth - xPos - hyphenWidth - lastSpaceWordSpacing;
-    // If the maximum width available for the prefix before the hyphen is small, then it is very unlikely
-    // that an hyphenation opportunity exists, so do not bother to look for it.
-    if (maxPrefixWidth <= font.pixelSize() * 5 / 4)
-        return;
-
-    TextRun run = RenderBlock::constructTextRun(text, font, text, lastSpace, pos - lastSpace, text->style());
-    run.setCharactersLength(text->textLength() - lastSpace);
-    ASSERT(run.charactersLength() >= run.length());
-
-    run.setTabSize(!collapseWhiteSpace, text->style()->tabSize());
-    run.setXPos(xPos + lastSpaceWordSpacing);
-
-    unsigned prefixLength = font.offsetForPosition(run, maxPrefixWidth, false);
-    if (prefixLength < minimumPrefixLength)
-        return;
-
-    prefixLength = lastHyphenLocation(text->substring(lastSpace, pos - lastSpace), min(prefixLength, pos - lastSpace - minimumSuffixLength) + 1, localeIdentifier);
-    if (!prefixLength || prefixLength < minimumPrefixLength)
-        return;
-
-    // When lastSapce is a space, which it always is except sometimes at the beginning of a line or after collapsed
-    // space, it should not count towards hyphenate-limit-before.
-    if (prefixLength == minimumPrefixLength) {
-        UChar characterAtLastSpace = text->characterAt(lastSpace);
-        if (characterAtLastSpace == ' ' || characterAtLastSpace == '\n' || characterAtLastSpace == '\t' || characterAtLastSpace == noBreakSpace)
-            return;
-    }
-
-    ASSERT(pos - lastSpace - prefixLength >= minimumSuffixLength);
-
-#if !ASSERT_DISABLED
-    float prefixWidth = hyphenWidth + textWidth(text, lastSpace, prefixLength, font, xPos, isFixedPitch, collapseWhiteSpace) + lastSpaceWordSpacing;
-    ASSERT(xPos + prefixWidth <= availableWidth);
-#else
-    UNUSED_PARAM(isFixedPitch);
-#endif
-
-    lineBreak.moveTo(text, lastSpace + prefixLength, nextBreakable);
-    hyphenated = true;
-}
-
 class TrailingObjects {
 public:
     TrailingObjects();
@@ -3001,7 +2933,6 @@
             RenderStyle* style = t->style(lineInfo.isFirstLine());
             const Font& f = style->font();
             bool isFixedPitch = f.isFixedPitch();
-            bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canHyphenate(style->locale());
 
             unsigned lastSpace = current.m_pos;
             float wordSpacing = currentStyle->wordSpacing();
@@ -3056,7 +2987,7 @@
                 if (!collapseWhiteSpace || !currentCharacterIsSpace)
                     lineInfo.setEmpty(false, m_block, &width);
 
-                if (c == softHyphen && autoWrap && !hyphenWidth && style->hyphens() != HyphensNone) {
+                if (c == softHyphen && autoWrap && !hyphenWidth) {
                     hyphenWidth = measureHyphenWidth(t, f);
                     width.addUncommittedWidth(hyphenWidth);
                 }
@@ -3070,8 +3001,7 @@
                     midWordBreak = width.committedWidth() + wrapW + charWidth > width.availableWidth();
                 }
 
-                bool betweenWords = c == '\n' || (currWS != PRE && !atStart && isBreakable(renderTextInfo.m_lineBreakIterator, current.m_pos, current.m_nextBreakablePosition)
-                    && (style->hyphens() != HyphensNone || (current.previousInSameNode() != softHyphen)));
+                bool betweenWords = c == '\n' || (currWS != PRE && !atStart && isBreakable(renderTextInfo.m_lineBreakIterator, current.m_pos, current.m_nextBreakablePosition));
 
                 if (betweenWords || midWordBreak) {
                     bool stoppedIgnoringSpaces = false;
@@ -3135,11 +3065,6 @@
                             }
                         }
                         if (lineWasTooWide || !width.fitsOnLine()) {
-                            if (canHyphenate && !width.fitsOnLine()) {
-                                tryHyphenating(t, f, style->locale(), consecutiveHyphenatedLines, blockStyle->hyphenationLimitLines(), style->hyphenationLimitBefore(), style->hyphenationLimitAfter(), lastSpace, current.m_pos, width.currentWidth() - additionalTmpW, width.availableWidth(), isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, current.m_nextBreakablePosition, m_hyphenated);
-                                if (m_hyphenated)
-                                    goto end;
-                            }
                             if (lBreak.atTextParagraphSeparator()) {
                                 if (!stoppedIgnoringSpaces && current.m_pos > 0)
                                     ensureCharacterGetsLineBox(lineMidpointState, current);
@@ -3147,7 +3072,7 @@
                                 lineInfo.setPreviousLineBrokeCleanly(true);
                                 wordMeasurement.endOffset = lBreak.m_pos;
                             }
-                            if (lBreak.m_obj && lBreak.m_pos && lBreak.m_obj->isText() && toRenderText(lBreak.m_obj)->textLength() && toRenderText(lBreak.m_obj)->characterAt(lBreak.m_pos - 1) == softHyphen && style->hyphens() != HyphensNone)
+                            if (lBreak.m_obj && lBreak.m_pos && lBreak.m_obj->isText() && toRenderText(lBreak.m_obj)->textLength() && toRenderText(lBreak.m_obj)->characterAt(lBreak.m_pos - 1) == softHyphen)
                                 m_hyphenated = true;
                             if (lBreak.m_pos && lBreak.m_pos != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {
                                 if (charWidth) {
@@ -3267,10 +3192,7 @@
             includeEndWidth = false;
 
             if (!width.fitsOnLine()) {
-                if (canHyphenate)
-                    tryHyphenating(t, f, style->locale(), consecutiveHyphenatedLines, blockStyle->hyphenationLimitLines(), style->hyphenationLimitBefore(), style->hyphenationLimitAfter(), lastSpace, current.m_pos, width.currentWidth() - additionalTmpW, width.availableWidth(), isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, current.m_nextBreakablePosition, m_hyphenated);
-
-                if (!m_hyphenated && lBreak.previousInSameNode() == softHyphen && style->hyphens() != HyphensNone)
+                if (!m_hyphenated && lBreak.previousInSameNode() == softHyphen)
                     m_hyphenated = true;
 
                 if (m_hyphenated)
@@ -3552,7 +3474,7 @@
 
     setLineGridBox(0);
 
-    RootInlineBox* lineGridBox = new (renderArena()) RootInlineBox(this);
+    RootInlineBox* lineGridBox = new RootInlineBox(this);
     lineGridBox->setHasTextChildren(); // Needed to make the line ascent/descent actually be honored in quirks mode.
     lineGridBox->setConstructed();
     GlyphOverflowAndFallbackFontsMap textBoxDataMap;
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index e596013..dde7f3e 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -47,6 +47,7 @@
 #include "core/rendering/RenderFlexibleBox.h"
 #include "core/rendering/RenderFlowThread.h"
 #include "core/rendering/RenderGeometryMap.h"
+#include "core/rendering/RenderGrid.h"
 #include "core/rendering/RenderInline.h"
 #include "core/rendering/RenderLayer.h"
 #include "core/rendering/RenderLayerCompositor.h"
@@ -305,6 +306,7 @@
     }
 
     updateShapeOutsideInfoAfterStyleChange(style()->shapeOutside(), oldStyle ? oldStyle->shapeOutside() : 0);
+    updateGridPositionAfterStyleChange(oldStyle);
 }
 
 void RenderBox::updateShapeOutsideInfoAfterStyleChange(const ShapeValue* shapeOutside, const ShapeValue* oldShapeOutside)
@@ -321,6 +323,23 @@
     }
 }
 
+void RenderBox::updateGridPositionAfterStyleChange(const RenderStyle* oldStyle)
+{
+    if (!oldStyle || !parent() || !parent()->isRenderGrid())
+        return;
+
+    if (oldStyle->gridColumnStart() == style()->gridColumnStart()
+        && oldStyle->gridColumnEnd() == style()->gridColumnEnd()
+        && oldStyle->gridRowStart() == style()->gridRowStart()
+        && oldStyle->gridRowEnd() == style()->gridRowEnd()
+        && oldStyle->order() == style()->order())
+        return;
+
+    // It should be possible to not dirty the grid in some cases (like moving an explicitly placed grid item).
+    // For now, it's more simple to just always recompute the grid.
+    toRenderGrid(parent())->dirtyGrid();
+}
+
 void RenderBox::updateFromStyle()
 {
     RenderBoxModelObject::updateFromStyle();
@@ -580,10 +599,10 @@
         rects.append(pixelSnappedIntRect(additionalOffset, size()));
 }
 
-void RenderBox::addLayerHitTestRects(LayerHitTestRects& layerRects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const
+void RenderBox::addLayerHitTestRects(LayerHitTestRects& layerRects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
 {
     LayoutPoint adjustedLayerOffset = layerOffset + locationOffset();
-    RenderBoxModelObject::addLayerHitTestRects(layerRects, currentLayer, adjustedLayerOffset);
+    RenderBoxModelObject::addLayerHitTestRects(layerRects, currentLayer, adjustedLayerOffset, containerRect);
 }
 
 void RenderBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutPoint& layerOffset) const
@@ -1814,14 +1833,14 @@
 
 InlineBox* RenderBox::createInlineBox()
 {
-    return new (renderArena()) InlineBox(this);
+    return new InlineBox(this);
 }
 
 void RenderBox::dirtyLineBoxes(bool fullLayout)
 {
     if (m_inlineBoxWrapper) {
         if (fullLayout) {
-            m_inlineBoxWrapper->destroy(renderArena());
+            m_inlineBoxWrapper->destroy();
             m_inlineBoxWrapper = 0;
         } else
             m_inlineBoxWrapper->dirtyLineBoxes();
@@ -1853,7 +1872,7 @@
 
         // Nuke the box.
         box->remove();
-        box->destroy(renderArena());
+        box->destroy();
     } else if (isReplaced()) {
         setLocation(roundedLayoutPoint(box->topLeft()));
         setInlineBoxWrapper(box);
@@ -1865,7 +1884,7 @@
     if (m_inlineBoxWrapper) {
         if (!documentBeingDestroyed())
             m_inlineBoxWrapper->remove();
-        m_inlineBoxWrapper->destroy(renderArena());
+        m_inlineBoxWrapper->destroy();
         m_inlineBoxWrapper = 0;
     }
 }
@@ -4052,11 +4071,11 @@
     return rect;
 }
 
-VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderBox::positionForPoint(const LayoutPoint& point)
 {
     // no children...return this render object's element, if there is one, and offset 0
     if (!firstChild())
-        return createVisiblePosition(nonPseudoNode() ? firstPositionInOrBeforeNode(nonPseudoNode()) : Position());
+        return createPositionWithAffinity(nonPseudoNode() ? firstPositionInOrBeforeNode(nonPseudoNode()) : Position());
 
     if (isTable() && nonPseudoNode()) {
         LayoutUnit right = contentWidth() + borderAndPaddingWidth();
@@ -4064,8 +4083,8 @@
 
         if (point.x() < 0 || point.x() > right || point.y() < 0 || point.y() > bottom) {
             if (point.x() <= right / 2)
-                return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
-            return createVisiblePosition(lastPositionInOrAfterNode(nonPseudoNode()));
+                return createPositionWithAffinity(firstPositionInOrBeforeNode(nonPseudoNode()));
+            return createPositionWithAffinity(lastPositionInOrAfterNode(nonPseudoNode()));
         }
     }
 
@@ -4132,8 +4151,7 @@
 
     if (closestRenderer)
         return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset());
-
-    return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
+    return createPositionWithAffinity(firstPositionInOrBeforeNode(nonPseudoNode()));
 }
 
 bool RenderBox::shrinkToAvoidFloats() const
@@ -4286,13 +4304,12 @@
     if (!m_overflow)
         return;
 
-    LayoutRect noOverflowRect = this->noOverflowRect();
-    if (visualOverflowRect() == noOverflowRect) {
+    if (!hasVisualOverflow()) {
         m_overflow.clear();
         return;
     }
 
-    m_overflow->setLayoutOverflow(noOverflowRect);
+    m_overflow->setLayoutOverflow(noOverflowRect());
 }
 
 inline static bool percentageLogicalHeightIsResolvable(const RenderBox* box)
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index 105f91f..24562dc 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -493,7 +493,7 @@
 
     LayoutRect maskClipRect();
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE;
 
     void removeFloatingOrPositionedChildFromBlockLists();
 
@@ -555,8 +555,8 @@
             return false;
 
         LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect();
-        flipForWritingMode(layoutOverflowRect);
-        return layoutOverflowRect.x() < x() || layoutOverflowRect.maxX() > x() + logicalWidth();
+        LayoutRect noOverflowRect = this->noOverflowRect();
+        return layoutOverflowRect.x() < noOverflowRect.x() || layoutOverflowRect.maxX() > noOverflowRect.maxX();
     }
 
     bool hasVerticalLayoutOverflow() const
@@ -565,8 +565,8 @@
             return false;
 
         LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect();
-        flipForWritingMode(layoutOverflowRect);
-        return layoutOverflowRect.y() < y() || layoutOverflowRect.maxY() > y() + logicalHeight();
+        LayoutRect noOverflowRect = this->noOverflowRect();
+        return layoutOverflowRect.y() < noOverflowRect.y() || layoutOverflowRect.maxY() > noOverflowRect.maxY();
     }
 
     virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) const
@@ -617,11 +617,12 @@
 
     RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild);
 
-    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentCompositedLayer, const LayoutPoint& layerOffset) const OVERRIDE;
+    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const OVERRIDE;
     virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE;
 
 private:
     void updateShapeOutsideInfoAfterStyleChange(const ShapeValue* shapeOutside, const ShapeValue* oldShapeOutside);
+    void updateGridPositionAfterStyleChange(const RenderStyle*);
 
     bool includeVerticalScrollbarSize() const;
     bool includeHorizontalScrollbarSize() const;
diff --git a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
index ded6ea3..8135893 100644
--- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
+++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
@@ -142,7 +142,7 @@
 
 RenderDeprecatedFlexibleBox* RenderDeprecatedFlexibleBox::createAnonymous(Document* document)
 {
-    RenderDeprecatedFlexibleBox* renderer = new (document->renderArena()) RenderDeprecatedFlexibleBox(0);
+    RenderDeprecatedFlexibleBox* renderer = new RenderDeprecatedFlexibleBox(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -899,6 +899,8 @@
 
 void RenderDeprecatedFlexibleBox::applyLineClamp(FlexBoxIterator& iterator, bool relayoutChildren)
 {
+    UseCounter::count(document(), UseCounter::LineClamp);
+
     int maxLineCount = 0;
     for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
         if (childDoesNotAffectWidthOrFlexing(child))
@@ -940,9 +942,8 @@
         if (newHeight == child->height())
             continue;
 
-        child->setChildNeedsLayout(true, MarkOnlyThis);
         child->setOverrideLogicalContentHeight(newHeight - child->borderAndPaddingHeight());
-        child->layoutIfNeeded();
+        child->forceChildLayout();
 
         // FIXME: For now don't support RTL.
         if (style()->direction() != LTR)
diff --git a/Source/core/rendering/RenderEmbeddedObject.cpp b/Source/core/rendering/RenderEmbeddedObject.cpp
index b3d6e27..de41af3 100644
--- a/Source/core/rendering/RenderEmbeddedObject.cpp
+++ b/Source/core/rendering/RenderEmbeddedObject.cpp
@@ -253,8 +253,7 @@
     childBox->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
     childBox->style()->setHeight(Length(newSize.height(), Fixed));
     childBox->style()->setWidth(Length(newSize.width(), Fixed));
-    childBox->setNeedsLayout(true, MarkOnlyThis);
-    childBox->layout();
+    childBox->forceLayout();
     setChildNeedsLayout(false);
 
     statePusher.pop();
diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp
index 7228e4b..0a6e67b 100644
--- a/Source/core/rendering/RenderFileUploadControl.cpp
+++ b/Source/core/rendering/RenderFileUploadControl.cpp
@@ -25,7 +25,6 @@
 #include "HTMLNames.h"
 #include "core/dom/shadow/ElementShadow.h"
 #include "core/dom/shadow/ShadowRoot.h"
-#include "core/editing/VisiblePosition.h"
 #include "core/fileapi/FileList.h"
 #include "core/html/HTMLInputElement.h"
 #include "core/platform/graphics/Font.h"
@@ -204,9 +203,9 @@
     setPreferredLogicalWidthsDirty(false);
 }
 
-VisiblePosition RenderFileUploadControl::positionForPoint(const LayoutPoint&)
+PositionWithAffinity RenderFileUploadControl::positionForPoint(const LayoutPoint&)
 {
-    return VisiblePosition();
+    return PositionWithAffinity();
 }
 
 HTMLInputElement* RenderFileUploadControl::uploadButton() const
diff --git a/Source/core/rendering/RenderFileUploadControl.h b/Source/core/rendering/RenderFileUploadControl.h
index acfa504..3a9e343 100644
--- a/Source/core/rendering/RenderFileUploadControl.h
+++ b/Source/core/rendering/RenderFileUploadControl.h
@@ -54,7 +54,7 @@
 
     int maxFilenameWidth() const;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
 
     HTMLInputElement* uploadButton() const;
 
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
index b91e99d..40c26e0 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -80,7 +80,7 @@
 
 RenderFlexibleBox* RenderFlexibleBox::createAnonymous(Document* document)
 {
-    RenderFlexibleBox* renderer = new (document->renderArena()) RenderFlexibleBox(0);
+    RenderFlexibleBox* renderer = new RenderFlexibleBox(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -1338,8 +1338,7 @@
             if (desiredLogicalHeight != child->logicalHeight()) {
                 child->setOverrideLogicalContentHeight(desiredLogicalHeight - child->borderAndPaddingLogicalHeight());
                 child->setLogicalHeight(0);
-                child->setChildNeedsLayout(true, MarkOnlyThis);
-                child->layout();
+                child->forceChildLayout();
             }
         }
     } else if (isColumnFlow() && child->style()->logicalWidth().isAuto()) {
@@ -1350,8 +1349,7 @@
 
             if (childWidth != child->logicalWidth()) {
                 child->setOverrideLogicalContentWidth(childWidth - child->borderAndPaddingLogicalWidth());
-                child->setChildNeedsLayout(true, MarkOnlyThis);
-                child->layout();
+                child->forceChildLayout();
             }
         }
     }
diff --git a/Source/core/rendering/RenderFlowThread.cpp b/Source/core/rendering/RenderFlowThread.cpp
index 45d89f4..a6b3ae8 100644
--- a/Source/core/rendering/RenderFlowThread.cpp
+++ b/Source/core/rendering/RenderFlowThread.cpp
@@ -161,12 +161,12 @@
 
                 region->deleteAllRenderBoxRegionInfo();
 
-                // In the normal layout phase we need to initialize the overrideLogicalContentHeight for auto-height regions.
-                // See initializeRegionsOverrideLogicalContentHeight for the explanation.
+                // In the normal layout phase we need to initialize the computedAutoHeight for auto-height regions.
+                // See initializeRegionsComputedAutoHeight for the explanation.
                 // Also, if we have auto-height regions we can't assume m_regionsHaveUniformLogicalHeight to be true in the first phase
                 // because the auto-height regions don't have their height computed yet.
                 if (!inConstrainedLayoutPhase() && region->hasAutoLogicalHeight()) {
-                    region->setOverrideLogicalContentHeight(region->maxPageLogicalHeight());
+                    region->setComputedAutoHeight(region->maxPageLogicalHeight());
                     m_regionsHaveUniformLogicalHeight = false;
                 }
 
@@ -200,7 +200,7 @@
     // In case this is the second pass of the normal phase we need to update the auto-height regions to their initial value.
     // If the region chain was invalidated this will happen anyway.
     if (!m_regionsInvalidated && !inConstrainedLayoutPhase())
-        initializeRegionsOverrideLogicalContentHeight();
+        initializeRegionsComputedAutoHeight();
 
     validateRegions();
 
@@ -729,7 +729,7 @@
 void RenderFlowThread::applyBreakAfterContent(LayoutUnit clientHeight)
 {
     // Simulate a region break at height. If it points inside an auto logical height region,
-    // then it may determine the region override logical content height.
+    // then it may determine the region computed autoheight.
     addForcedRegionBreak(clientHeight, this, false);
 }
 
@@ -824,7 +824,7 @@
 // During the normal layout phase of the named flow the regions are initialized with a height equal to their max-height.
 // This way unforced breaks are automatically placed when a region is full and the content height/position correctly estimated.
 // Also, the region where a forced break falls is exactly the region found at the forced break offset inside the flow content.
-void RenderFlowThread::initializeRegionsOverrideLogicalContentHeight(RenderRegion* startRegion)
+void RenderFlowThread::initializeRegionsComputedAutoHeight(RenderRegion* startRegion)
 {
     ASSERT(!inConstrainedLayoutPhase());
     if (!hasAutoLogicalHeightRegions())
@@ -834,7 +834,7 @@
     for (; regionIter != m_regionList.end(); ++regionIter) {
         RenderRegion* region = *regionIter;
         if (region->hasAutoLogicalHeight())
-            region->setOverrideLogicalContentHeight(region->maxPageLogicalHeight());
+            region->setComputedAutoHeight(region->maxPageLogicalHeight());
     }
 }
 
@@ -864,9 +864,9 @@
     for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
         RenderRegion* region = *iter;
 
-        // If we find an empty auto-height region, clear the overrideLogicalContentHeight value.
+        // If we find an empty auto-height region, clear the computedAutoHeight value.
         if (emptyRegionsSegment && region->hasAutoLogicalHeight())
-            region->clearOverrideLogicalContentHeight();
+            region->clearComputedAutoHeight();
 
         LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
         LayoutUnit regionLogicalHeight = std::min<LayoutUnit>(LayoutUnit::max() / 2 - logicalHeight, region->logicalHeightOfAllFlowThreadContent());
@@ -894,7 +894,7 @@
 {
     // We take breaks into account for height computation for auto logical height regions
     // only in the layout phase in which we lay out the flows threads unconstrained
-    // and we use the content breaks to determine the overrideContentLogicalHeight for
+    // and we use the content breaks to determine the computedAutoHeight for
     // auto logical height regions.
     if (inConstrainedLayoutPhase())
         return false;
@@ -908,7 +908,7 @@
         RenderRegionList::iterator regionIter = m_regionList.find(iter->value);
         ASSERT(regionIter != m_regionList.end());
         ASSERT((*regionIter)->hasAutoLogicalHeight());
-        initializeRegionsOverrideLogicalContentHeight(*regionIter);
+        initializeRegionsComputedAutoHeight(*regionIter);
 
         // We need to update the regions flow thread portion rect because we are going to process
         // a break on these regions.
@@ -916,13 +916,13 @@
     }
 
     // Simulate a region break at offsetBreakInFlowThread. If it points inside an auto logical height region,
-    // then it determines the region override logical content height.
+    // then it determines the region computed auto height.
     RenderRegion* region = regionAtBlockOffset(offsetBreakInFlowThread);
     if (!region)
         return false;
 
     bool lastBreakAfterContent = breakChild == this;
-    bool overrideLogicalContentHeightComputed = false;
+    bool hasComputedAutoHeight = false;
 
     LayoutUnit currentRegionOffsetInFlowThread = isHorizontalWritingMode() ? region->flowThreadPortionRect().y() : region->flowThreadPortionRect().x();
     LayoutUnit offsetBreakInCurrentRegion = offsetBreakInFlowThread - currentRegionOffsetInFlowThread;
@@ -930,36 +930,36 @@
     if (region->hasAutoLogicalHeight()) {
         // A forced break can appear only in an auto-height region that didn't have a forced break before.
         // This ASSERT is a good-enough heuristic to verify the above condition.
-        ASSERT(region->maxPageLogicalHeight() == region->overrideLogicalContentHeight());
+        ASSERT(region->maxPageLogicalHeight() == region->computedAutoHeight());
 
         mapToUse.set(breakChild, region);
 
-        overrideLogicalContentHeightComputed = true;
+        hasComputedAutoHeight = true;
 
         // Compute the region height pretending that the offsetBreakInCurrentRegion is the logicalHeight for the auto-height region.
-        LayoutUnit regionOverrideLogicalContentHeight = region->constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion, -1);
+        LayoutUnit regionComputedAutoHeight = region->constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion, -1);
 
         // The new height of this region needs to be smaller than the initial value, the max height. A forced break is the only way to change the initial
         // height of an auto-height region besides content ending.
-        ASSERT(regionOverrideLogicalContentHeight <= region->maxPageLogicalHeight());
+        ASSERT(regionComputedAutoHeight <= region->maxPageLogicalHeight());
 
-        region->setOverrideLogicalContentHeight(regionOverrideLogicalContentHeight);
+        region->setComputedAutoHeight(regionComputedAutoHeight);
 
-        currentRegionOffsetInFlowThread += regionOverrideLogicalContentHeight;
+        currentRegionOffsetInFlowThread += regionComputedAutoHeight;
     } else
         currentRegionOffsetInFlowThread += isHorizontalWritingMode() ? region->flowThreadPortionRect().height() : region->flowThreadPortionRect().width();
 
     // If the break was found inside an auto-height region its size changed so we need to recompute the flow thread portion rectangles.
-    // Also, if this is the last break after the content we need to clear the overrideLogicalContentHeight value on the last empty regions.
+    // Also, if this is the last break after the content we need to clear the computedAutoHeight value on the last empty regions.
     if (hasAutoLogicalHeightRegions() && lastBreakAfterContent)
         updateRegionsFlowThreadPortionRect(region);
-    else if (overrideLogicalContentHeightComputed)
+    else if (hasComputedAutoHeight)
         updateRegionsFlowThreadPortionRect();
 
     if (offsetBreakAdjustment)
         *offsetBreakAdjustment = max<LayoutUnit>(0, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
 
-    return overrideLogicalContentHeightComputed;
+    return hasComputedAutoHeight;
 }
 
 void RenderFlowThread::incrementAutoLogicalHeightRegions()
diff --git a/Source/core/rendering/RenderFlowThread.h b/Source/core/rendering/RenderFlowThread.h
index 27ea3ac..18fb7db 100644
--- a/Source/core/rendering/RenderFlowThread.h
+++ b/Source/core/rendering/RenderFlowThread.h
@@ -191,7 +191,7 @@
     virtual void dispatchRegionLayoutUpdateEvent() { m_dispatchRegionLayoutUpdateEvent = false; }
     virtual void dispatchRegionOversetChangeEvent() { m_dispatchRegionOversetChangeEvent = false; }
 
-    void initializeRegionsOverrideLogicalContentHeight(RenderRegion* = 0);
+    void initializeRegionsComputedAutoHeight(RenderRegion* = 0);
 
     virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { };
 
diff --git a/Source/core/rendering/RenderFullScreen.cpp b/Source/core/rendering/RenderFullScreen.cpp
index dea4e45..b98c229 100644
--- a/Source/core/rendering/RenderFullScreen.cpp
+++ b/Source/core/rendering/RenderFullScreen.cpp
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "core/rendering/RenderFullScreen.h"
 
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 
 using namespace WebCore;
 
@@ -58,7 +58,7 @@
 
 RenderFullScreen* RenderFullScreen::createAnonymous(Document* document)
 {
-    RenderFullScreen* renderer = new (document->renderArena()) RenderFullScreen();
+    RenderFullScreen* renderer = new RenderFullScreen();
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -75,7 +75,7 @@
     // RenderObjects are unretained, so notify the document (which holds a pointer to a RenderFullScreen)
     // if it's RenderFullScreen is destroyed.
     if (document()) {
-        FullscreenController* controller = FullscreenController::from(document());
+        FullscreenElementStack* controller = FullscreenElementStack::from(document());
         if (controller->fullScreenRenderer() == this)
             controller->fullScreenRendererDestroyed();
     }
@@ -140,7 +140,7 @@
         fullscreenRenderer->setNeedsLayoutAndPrefWidthsRecalc();
     }
 
-    FullscreenController::from(document)->setFullScreenRenderer(fullscreenRenderer);
+    FullscreenElementStack::from(document)->setFullScreenRenderer(fullscreenRenderer);
     return fullscreenRenderer;
 }
 
@@ -162,7 +162,7 @@
     if (placeholder())
         placeholder()->remove();
     remove();
-    FullscreenController::from(document())->setFullScreenRenderer(0);
+    FullscreenElementStack::from(document())->setFullScreenRenderer(0);
 }
 
 void RenderFullScreen::setPlaceholder(RenderBlock* placeholder)
@@ -178,7 +178,7 @@
         style->setHeight(Length(frameRect.height(), Fixed));
 
     if (!m_placeholder) {
-        m_placeholder = new (document()->renderArena()) RenderFullScreenPlaceholder(this);
+        m_placeholder = new RenderFullScreenPlaceholder(this);
         m_placeholder->setStyle(style);
         if (parent()) {
             parent()->addChild(m_placeholder, this);
diff --git a/Source/core/rendering/RenderGrid.cpp b/Source/core/rendering/RenderGrid.cpp
index 837e189..041dd4e 100644
--- a/Source/core/rendering/RenderGrid.cpp
+++ b/Source/core/rendering/RenderGrid.cpp
@@ -150,6 +150,7 @@
 
 RenderGrid::RenderGrid(Element* element)
     : RenderBlock(element)
+    , m_gridIsDirty(true)
     , m_orderIterator(this)
 {
     // All of our children must be block level.
@@ -160,6 +161,70 @@
 {
 }
 
+void RenderGrid::addChild(RenderObject* newChild, RenderObject* beforeChild)
+{
+    RenderBlock::addChild(newChild, beforeChild);
+
+    if (gridIsDirty())
+        return;
+
+    RenderBox* newChildBox = toRenderBox(newChild);
+    OwnPtr<GridSpan> rowPositions = resolveGridPositionsFromStyle(newChildBox, ForRows);
+    OwnPtr<GridSpan> columnPositions = resolveGridPositionsFromStyle(newChildBox, ForColumns);
+    if (!rowPositions || !columnPositions) {
+        // The new child requires the auto-placement algorithm to run so we need to recompute the grid fully.
+        dirtyGrid();
+    } else {
+        if (gridRowCount() <= rowPositions->finalPositionIndex || gridColumnCount() <= columnPositions->finalPositionIndex) {
+            // FIXME: We could just insert the new child provided we had a primitive to arbitrarily grow the grid.
+            dirtyGrid();
+        } else {
+            insertItemIntoGrid(newChildBox, GridCoordinate(*rowPositions, *columnPositions));
+        }
+    }
+}
+
+void RenderGrid::removeChild(RenderObject* child)
+{
+    RenderBlock::removeChild(child);
+
+    if (gridIsDirty())
+        return;
+
+    ASSERT(child->isBox());
+    // FIXME: We could avoid dirtying the grid in some cases (e.g. if it's an explicitly positioned element).
+    dirtyGrid();
+}
+
+void RenderGrid::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+    RenderBlock::styleDidChange(diff, oldStyle);
+    if (!oldStyle)
+        return;
+
+    // FIXME: The following checks could be narrowed down if we kept track of which type of grid items we have:
+    // - explicit grid size changes impact negative explicitely positioned and auto-placed grid items.
+    // - named grid lines only impact grid items with named grid lines.
+    // - auto-flow changes only impacts auto-placed children.
+
+    if (explicitGridDidResize(oldStyle)
+        || namedGridLinesDefinitionDidChange(oldStyle)
+        || oldStyle->gridAutoFlow() != style()->gridAutoFlow())
+        dirtyGrid();
+}
+
+bool RenderGrid::explicitGridDidResize(const RenderStyle* oldStyle) const
+{
+    return oldStyle->gridDefinitionColumns().size() != style()->gridDefinitionColumns().size()
+        || oldStyle->gridDefinitionRows().size() != style()->gridDefinitionRows().size();
+}
+
+bool RenderGrid::namedGridLinesDefinitionDidChange(const RenderStyle* oldStyle) const
+{
+    return oldStyle->namedGridRowLines() != style()->namedGridRowLines()
+        || oldStyle->namedGridColumnLines() != style()->namedGridColumnLines();
+}
+
 void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit)
 {
     ASSERT(needsLayout());
@@ -229,8 +294,6 @@
 
         // FIXME: This should add in the scrollbarWidth (e.g. see RenderFlexibleBox).
     }
-
-    const_cast<RenderGrid*>(this)->clearGrid();
 }
 
 void RenderGrid::computePreferredLogicalWidths()
@@ -621,11 +684,17 @@
 
 void RenderGrid::placeItemsOnGrid()
 {
-    ASSERT(!gridWasPopulated());
+    if (!gridIsDirty())
+        return;
+
     ASSERT(m_gridItemCoordinate.isEmpty());
 
     populateExplicitGridAndOrderIterator();
 
+    // We clear the dirty bit here as the grid sizes have been updated, this means
+    // that we can safely call gridRowCount() / gridColumnCount().
+    m_gridIsDirty = false;
+
     Vector<RenderBox*> autoMajorAxisAutoGridItems;
     Vector<RenderBox*> specifiedMajorAxisAutoGridItems;
     GridAutoFlow autoFlow = style()->gridAutoFlow();
@@ -657,6 +726,8 @@
 
     placeSpecifiedMajorAxisItemsOnGrid(specifiedMajorAxisAutoGridItems);
     placeAutoMajorAxisItemsOnGrid(autoMajorAxisAutoGridItems);
+
+    m_grid.shrinkToFit();
 }
 
 void RenderGrid::populateExplicitGridAndOrderIterator()
@@ -753,10 +824,11 @@
     return (flow == AutoFlowColumn) ? ForRows : ForColumns;
 }
 
-void RenderGrid::clearGrid()
+void RenderGrid::dirtyGrid()
 {
-    m_grid.clear();
+    m_grid.resize(0);
     m_gridItemCoordinate.clear();
+    m_gridIsDirty = true;
 }
 
 void RenderGrid::layoutGridItems()
@@ -811,7 +883,6 @@
     // FIXME: We should handle min / max logical height.
 
     setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight());
-    clearGrid();
 }
 
 GridCoordinate RenderGrid::cachedGridCoordinate(const RenderBox* gridItem) const
@@ -837,7 +908,7 @@
     // We should NEVER see both spans as they should have been handled during style resolve.
     ASSERT(!initialPosition.isSpan() || !finalPosition.isSpan());
 
-    if (initialPosition.isAuto() && finalPosition.isAuto()) {
+    if (initialPosition.shouldBeResolvedAgainstOppositePosition() && finalPosition.shouldBeResolvedAgainstOppositePosition()) {
         if (style()->gridAutoFlow() == AutoFlowNone)
             return adoptPtr(new GridSpan(0, 0));
 
diff --git a/Source/core/rendering/RenderGrid.h b/Source/core/rendering/RenderGrid.h
index eddf270..0966ec3 100644
--- a/Source/core/rendering/RenderGrid.h
+++ b/Source/core/rendering/RenderGrid.h
@@ -54,11 +54,21 @@
     virtual bool avoidsFloats() const OVERRIDE { return true; }
     virtual bool canCollapseAnonymousBlockChild() const OVERRIDE { return false; }
 
+    void dirtyGrid();
+
 private:
     virtual bool isRenderGrid() const OVERRIDE { return true; }
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;
     virtual void computePreferredLogicalWidths() OVERRIDE;
 
+    virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
+    virtual void removeChild(RenderObject*) OVERRIDE;
+
+    virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE;
+
+    bool explicitGridDidResize(const RenderStyle*) const;
+    bool namedGridLinesDefinitionDidChange(const RenderStyle*) const;
+
     LayoutUnit computePreferredTrackWidth(const GridLength&, size_t) const;
 
     class GridIterator;
@@ -81,7 +91,6 @@
     TrackSizingDirection autoPlacementMinorAxisDirection() const;
 
     void layoutGridItems();
-    void clearGrid();
 
     typedef LayoutUnit (RenderGrid::* SizingFunction)(RenderBox*, TrackSizingDirection, Vector<GridTrack>&);
     typedef LayoutUnit (GridTrack::* AccumulatorGetter)() const;
@@ -116,27 +125,44 @@
 
     virtual void paintChildren(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
 
+    bool gridIsDirty() const { return m_gridIsDirty; }
+
 #ifndef NDEBUG
     bool tracksAreWiderThanMinTrackBreadth(TrackSizingDirection, const Vector<GridTrack>&);
-    bool gridWasPopulated() const { return !m_grid.isEmpty() && !m_grid[0].isEmpty(); }
 #endif
 
     size_t gridColumnCount() const
     {
-        ASSERT(gridWasPopulated());
+        ASSERT(!gridIsDirty());
         return m_grid[0].size();
     }
     size_t gridRowCount() const
     {
-        ASSERT(gridWasPopulated());
+        ASSERT(!gridIsDirty());
         return m_grid.size();
     }
 
     Vector<Vector<Vector<RenderBox*, 1> > > m_grid;
+    bool m_gridIsDirty;
     HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate;
     OrderIterator m_orderIterator;
 };
 
+inline RenderGrid* toRenderGrid(RenderObject* object)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderGrid());
+    return static_cast<RenderGrid*>(object);
+}
+
+inline const RenderGrid* toRenderGrid(const RenderObject* object)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderGrid());
+    return static_cast<const RenderGrid*>(object);
+}
+
+// Catch unneeded cast.
+void toRenderGrid(const RenderGrid*);
+
 } // namespace WebCore
 
 #endif // RenderGrid_h
diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp
index 8179918..d1ac1ea 100644
--- a/Source/core/rendering/RenderImage.cpp
+++ b/Source/core/rendering/RenderImage.cpp
@@ -64,7 +64,7 @@
 
 RenderImage* RenderImage::createAnonymous(Document* document)
 {
-    RenderImage* image = new (document->renderArena()) RenderImage(0);
+    RenderImage* image = new RenderImage(0);
     image->setDocumentForAnonymous(document);
     return image;
 }
@@ -159,7 +159,7 @@
     if (!m_imageResource)
         return;
 
-    if (newImage != m_imageResource->imagePtr() || !newImage)
+    if (newImage != m_imageResource->imagePtr())
         return;
 
     if (!m_didIncrementVisuallyNonEmptyPixelCount) {
@@ -171,7 +171,7 @@
     bool imageSizeChanged = false;
 
     // Set image dimensions, taking into account the size of the alt text.
-    if (m_imageResource->errorOccurred()) {
+    if (m_imageResource->errorOccurred() || !newImage) {
         if (!m_altText.isEmpty() && document()->hasPendingStyleRecalc()) {
             ASSERT(node());
             if (node()) {
@@ -190,7 +190,7 @@
 {
     if (newSize == intrinsicSize() && !imageSizeChanged)
         return false;
-    if (m_imageResource->errorOccurred())
+    if (m_imageResource->errorOccurred() || !m_imageResource->hasImage())
         return imageSizeChanged;
     setIntrinsicSize(newSize);
     return true;
diff --git a/Source/core/rendering/RenderImageResource.cpp b/Source/core/rendering/RenderImageResource.cpp
index d6504f7..9ac02de 100644
--- a/Source/core/rendering/RenderImageResource.cpp
+++ b/Source/core/rendering/RenderImageResource.cpp
@@ -73,6 +73,8 @@
         m_cachedImage->addClient(m_renderer);
         if (m_cachedImage->errorOccurred())
             m_renderer->imageChanged(m_cachedImage.get());
+    } else {
+        m_renderer->imageChanged(m_cachedImage.get());
     }
 }
 
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index ea48c87..9aa9940 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -23,8 +23,7 @@
 #include "config.h"
 #include "core/rendering/RenderInline.h"
 
-#include "core/dom/FullscreenController.h"
-#include "core/editing/VisiblePosition.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/page/Chrome.h"
 #include "core/page/Frame.h"
 #include "core/page/Page.h"
@@ -33,7 +32,6 @@
 #include "core/platform/graphics/transforms/TransformState.h"
 #include "core/rendering/HitTestResult.h"
 #include "core/rendering/InlineTextBox.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderBlock.h"
 #include "core/rendering/RenderFlowThread.h"
 #include "core/rendering/RenderFullScreen.h"
@@ -56,7 +54,7 @@
 
 RenderInline* RenderInline::createAnonymous(Document* document)
 {
-    RenderInline* renderer = new (document->renderArena()) RenderInline(0);
+    RenderInline* renderer = new RenderInline(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
@@ -111,7 +109,7 @@
             parent()->dirtyLinesFromChangedChild(this);
     }
 
-    m_lineBoxes.deleteLineBoxes(renderArena());
+    m_lineBoxes.deleteLineBoxes();
 
     RenderBoxModelObject::willBeDestroyed();
 }
@@ -332,7 +330,7 @@
 
 RenderInline* RenderInline::clone() const
 {
-    RenderInline* cloneInline = new (renderArena()) RenderInline(node());
+    RenderInline* cloneInline = new RenderInline(node());
     cloneInline->setStyle(style());
     cloneInline->setFlowThreadState(flowThreadState());
     return cloneInline;
@@ -351,7 +349,7 @@
     // that renderer is wrapped in a RenderFullScreen, so |this| is not its
     // parent. Since the splitting logic expects |this| to be the parent, set
     // |beforeChild| to be the RenderFullScreen.
-    if (FullscreenController* fullscreen = FullscreenController::fromIfExists(document())) {
+    if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document())) {
         const Element* fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
         if (fullScreenElement && beforeChild && beforeChild->node() == fullScreenElement)
             beforeChild = fullscreen->fullScreenRenderer();
@@ -475,9 +473,6 @@
     // time in makeChildrenNonInline by just setting this explicitly up front.
     newBlockBox->setChildrenInline(false);
 
-    // We delayed adding the newChild until now so that the |newBlockBox| would be fully
-    // connected, thus allowing newChild access to a renderArena should it need
-    // to wrap itself in additional boxes (e.g., table construction).
     newBlockBox->addChild(newChild);
 
     // Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
@@ -807,7 +802,7 @@
     return false;
 }
 
-VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderInline::positionForPoint(const LayoutPoint& point)
 {
     // FIXME: Does not deal with relative or sticky positioned inlines (should it?)
     RenderBlock* cb = containingBlock();
@@ -1244,7 +1239,7 @@
 void RenderInline::dirtyLineBoxes(bool fullLayout)
 {
     if (fullLayout) {
-        m_lineBoxes.deleteLineBoxes(renderArena());
+        m_lineBoxes.deleteLineBoxes();
         return;
     }
 
@@ -1275,12 +1270,12 @@
 
 void RenderInline::deleteLineBoxTree()
 {
-    m_lineBoxes.deleteLineBoxTree(renderArena());
+    m_lineBoxes.deleteLineBoxTree();
 }
 
 InlineFlowBox* RenderInline::createInlineFlowBox()
 {
-    return new (renderArena()) InlineFlowBox(this);
+    return new InlineFlowBox(this);
 }
 
 InlineFlowBox* RenderInline::createAndAppendInlineFlowBox()
diff --git a/Source/core/rendering/RenderInline.h b/Source/core/rendering/RenderInline.h
index dfa2889..6e2e7f9 100644
--- a/Source/core/rendering/RenderInline.h
+++ b/Source/core/rendering/RenderInline.h
@@ -148,7 +148,7 @@
 
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
 
     virtual LayoutRect frameRectForStickyPositioning() const OVERRIDE FINAL { return linesBoundingBox(); }
 
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 19e1a9b..a228494 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -66,6 +66,7 @@
 #include "core/page/animation/AnimationController.h"
 #include "core/page/scrolling/ScrollingCoordinator.h"
 #include "core/platform/HistogramSupport.h"
+#include "core/platform/Partitions.h"
 #include "core/platform/PlatformGestureEvent.h"
 #include "core/platform/PlatformMouseEvent.h"
 #include "core/platform/ScrollAnimator.h"
@@ -90,7 +91,6 @@
 #include "core/rendering/HitTestResult.h"
 #include "core/rendering/HitTestingTransformState.h"
 #include "core/rendering/OverlapTestRequestClient.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderFlowThread.h"
 #include "core/rendering/RenderGeometryMap.h"
 #include "core/rendering/RenderInline.h"
@@ -1318,6 +1318,29 @@
     return renderer()->absoluteBoundingBoxRect();
 }
 
+bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const
+{
+    RenderBox* box = renderBox();
+    ASSERT(box);
+
+    EOverflow overflowStyle = (orientation == HorizontalScrollbar) ?
+        renderer()->style()->overflowX() : renderer()->style()->overflowY();
+    return (overflowStyle == OSCROLL || overflowStyle == OAUTO);
+}
+
+int RenderLayer::pageStep(ScrollbarOrientation orientation) const
+{
+    RenderBox* box = renderBox();
+    ASSERT(box);
+
+    int length = (orientation == HorizontalScrollbar) ?
+        box->pixelSnappedClientWidth() : box->pixelSnappedClientHeight();
+    int minPageStep = static_cast<float>(length) * ScrollableArea::minFractionToStepWhenPaging();
+    int pageStep = max(minPageStep, length - ScrollableArea::maxOverlapBetweenPages());
+
+    return max(pageStep, 1);
+}
+
 RenderLayer* RenderLayer::enclosingTransformedAncestor() const
 {
     RenderLayer* curr = parent();
@@ -1616,23 +1639,14 @@
     }
 }
 
-void* RenderLayer::operator new(size_t sz, RenderArena* renderArena)
+void* RenderLayer::operator new(size_t sz)
 {
-    return renderArena->allocate(sz);
+    return partitionAlloc(Partitions::getRenderingPartition(), sz);
 }
 
-void RenderLayer::operator delete(void* ptr, size_t sz)
+void RenderLayer::operator delete(void* ptr)
 {
-    // Stash size where destroy can find it.
-    *(size_t *)ptr = sz;
-}
-
-void RenderLayer::destroy(RenderArena* renderArena)
-{
-    delete this;
-
-    // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*(size_t *)this, this);
+    partitionFree(ptr);
 }
 
 void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
@@ -2472,17 +2486,8 @@
 
 int RenderLayer::scrollSize(ScrollbarOrientation orientation) const
 {
-    Scrollbar* scrollbar = ((orientation == HorizontalScrollbar) ? m_hBar : m_vBar).get();
-    return scrollbar ? (scrollbar->totalSize() - scrollbar->visibleSize()) : 0;
-}
-
-int RenderLayer::scrollPosition(Scrollbar* scrollbar) const
-{
-    if (scrollbar->orientation() == HorizontalScrollbar)
-        return scrollXOffset();
-    if (scrollbar->orientation() == VerticalScrollbar)
-        return scrollYOffset();
-    return 0;
+    IntSize scrollDimensions = maximumScrollPosition() - minimumScrollPosition();
+    return (orientation == HorizontalScrollbar) ? scrollDimensions.width() : scrollDimensions.height();
 }
 
 IntPoint RenderLayer::scrollPosition() const
@@ -2501,9 +2506,7 @@
     if (!box || !box->hasOverflowClip())
         return -scrollOrigin();
 
-    LayoutRect overflowRect(box->layoutOverflowRect());
-    box->flipForWritingMode(overflowRect);
-    return -scrollOrigin() + enclosingIntRect(overflowRect).size() - enclosingIntRect(box->clientBoxRect()).size();
+    return -scrollOrigin() + enclosingIntRect(m_overflowRect).size() - enclosingIntRect(box->clientBoxRect()).size();
 }
 
 IntRect RenderLayer::visibleContentRect(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
@@ -2843,14 +2846,6 @@
     scrollbar = 0;
 }
 
-bool RenderLayer::scrollsOverflow() const
-{
-    if (!renderer()->isBox())
-        return false;
-
-    return toRenderBox(renderer())->scrollsOverflow();
-}
-
 void RenderLayer::setHasHorizontalScrollbar(bool hasScrollbar)
 {
     if (hasScrollbar == hasHorizontalScrollbar())
@@ -2972,7 +2967,7 @@
     ASSERT(renderBox());
     if (m_scrollDimensionsDirty)
         const_cast<RenderLayer*>(this)->computeScrollDimensions();
-    return snapSizeToPixel(m_scrollSize.width(), renderBox()->clientLeft() + renderBox()->x());
+    return snapSizeToPixel(m_overflowRect.width(), renderBox()->clientLeft() + renderBox()->x());
 }
 
 int RenderLayer::scrollHeight() const
@@ -2980,39 +2975,7 @@
     ASSERT(renderBox());
     if (m_scrollDimensionsDirty)
         const_cast<RenderLayer*>(this)->computeScrollDimensions();
-    return snapSizeToPixel(m_scrollSize.height(), renderBox()->clientTop() + renderBox()->y());
-}
-
-LayoutUnit RenderLayer::overflowTop() const
-{
-    RenderBox* box = renderBox();
-    LayoutRect overflowRect(box->layoutOverflowRect());
-    box->flipForWritingMode(overflowRect);
-    return overflowRect.y();
-}
-
-LayoutUnit RenderLayer::overflowBottom() const
-{
-    RenderBox* box = renderBox();
-    LayoutRect overflowRect(box->layoutOverflowRect());
-    box->flipForWritingMode(overflowRect);
-    return overflowRect.maxY();
-}
-
-LayoutUnit RenderLayer::overflowLeft() const
-{
-    RenderBox* box = renderBox();
-    LayoutRect overflowRect(box->layoutOverflowRect());
-    box->flipForWritingMode(overflowRect);
-    return overflowRect.x();
-}
-
-LayoutUnit RenderLayer::overflowRight() const
-{
-    RenderBox* box = renderBox();
-    LayoutRect overflowRect(box->layoutOverflowRect());
-    box->flipForWritingMode(overflowRect);
-    return overflowRect.maxX();
+    return snapSizeToPixel(m_overflowRect.height(), renderBox()->clientTop() + renderBox()->y());
 }
 
 void RenderLayer::computeScrollDimensions()
@@ -3022,11 +2985,11 @@
 
     m_scrollDimensionsDirty = false;
 
-    m_scrollSize.setWidth(overflowRight() - overflowLeft());
-    m_scrollSize.setHeight(overflowBottom() - overflowTop());
+    m_overflowRect = box->layoutOverflowRect();
+    box->flipForWritingMode(m_overflowRect);
 
-    int scrollableLeftOverflow = overflowLeft() - box->borderLeft();
-    int scrollableTopOverflow = overflowTop() - box->borderTop();
+    int scrollableLeftOverflow = m_overflowRect.x() - box->borderLeft();
+    int scrollableTopOverflow = m_overflowRect.y() - box->borderTop();
     setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
 }
 
@@ -3109,15 +3072,11 @@
     // Set up the range (and page step/line step).
     if (m_hBar) {
         int clientWidth = box->pixelSnappedClientWidth();
-        int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
-        m_hBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
-        m_hBar->setProportion(clientWidth, m_scrollSize.width());
+        m_hBar->setProportion(clientWidth, m_overflowRect.width());
     }
     if (m_vBar) {
         int clientHeight = box->pixelSnappedClientHeight();
-        int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
-        m_vBar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
-        m_vBar->setProportion(clientHeight, m_scrollSize.height());
+        m_vBar->setProportion(clientHeight, m_overflowRect.height());
     }
 
     updateScrollableAreaSet(hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow());
@@ -3598,9 +3557,9 @@
 void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
 {
     ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
+    ASSERT(!(paintFlags & PaintLayerAppliedTransform));
 
-    PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform);
-    bool haveTransparency = localPaintFlags & PaintLayerHaveTransparency;
+    bool haveTransparency = paintFlags & PaintLayerHaveTransparency;
     bool isSelfPaintingLayer = this->isSelfPaintingLayer();
     bool isPaintingOverlayScrollbars = paintFlags & PaintLayerPaintingOverlayScrollbars;
     bool isPaintingScrollingContent = paintFlags & PaintLayerPaintingCompositingScrollingPhase;
@@ -3623,7 +3582,7 @@
 
     GraphicsContext* transparencyLayerContext = context;
 
-    if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRenderView() && !renderer()->isRoot())
+    if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRenderView() && !renderer()->isRoot())
         return;
 
     // Ensure our lists are up-to-date.
@@ -3726,12 +3685,12 @@
     bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPaintContent;
     bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground;
     bool shouldPaintOverlayScrollbars = isPaintingOverlayScrollbars;
-    bool shouldPaintMask = (localPaintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask() && !selectionOnly;
+    bool shouldPaintMask = (paintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask() && !selectionOnly;
 
     PaintBehavior paintBehavior = PaintBehaviorNormal;
-    if (localPaintFlags & PaintLayerPaintingSkipRootBackground)
+    if (paintFlags & PaintLayerPaintingSkipRootBackground)
         paintBehavior |= PaintBehaviorSkipRootBackground;
-    else if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly)
+    else if (paintFlags & PaintLayerPaintingRootBackgroundOnly)
         paintBehavior |= PaintBehaviorRootBackgroundOnly;
 
     LayerFragments layerFragments;
@@ -3739,9 +3698,9 @@
         // Collect the fragments. This will compute the clip rectangles and paint offsets for each layer fragment, as well as whether or not the content of each
         // fragment should paint.
         collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.region, localPaintingInfo.paintDirtyRect,
-            (localPaintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
+            (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
             (isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetFromRoot);
-        updatePaintingInfoForFragments(layerFragments, localPaintingInfo, localPaintFlags, shouldPaintContent, &offsetFromRoot);
+        updatePaintingInfoForFragments(layerFragments, localPaintingInfo, paintFlags, shouldPaintContent, &offsetFromRoot);
     }
 
     if (shouldPaintBackground)
@@ -3749,7 +3708,7 @@
                 localPaintingInfo, paintBehavior, paintingRootForRenderer);
 
     if (shouldPaintNegZOrderList)
-        paintList(negZOrderList(), context, localPaintingInfo, localPaintFlags);
+        paintList(negZOrderList(), context, localPaintingInfo, paintFlags);
 
     if (shouldPaintOwnContents)
         paintForegroundForFragments(layerFragments, context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
@@ -3759,10 +3718,10 @@
         paintOutlineForFragments(layerFragments, context, localPaintingInfo, paintBehavior, paintingRootForRenderer);
 
     if (shouldPaintNormalFlowAndPosZOrderLists)
-        paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaintFlags);
+        paintList(m_normalFlowList.get(), context, localPaintingInfo, paintFlags);
 
     if (shouldPaintNormalFlowAndPosZOrderLists)
-        paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags);
+        paintList(posZOrderList(), context, localPaintingInfo, paintFlags);
 
     if (shouldPaintOverlayScrollbars)
         paintOverflowControlsForFragments(layerFragments, context, localPaintingInfo);
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index c71c757..db8fd09 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -407,14 +407,6 @@
 
     LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY);
 
-    bool scrollsOverflow() const;
-    bool hasScrollbars() const { return m_hBar || m_vBar; }
-    void setHasHorizontalScrollbar(bool);
-    void setHasVerticalScrollbar(bool);
-
-    PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
-    void destroyScrollbar(ScrollbarOrientation);
-
     bool hasHorizontalScrollbar() const { return horizontalScrollbar(); }
     bool hasVerticalScrollbar() const { return verticalScrollbar(); }
 
@@ -426,7 +418,6 @@
     int verticalScrollbarWidth(OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const;
     int horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize) const;
 
-    bool hasOverflowControls() const;
     // isPointInResizeControl() is used for testing if a pointer/touch position is in the resize control
     // area.
     bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestType resizerHitTestType) const;
@@ -729,12 +720,9 @@
 
     bool hasBlendMode() const;
 
-    // Overloaded new operator. Derived classes must override operator new
-    // in order to allocate out of the RenderArena.
-    void* operator new(size_t, RenderArena*);
-
-    // Overridden to prevent the normal delete from being called.
-    void operator delete(void*, size_t);
+    void* operator new(size_t);
+    // Only safe to call from RenderLayerModelObject::destroyLayer()
+    void operator delete(void*);
 
     bool isComposited() const { return m_backing != 0; }
     bool hasCompositedMask() const;
@@ -830,6 +818,14 @@
         OnlyStackingContextsCanBeStackingContainers
     };
 
+    void setHasHorizontalScrollbar(bool);
+    void setHasVerticalScrollbar(bool);
+
+    PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
+    void destroyScrollbar(ScrollbarOrientation);
+
+    bool hasOverflowControls() const;
+
     void updateZOrderLists();
     void rebuildZOrderLists();
     // See the comment for collectLayers for information about the layerToForceAsStackingContainer parameter.
@@ -903,9 +899,6 @@
 
     IntSize clampScrollOffset(const IntSize&) const;
 
-    // The normal operator new is disallowed on all render objects.
-    void* operator new(size_t) throw();
-
     void setNextSibling(RenderLayer* next) { m_next = next; }
     void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
     void setParent(RenderLayer* parent);
@@ -1006,8 +999,6 @@
 
     bool shouldBeSelfPaintingLayer() const;
 
-    int scrollPosition(Scrollbar*) const;
-
     // ScrollableArea interface
     virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&);
     virtual void invalidateScrollCornerRect(const IntRect&);
@@ -1032,6 +1023,8 @@
     virtual bool shouldSuspendScrollAnimations() const;
     virtual bool scrollbarsCanBeActive() const;
     virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
+    virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE;
+    virtual int pageStep(ScrollbarOrientation) const OVERRIDE;
 
     // Rectangle encompassing the scroll corner and resizer rect.
     IntRect scrollCornerAndResizerRect() const;
@@ -1100,14 +1093,6 @@
     friend class RenderLayerCompositor;
     friend class RenderLayerModelObject;
 
-    // Only safe to call from RenderLayerModelObject::destroyLayer(RenderArena*)
-    void destroy(RenderArena*);
-
-    LayoutUnit overflowTop() const;
-    LayoutUnit overflowBottom() const;
-    LayoutUnit overflowLeft() const;
-    LayoutUnit overflowRight() const;
-
     IntRect rectForHorizontalScrollbar(const IntRect& borderBoxRect) const;
     IntRect rectForVerticalScrollbar(const IntRect& borderBoxRect) const;
 
@@ -1210,7 +1195,7 @@
     IntSize m_scrollOffset;
 
     // The width/height of our scrolled area.
-    LayoutSize m_scrollSize;
+    LayoutRect m_overflowRect;
 
     // For layers with overflow, we have a pair of scrollbars.
     RefPtr<Scrollbar> m_hBar;
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index bf8bfed..2bc2a70 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -1543,9 +1543,8 @@
     }
 }
 
-void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, GraphicsContext* context,
-                    const IntRect& paintDirtyRect, // In the coords of rootLayer.
-                    PaintBehavior paintBehavior, GraphicsLayerPaintingPhase paintingPhase)
+void RenderLayerBacking::doPaintTask(GraphicsLayerPaintInfo& paintInfo, GraphicsContext* context,
+    const IntRect& clip) // In the coords of rootLayer.
 {
     if (paintsIntoCompositedAncestor()) {
         ASSERT_NOT_REACHED();
@@ -1555,32 +1554,48 @@
     FontCachePurgePreventer fontCachePurgePreventer;
 
     RenderLayer::PaintLayerFlags paintFlags = 0;
-    if (paintingPhase & GraphicsLayerPaintBackground)
+    if (paintInfo.paintingPhase & GraphicsLayerPaintBackground)
         paintFlags |= RenderLayer::PaintLayerPaintingCompositingBackgroundPhase;
-    if (paintingPhase & GraphicsLayerPaintForeground)
+    if (paintInfo.paintingPhase & GraphicsLayerPaintForeground)
         paintFlags |= RenderLayer::PaintLayerPaintingCompositingForegroundPhase;
-    if (paintingPhase & GraphicsLayerPaintMask)
+    if (paintInfo.paintingPhase & GraphicsLayerPaintMask)
         paintFlags |= RenderLayer::PaintLayerPaintingCompositingMaskPhase;
-    if (paintingPhase & GraphicsLayerPaintOverflowContents)
+    if (paintInfo.paintingPhase & GraphicsLayerPaintOverflowContents)
         paintFlags |= RenderLayer::PaintLayerPaintingOverflowContents;
-    if (paintingPhase & GraphicsLayerPaintCompositedScroll)
+    if (paintInfo.paintingPhase & GraphicsLayerPaintCompositedScroll)
         paintFlags |= RenderLayer::PaintLayerPaintingCompositingScrollingPhase;
 
-    if (graphicsLayer == m_backgroundLayer)
+    if (paintInfo.isBackgroundLayer)
         paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | RenderLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers.
     else if (compositor()->fixedRootBackgroundLayer())
         paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground;
 
+    InspectorInstrumentation::willPaint(paintInfo.renderLayer->renderer());
+    context->save();
+
+    LayoutSize offset = paintInfo.offsetFromRenderer;
+    context->translate(-offset);
+    LayoutRect relativeClip(clip);
+    relativeClip.move(offset);
+
+    // The dirtyRect is in the coords of the painting root.
+    IntRect dirtyRect = pixelSnappedIntRect(relativeClip);
+    if (!(paintInfo.paintingPhase & GraphicsLayerPaintOverflowContents))
+        dirtyRect.intersect(paintInfo.compositedBounds);
+
     // FIXME: GraphicsLayers need a way to split for RenderRegions.
-    RenderLayer::LayerPaintingInfo paintingInfo(m_owningLayer, paintDirtyRect, paintBehavior, LayoutSize());
-    m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags);
+    RenderLayer::LayerPaintingInfo paintingInfo(paintInfo.renderLayer, dirtyRect, PaintBehaviorNormal, LayoutSize());
+    paintInfo.renderLayer->paintLayerContents(context, paintingInfo, paintFlags);
 
-    ASSERT(graphicsLayer != m_backgroundLayer || paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);
+    ASSERT(!paintInfo.isBackgroundLayer || paintFlags & RenderLayer::PaintLayerPaintingRootBackgroundOnly);
 
-    if (m_owningLayer->containsDirtyOverlayScrollbars())
-        m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);
+    if (paintInfo.renderLayer->containsDirtyOverlayScrollbars())
+        paintInfo.renderLayer->paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);
 
-    ASSERT(!m_owningLayer->m_usedTransparency);
+    ASSERT(!paintInfo.renderLayer->m_usedTransparency);
+
+    context->restore();
+    InspectorInstrumentation::didPaint(paintInfo.renderLayer->renderer(), context, clip);
 }
 
 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip)
@@ -1610,17 +1625,16 @@
         || graphicsLayer == m_backgroundLayer.get()
         || graphicsLayer == m_maskLayer.get()
         || graphicsLayer == m_scrollingContentsLayer.get()) {
-        InspectorInstrumentation::willPaint(renderer());
 
-        // The dirtyRect is in the coords of the painting root.
-        IntRect dirtyRect = clip;
-        if (!(paintingPhase & GraphicsLayerPaintOverflowContents))
-            dirtyRect.intersect(compositedBounds());
+        GraphicsLayerPaintInfo paintInfo;
+        paintInfo.renderLayer = m_owningLayer;
+        paintInfo.compositedBounds = compositedBounds();
+        paintInfo.offsetFromRenderer = graphicsLayer->offsetFromRenderer();
+        paintInfo.paintingPhase = paintingPhase;
+        paintInfo.isBackgroundLayer = (graphicsLayer == m_backgroundLayer);
 
         // We have to use the same root as for hit testing, because both methods can compute and cache clipRects.
-        paintIntoLayer(graphicsLayer, &context, dirtyRect, PaintBehaviorNormal, paintingPhase);
-
-        InspectorInstrumentation::didPaint(renderer(), &context, clip);
+        doPaintTask(paintInfo, &context, clip);
     } else if (graphicsLayer == layerForHorizontalScrollbar()) {
         paintScrollbar(m_owningLayer->horizontalScrollbar(), context, clip);
     } else if (graphicsLayer == layerForVerticalScrollbar()) {
diff --git a/Source/core/rendering/RenderLayerBacking.h b/Source/core/rendering/RenderLayerBacking.h
index 1df576f..7a62c3c 100644
--- a/Source/core/rendering/RenderLayerBacking.h
+++ b/Source/core/rendering/RenderLayerBacking.h
@@ -44,6 +44,20 @@
     ContainerCompositingLayer // layer with no backing store
 };
 
+
+// A GraphicsLayerPaintInfo contains all the info needed to paint a partial subtree of RenderLayers into a GraphicsLayer.
+struct GraphicsLayerPaintInfo {
+    RenderLayer* renderLayer;
+
+    IntRect compositedBounds;
+
+    IntSize offsetFromRenderer;
+
+    GraphicsLayerPaintingPhase paintingPhase;
+
+    bool isBackgroundLayer;
+};
+
 // RenderLayerBacking controls the compositing behavior for a single RenderLayer.
 // It holds the various GraphicsLayers, and makes decisions about intra-layer rendering
 // optimizations.
@@ -224,7 +238,7 @@
 
     bool shouldClipCompositedBounds() const;
 
-    void paintIntoLayer(const GraphicsLayer*, GraphicsContext*, const IntRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase);
+    void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& clip);
 
     static CSSPropertyID graphicsLayerToCSSProperty(AnimatedPropertyID);
     static AnimatedPropertyID cssToGraphicsLayerProperty(CSSPropertyID);
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index ed3aa8f..bedb7b5 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -116,17 +116,17 @@
     OverlapMap()
         : m_geometryMap(UseTransforms)
     {
-        // Begin assuming the root layer will be composited so that there is
-        // something on the stack. The root layer should also never get an
-        // popCompositingContainer call.
-        pushCompositingContainer();
+        // Begin by assuming the root layer will be composited so that there
+        // is something on the stack. The root layer should also never get a
+        // finishCurrentOverlapTestingContext() call.
+        beginNewOverlapTestingContext();
     }
 
     void add(const RenderLayer* layer, const IntRect& bounds)
     {
         // Layers do not contribute to overlap immediately--instead, they will
-        // contribute to overlap as soon as their composited ancestor has been
-        // recursively processed and popped off the stack.
+        // contribute to overlap as soon as they have been recursively processed
+        // and popped off the stack.
         ASSERT(m_overlapStack.size() >= 2);
         m_overlapStack[m_overlapStack.size() - 2].add(bounds);
         m_layers.add(layer);
@@ -147,13 +147,23 @@
         return m_layers.isEmpty();
     }
 
-    void pushCompositingContainer()
+    void beginNewOverlapTestingContext()
     {
+        // This effectively creates a new "clean slate" for overlap state.
+        // This is used when we know that a subtree or remaining set of
+        // siblings does not need to check overlap with things behind it.
         m_overlapStack.append(OverlapMapContainer());
     }
 
-    void popCompositingContainer()
+    void finishCurrentOverlapTestingContext()
     {
+        // The overlap information on the top of the stack is still necessary
+        // for checking overlap of any layers outside this context that may
+        // overlap things from inside this context. Therefore, we must merge
+        // the information from the top of the stack before popping the stack.
+        //
+        // FIXME: we may be able to avoid this deep copy by rearranging how
+        //        overlapMap state is managed.
         m_overlapStack[m_overlapStack.size() - 2].unite(m_overlapStack.last());
         m_overlapStack.removeLast();
     }
@@ -820,8 +830,11 @@
         // This layer now acts as the ancestor for kids.
         childState.m_compositingAncestor = layer;
 
+        // Here we know that all children and the layer's own contents can blindly paint into
+        // this layer's backing, until a descendant is composited. So, we don't need to check
+        // for overlap with anything behind this layer.
         if (overlapMap)
-            overlapMap->pushCompositingContainer();
+            overlapMap->beginNewOverlapTestingContext();
         // This layer is going to be composited, so children can safely ignore the fact that there's an
         // animation running behind this layer, meaning they can rely on the overlap map testing again.
         childState.m_testingOverlap = true;
@@ -832,6 +845,7 @@
 #endif
 
     bool anyDescendantHas3DTransform = false;
+    bool willHaveForegroundLayer = false;
 
     if (layer->isStackingContainer()) {
         if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
@@ -848,18 +862,23 @@
                     if (!willBeComposited) {
                         // make layer compositing
                         childState.m_compositingAncestor = layer;
-                        if (overlapMap)
-                            overlapMap->pushCompositingContainer();
-                        // This layer is going to be composited, so children can safely ignore the fact that there's an
-                        // animation running behind this layer, meaning they can rely on the overlap map testing again
-                        childState.m_testingOverlap = true;
                         willBeComposited = true;
+                        willHaveForegroundLayer = true;
                     }
                 }
             }
         }
     }
 
+    if (overlapMap && willHaveForegroundLayer) {
+        // A foreground layer effectively is a new backing for all subsequent children, so
+        // we don't need to test for overlap with anything behind this.
+        overlapMap->beginNewOverlapTestingContext();
+        // This layer is going to be composited, so children can safely ignore the fact that there's an
+        // animation running behind this layer, meaning they can rely on the overlap map testing again
+        childState.m_testingOverlap = true;
+    }
+
     if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
         size_t listSize = normalFlowList->size();
         for (size_t i = 0; i < listSize; ++i) {
@@ -898,7 +917,10 @@
     if (!willBeComposited && canBeComposited(layer) && requiresCompositing(subtreeCompositingReasons)) {
         childState.m_compositingAncestor = layer;
         if (overlapMap) {
-            overlapMap->pushCompositingContainer();
+            // FIXME: this context push is effectively a no-op but needs to exist for
+            // now, because the code is designed to push overlap information to the
+            // second-from-top context of the stack.
+            overlapMap->beginNewOverlapTestingContext();
             addToOverlapMapRecursive(*overlapMap, layer);
         }
         willBeComposited = true;
@@ -927,7 +949,7 @@
         compositingState.m_testingOverlap = false;
 
     if (overlapMap && childState.m_compositingAncestor == layer && !layer->isRootLayer())
-        overlapMap->popCompositingContainer();
+        overlapMap->finishCurrentOverlapTestingContext();
 
     // If we're back at the root, and no other layers need to be composited, and the root layer itself doesn't need
     // to be composited, then we can drop out of compositing mode altogether. However, don't drop out of compositing mode
@@ -1853,12 +1875,8 @@
     if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
         return false;
 
-    if (AnimationController* animController = renderer->animation()) {
-        return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
-            // <rdar://problem/10907251> - WebKit2 doesn't support CA animations of CI filters on Lion and below
-            || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitFilter)
-            || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
-    }
+    if (AnimationController* animController = renderer->animation())
+        return animController->isRunningAcceleratableAnimationOnRenderer(renderer);
     return false;
 }
 
@@ -2195,7 +2213,7 @@
         return false;
 
     // We do want a layer if we have a scrolling coordinator and can scroll.
-    if (scrollingCoordinator() && m_renderView->frameView()->hasOpaqueBackground() && !m_renderView->frameView()->prohibitsScrolling())
+    if (scrollingCoordinator() && m_renderView->frameView()->hasOpaqueBackground())
         return true;
 
     // Chromium always wants a layer.
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/rendering/RenderLayerModelObject.cpp
index d5a20c6..c5aecec 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/rendering/RenderLayerModelObject.cpp
@@ -54,7 +54,7 @@
 {
     ASSERT(!hasLayer()); // Callers should have already called setHasLayer(false)
     ASSERT(m_layer);
-    m_layer->destroy(renderArena());
+    delete m_layer;
     m_layer = 0;
 }
 
@@ -63,7 +63,7 @@
     if (m_layer)
         return;
 
-    m_layer = new (renderArena()) RenderLayer(this);
+    m_layer = new RenderLayer(this);
     setHasLayer(true);
     m_layer->insertOnlyThisLayer();
 }
@@ -182,16 +182,18 @@
     }
 }
 
-void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const
+void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
 {
     // If we have a new layer then our current layer/offset is irrelevant.
     LayoutPoint adjustedLayerOffset = layerOffset;
+    LayoutRect adjustedContainerRect = containerRect;
     if (hasLayer()) {
         currentLayer = layer();
         adjustedLayerOffset = LayoutPoint();
+        adjustedContainerRect = LayoutRect();
     }
 
-    RenderObject::addLayerHitTestRects(rects, currentLayer, adjustedLayerOffset);
+    RenderObject::addLayerHitTestRects(rects, currentLayer, adjustedLayerOffset, adjustedContainerRect);
 }
 
 } // namespace WebCore
diff --git a/Source/core/rendering/RenderLayerModelObject.h b/Source/core/rendering/RenderLayerModelObject.h
index 034c052..42f1183 100644
--- a/Source/core/rendering/RenderLayerModelObject.h
+++ b/Source/core/rendering/RenderLayerModelObject.h
@@ -58,7 +58,7 @@
 
     virtual void willBeDestroyed() OVERRIDE;
 
-    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* = 0, const LayoutPoint& = LayoutPoint()) const OVERRIDE;
+    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer*, const LayoutPoint&, const LayoutRect&) const OVERRIDE;
 
 private:
     virtual bool isLayerModelObject() const OVERRIDE FINAL { return true; }
diff --git a/Source/core/rendering/RenderLineBoxList.cpp b/Source/core/rendering/RenderLineBoxList.cpp
index 1205f19..6613173 100644
--- a/Source/core/rendering/RenderLineBoxList.cpp
+++ b/Source/core/rendering/RenderLineBoxList.cpp
@@ -32,7 +32,6 @@
 #include "core/rendering/HitTestResult.h"
 #include "core/rendering/InlineTextBox.h"
 #include "core/rendering/PaintInfo.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderInline.h"
 #include "core/rendering/RootInlineBox.h"
 
@@ -63,13 +62,13 @@
     checkConsistency();
 }
 
-void RenderLineBoxList::deleteLineBoxTree(RenderArena* arena)
+void RenderLineBoxList::deleteLineBoxTree()
 {
     InlineFlowBox* line = m_firstLineBox;
     InlineFlowBox* nextLine;
     while (line) {
         nextLine = line->nextLineBox();
-        line->deleteLine(arena);
+        line->deleteLine();
         line = nextLine;
     }
     m_firstLineBox = m_lastLineBox = 0;
@@ -126,13 +125,13 @@
     checkConsistency();
 }
 
-void RenderLineBoxList::deleteLineBoxes(RenderArena* arena)
+void RenderLineBoxList::deleteLineBoxes()
 {
     if (m_firstLineBox) {
         InlineFlowBox* next;
         for (InlineFlowBox* curr = m_firstLineBox; curr; curr = next) {
             next = curr->nextLineBox();
-            curr->destroy(arena);
+            curr->destroy();
         }
         m_firstLineBox = 0;
         m_lastLineBox = 0;
diff --git a/Source/core/rendering/RenderLineBoxList.h b/Source/core/rendering/RenderLineBoxList.h
index d0c1afd..b57a4a0 100644
--- a/Source/core/rendering/RenderLineBoxList.h
+++ b/Source/core/rendering/RenderLineBoxList.h
@@ -53,8 +53,8 @@
 
     void appendLineBox(InlineFlowBox*);
 
-    void deleteLineBoxTree(RenderArena*);
-    void deleteLineBoxes(RenderArena*);
+    void deleteLineBoxTree();
+    void deleteLineBoxes();
 
     void extractLineBox(InlineFlowBox*);
     void attachLineBox(InlineFlowBox*);
diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp
index 1771c60..a2b87f8 100644
--- a/Source/core/rendering/RenderListBox.cpp
+++ b/Source/core/rendering/RenderListBox.cpp
@@ -176,7 +176,6 @@
     if (m_vBar) {
         bool enabled = numVisibleItems() < numItems();
         m_vBar->setEnabled(enabled);
-        m_vBar->setSteps(1, max(1, numVisibleItems() - 1), itemHeight());
         m_vBar->setProportion(numVisibleItems(), numItems());
         if (!enabled) {
             scrollToOffsetWithoutAnimation(VerticalScrollbar, 0);
@@ -625,12 +624,12 @@
 
 int RenderListBox::scrollSize(ScrollbarOrientation orientation) const
 {
-    return ((orientation == VerticalScrollbar) && m_vBar) ? (m_vBar->totalSize() - m_vBar->visibleSize()) : 0;
+    return orientation == VerticalScrollbar ? (numItems() - numVisibleItems()) : 0;
 }
 
-int RenderListBox::scrollPosition(Scrollbar*) const
+IntPoint RenderListBox::scrollPosition() const
 {
-    return m_indexOffset;
+    return IntPoint(0, m_indexOffset);
 }
 
 void RenderListBox::setScrollOffset(const IntPoint& offset)
@@ -835,11 +834,36 @@
     return view->frameView()->scrollbarsCanBeActive();
 }
 
+IntPoint RenderListBox::minimumScrollPosition() const
+{
+    return IntPoint();
+}
+
 IntPoint RenderListBox::maximumScrollPosition() const
 {
     return IntPoint(0, numItems() - numVisibleItems());
 }
 
+bool RenderListBox::userInputScrollable(ScrollbarOrientation orientation) const
+{
+    return orientation == VerticalScrollbar;
+}
+
+int RenderListBox::lineStep(ScrollbarOrientation) const
+{
+    return 1;
+}
+
+int RenderListBox::pageStep(ScrollbarOrientation orientation) const
+{
+    return max(1, numVisibleItems() - 1);
+}
+
+float RenderListBox::pixelStep(ScrollbarOrientation) const
+{
+    return 1.0f / itemHeight();
+}
+
 ScrollableArea* RenderListBox::enclosingScrollableArea() const
 {
     // FIXME: Return a RenderLayer that's scrollable.
diff --git a/Source/core/rendering/RenderListBox.h b/Source/core/rendering/RenderListBox.h
index 97e73d3..f039edb 100644
--- a/Source/core/rendering/RenderListBox.h
+++ b/Source/core/rendering/RenderListBox.h
@@ -103,7 +103,7 @@
 
     // ScrollableArea interface.
     virtual int scrollSize(ScrollbarOrientation) const OVERRIDE;
-    virtual int scrollPosition(Scrollbar*) const OVERRIDE;
+    virtual IntPoint scrollPosition() const OVERRIDE;
     virtual void setScrollOffset(const IntPoint&) OVERRIDE;
     virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
     virtual bool isActive() const OVERRIDE;
@@ -121,7 +121,13 @@
     virtual IntPoint lastKnownMousePosition() const OVERRIDE;
     virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
     virtual bool scrollbarsCanBeActive() const OVERRIDE;
+    virtual IntPoint minimumScrollPosition() const OVERRIDE;
     virtual IntPoint maximumScrollPosition() const OVERRIDE;
+    virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE;
+    virtual int lineStep(ScrollbarOrientation) const;
+    virtual int pageStep(ScrollbarOrientation) const;
+    virtual float pixelStep(ScrollbarOrientation) const;
+
 
     virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE;
     virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
diff --git a/Source/core/rendering/RenderListMarker.cpp b/Source/core/rendering/RenderListMarker.cpp
index f965338..bc4aaad 100644
--- a/Source/core/rendering/RenderListMarker.cpp
+++ b/Source/core/rendering/RenderListMarker.cpp
@@ -1071,7 +1071,7 @@
 RenderListMarker* RenderListMarker::createAnonymous(RenderListItem* item)
 {
     Document* document = item->document();
-    RenderListMarker* renderer = new (document->renderArena()) RenderListMarker(item);
+    RenderListMarker* renderer = new RenderListMarker(item);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderMedia.cpp b/Source/core/rendering/RenderMedia.cpp
index 6c7cd51..48246c9 100644
--- a/Source/core/rendering/RenderMedia.cpp
+++ b/Source/core/rendering/RenderMedia.cpp
@@ -87,8 +87,7 @@
     controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
     controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed));
     controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed));
-    controlsRenderer->setNeedsLayout(true, MarkOnlyThis);
-    controlsRenderer->layout();
+    controlsRenderer->forceLayout();
     setChildNeedsLayout(false);
 
     statePusher.pop();
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index 571e49e..e0856e7 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -236,7 +236,7 @@
         if (!m_buttonText || !m_buttonText->isBR()) {
             if (m_buttonText)
                 m_buttonText->destroy();
-            m_buttonText = new (renderArena()) RenderBR(document());
+            m_buttonText = new RenderBR(document());
             m_buttonText->setStyle(style());
             addChild(m_buttonText);
         }
@@ -246,7 +246,7 @@
         else {
             if (m_buttonText)
                 m_buttonText->destroy();
-            m_buttonText = new (renderArena()) RenderText(document(), s.impl());
+            m_buttonText = new RenderText(document(), s.impl());
             m_buttonText->setStyle(style());
             // We need to set the text explicitly though it was specified in the
             // constructor because RenderText doesn't refer to the text
diff --git a/Source/core/rendering/RenderMultiColumnFlowThread.cpp b/Source/core/rendering/RenderMultiColumnFlowThread.cpp
index 53bf05a..1a2fc6f 100644
--- a/Source/core/rendering/RenderMultiColumnFlowThread.cpp
+++ b/Source/core/rendering/RenderMultiColumnFlowThread.cpp
@@ -42,7 +42,7 @@
 
 RenderMultiColumnFlowThread* RenderMultiColumnFlowThread::createAnonymous(Document* document)
 {
-    RenderMultiColumnFlowThread* renderer = new (document->renderArena()) RenderMultiColumnFlowThread();
+    RenderMultiColumnFlowThread* renderer = new RenderMultiColumnFlowThread();
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderMultiColumnSet.cpp b/Source/core/rendering/RenderMultiColumnSet.cpp
index 2c0175b..f53e156 100644
--- a/Source/core/rendering/RenderMultiColumnSet.cpp
+++ b/Source/core/rendering/RenderMultiColumnSet.cpp
@@ -52,7 +52,7 @@
 RenderMultiColumnSet* RenderMultiColumnSet::createAnonymous(RenderFlowThread* flowThread)
 {
     Document* document = flowThread->document();
-    RenderMultiColumnSet* renderer = new (document->renderArena()) RenderMultiColumnSet(flowThread);
+    RenderMultiColumnSet* renderer = new RenderMultiColumnSet(flowThread);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp
index 5537e81..b7e7388 100644
--- a/Source/core/rendering/RenderNamedFlowThread.cpp
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp
@@ -47,7 +47,7 @@
 RenderNamedFlowThread* RenderNamedFlowThread::createAnonymous(Document* document, PassRefPtr<NamedFlow> namedFlow)
 {
     ASSERT(RuntimeEnabledFeatures::cssRegionsEnabled());
-    RenderNamedFlowThread* renderer = new (document->renderArena()) RenderNamedFlowThread(namedFlow);
+    RenderNamedFlowThread* renderer = new RenderNamedFlowThread(namedFlow);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 376a739..a41e491 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -30,6 +30,7 @@
 #include "HTMLNames.h"
 #include "RuntimeEnabledFeatures.h"
 #include "core/accessibility/AXObjectCache.h"
+#include "core/animation/ActiveAnimations.h"
 #include "core/css/resolver/StyleResolver.h"
 #include "core/editing/EditingBoundary.h"
 #include "core/editing/FrameSelection.h"
@@ -43,13 +44,14 @@
 #include "core/page/FrameView.h"
 #include "core/page/Page.h"
 #include "core/page/Settings.h"
+#include "core/page/UseCounter.h"
 #include "core/page/animation/AnimationController.h"
+#include "core/platform/Partitions.h"
 #include "core/platform/graphics/FloatQuad.h"
 #include "core/platform/graphics/GraphicsContext.h"
 #include "core/platform/graphics/transforms/TransformState.h"
 #include "core/rendering/FlowThreadController.h"
 #include "core/rendering/HitTestResult.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderCounter.h"
 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
 #include "core/rendering/RenderFlexibleBox.h"
@@ -91,7 +93,6 @@
 using namespace HTMLNames;
 
 #ifndef NDEBUG
-static void* baseOfRenderObjectBeingDeleted;
 
 RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(RenderObject* renderObject, bool isForbidden)
     : m_renderObject(renderObject)
@@ -121,30 +122,26 @@
 
 RenderObjectAncestorLineboxDirtySet* RenderObject::s_ancestorLineboxDirtySet = 0;
 
-void* RenderObject::operator new(size_t sz, RenderArena* renderArena)
+void* RenderObject::operator new(size_t sz)
 {
-    return renderArena->allocate(sz);
+    return partitionAlloc(Partitions::getRenderingPartition(), sz);
 }
 
-void RenderObject::operator delete(void* ptr, size_t sz)
+void RenderObject::operator delete(void* ptr)
 {
-    ASSERT(baseOfRenderObjectBeingDeleted == ptr);
-
-    // Stash size where destroy can find it.
-    *(size_t *)ptr = sz;
+    partitionFree(ptr);
 }
 
 RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
 {
     Document* doc = element->document();
-    RenderArena* arena = doc->renderArena();
 
     // Minimal support for content properties replacing an entire element.
     // Works only if we have exactly one piece of content and it's a URL.
     // Otherwise acts as if we didn't support this feature.
     const ContentData* contentData = style->contentData();
     if (contentData && !contentData->next() && contentData->isImage() && !element->isPseudoElement()) {
-        RenderImage* image = new (arena) RenderImage(element);
+        RenderImage* image = new RenderImage(element);
         // RenderImageResourceStyleImage requires a style being present on the image but we don't want to
         // trigger a style change now as the node is not fully attached. Moving this code to style change
         // doesn't make sense as it should be run once at renderer creation.
@@ -160,56 +157,62 @@
 
     if (element->hasTagName(rubyTag)) {
         if (style->display() == INLINE)
-            return new (arena) RenderRubyAsInline(element);
+            return new RenderRubyAsInline(element);
         else if (style->display() == BLOCK)
-            return new (arena) RenderRubyAsBlock(element);
+            return new RenderRubyAsBlock(element);
     }
     // treat <rt> as ruby text ONLY if it still has its default treatment of block
     if (element->hasTagName(rtTag) && style->display() == BLOCK)
-        return new (arena) RenderRubyText(element);
+        return new RenderRubyText(element);
     if (RuntimeEnabledFeatures::cssRegionsEnabled() && style->isDisplayRegionType() && !style->regionThread().isEmpty() && doc->renderView())
-        return new (arena) RenderRegion(element, 0);
+        return new RenderRegion(element, 0);
+
+    if (style->display() == RUN_IN)
+        UseCounter::count(doc, UseCounter::CSSDisplayRunIn);
+    else if (style->display() == COMPACT)
+        UseCounter::count(doc, UseCounter::CSSDisplayCompact);
+
     switch (style->display()) {
     case NONE:
         return 0;
     case INLINE:
-        return new (arena) RenderInline(element);
+        return new RenderInline(element);
     case BLOCK:
     case INLINE_BLOCK:
     case RUN_IN:
     case COMPACT:
         if ((!style->hasAutoColumnCount() || !style->hasAutoColumnWidth()) && doc->regionBasedColumnsEnabled())
-            return new (arena) RenderMultiColumnBlock(element);
-        return new (arena) RenderBlock(element);
+            return new RenderMultiColumnBlock(element);
+        return new RenderBlock(element);
     case LIST_ITEM:
-        return new (arena) RenderListItem(element);
+        return new RenderListItem(element);
     case TABLE:
     case INLINE_TABLE:
-        return new (arena) RenderTable(element);
+        return new RenderTable(element);
     case TABLE_ROW_GROUP:
     case TABLE_HEADER_GROUP:
     case TABLE_FOOTER_GROUP:
-        return new (arena) RenderTableSection(element);
+        return new RenderTableSection(element);
     case TABLE_ROW:
-        return new (arena) RenderTableRow(element);
+        return new RenderTableRow(element);
     case TABLE_COLUMN_GROUP:
     case TABLE_COLUMN:
-        return new (arena) RenderTableCol(element);
+        return new RenderTableCol(element);
     case TABLE_CELL:
-        return new (arena) RenderTableCell(element);
+        return new RenderTableCell(element);
     case TABLE_CAPTION:
-        return new (arena) RenderTableCaption(element);
+        return new RenderTableCaption(element);
     case BOX:
     case INLINE_BOX:
-        return new (arena) RenderDeprecatedFlexibleBox(element);
+        return new RenderDeprecatedFlexibleBox(element);
     case FLEX:
     case INLINE_FLEX:
-        return new (arena) RenderFlexibleBox(element);
+        return new RenderFlexibleBox(element);
     case GRID:
     case INLINE_GRID:
-        return new (arena) RenderGrid(element);
+        return new RenderGrid(element);
     case LAZY_BLOCK:
-        return new (arena) RenderLazyBlock(element);
+        return new RenderLazyBlock(element);
     }
 
     return 0;
@@ -684,6 +687,10 @@
         // calling setNeedsLayout during preferred width computation.
         SetLayoutNeededForbiddenScope layoutForbiddenScope(object, isSetNeedsLayoutForbidden());
 #endif
+
+        if (object->selfNeedsLayout())
+            return;
+
         // Don't mark the outermost object of an unrooted subtree. That object will be
         // marked when the subtree is added to the document.
         RenderObject* container = object->container();
@@ -1725,10 +1732,18 @@
 
 void RenderObject::setAnimatableStyle(PassRefPtr<RenderStyle> style)
 {
-    if (!isText() && style && !RuntimeEnabledFeatures::webAnimationsCSSEnabled())
-        setStyle(animation()->updateAnimations(this, style.get()));
-    else
+    if (!isText() && style) {
+        if (RuntimeEnabledFeatures::webAnimationsCSSEnabled() && node() && node()->isElementNode()) {
+            Element* element = toElement(node());
+            if (CSSAnimations::needsUpdate(element, style.get()))
+                element->ensureActiveAnimations()->cssAnimations()->update(element, style.get());
+            setStyle(style);
+        } else {
+            setStyle(animation()->updateAnimations(this, style.get()));
+        }
+    } else {
         setStyle(style);
+    }
 }
 
 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsigned contextSensitiveProperties) const
@@ -2289,14 +2304,34 @@
             return;
     }
 
-    this->addLayerHitTestRects(layerRects, currentLayer, layerOffset);
+    this->addLayerHitTestRects(layerRects, currentLayer, layerOffset, LayoutRect());
 }
 
-void RenderObject::addLayerHitTestRects(LayerHitTestRects& layerRects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const
+void RenderObject::addLayerHitTestRects(LayerHitTestRects& layerRects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
 {
     ASSERT(currentLayer);
     ASSERT(currentLayer == this->enclosingLayer());
 
+    // Compute the rects for this renderer only and add them to the results.
+    // Note that we could avoid passing the offset and instead adjust each result, but this
+    // seems slightly simpler.
+    Vector<LayoutRect> ownRects;
+    LayoutRect newContainerRect;
+    computeSelfHitTestRects(ownRects, layerOffset);
+
+    LayerHitTestRects::iterator iter = layerRects.find(currentLayer);
+    if (iter == layerRects.end())
+        iter = layerRects.add(currentLayer, Vector<LayoutRect>()).iterator;
+    for (size_t i = 0; i < ownRects.size(); i++) {
+        if (!containerRect.contains(ownRects[i])) {
+            iter->value.append(ownRects[i]);
+            if (newContainerRect.isEmpty())
+                newContainerRect = ownRects[i];
+        }
+    }
+    if (newContainerRect.isEmpty())
+        newContainerRect = containerRect;
+
     // If it's possible for children to have rects outside our bounds, then we need to descend into
     // the children and compute them.
     // Ideally there would be other cases where we could detect that children couldn't have rects
@@ -2306,21 +2341,9 @@
     // rewrite Region to be more efficient. See https://bugs.webkit.org/show_bug.cgi?id=100814.
     if (!isRenderView()) {
         for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
-            curr->addLayerHitTestRects(layerRects, currentLayer,  layerOffset);
+            curr->addLayerHitTestRects(layerRects, currentLayer,  layerOffset, newContainerRect);
         }
     }
-
-    // Compute the rects for this renderer only and add them to the results.
-    // Note that we could avoid passing the offset and instead adjust each result, but this
-    // seems slightly simpler.
-    Vector<LayoutRect> ownRects;
-    computeSelfHitTestRects(ownRects, layerOffset);
-
-    LayerHitTestRects::iterator iter = layerRects.find(currentLayer);
-    if (iter == layerRects.end())
-        layerRects.add(currentLayer, ownRects);
-    else
-        iter->value.append(ownRects);
 }
 
 bool RenderObject::isRooted(RenderView** view) const
@@ -2634,11 +2657,12 @@
 void RenderObject::destroy()
 {
     willBeDestroyed();
-    arenaDelete(renderArena(), this);
+    postDestroy();
 }
 
-void RenderObject::arenaDelete(RenderArena* arena, void* base)
+void RenderObject::postDestroy()
 {
+    // It seems ugly that this is not in willBeDestroyed().
     if (m_style) {
         for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bgLayer = bgLayer->next()) {
             if (StyleImage* backgroundImage = bgLayer->image())
@@ -2657,22 +2681,12 @@
             maskBoxImage->removeClient(this);
     }
 
-#ifndef NDEBUG
-    void* savedBase = baseOfRenderObjectBeingDeleted;
-    baseOfRenderObjectBeingDeleted = base;
-#endif
     delete this;
-#ifndef NDEBUG
-    baseOfRenderObjectBeingDeleted = savedBase;
-#endif
-
-    // Recover the size left there for us by operator delete and free the memory.
-    arena->free(*(size_t*)base, base);
 }
 
-VisiblePosition RenderObject::positionForPoint(const LayoutPoint&)
+PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&)
 {
-    return createVisiblePosition(caretMinOffset(), DOWNSTREAM);
+    return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM);
 }
 
 void RenderObject::updateDragState(bool dragOn)
@@ -2769,6 +2783,24 @@
     setNeedsLayout(false);
 }
 
+// FIXME: Do we need this method at all? If setNeedsLayout early returns in all the right places,
+// then MarkOnlyThis is not needed for performance or correctness.
+void RenderObject::forceLayout()
+{
+    // This is the only way it's safe to use MarkOnlyThis (i.e. if we're immediately going to call layout).
+    // FIXME: Add asserts that we only ever do the MarkOnlyThis behavior from here.
+    setNeedsLayout(true, MarkOnlyThis);
+    layout();
+}
+
+// FIXME: Does this do anything different than forceLayout given that we're passing MarkOnlyThis.
+// I don't think it does and we should change all callers to use forceLayout.
+void RenderObject::forceChildLayout()
+{
+    setChildNeedsLayout(true, MarkOnlyThis);
+    forceLayout();
+}
+
 enum StyleCacheState {
     Cached,
     Uncached
@@ -3113,7 +3145,7 @@
     return node && node->isElementNode() ? toElement(node) : 0;
 }
 
-VisiblePosition RenderObject::createVisiblePosition(int offset, EAffinity affinity)
+PositionWithAffinity RenderObject::createPositionWithAffinity(int offset, EAffinity affinity)
 {
     // If this is a non-anonymous renderer in an editable area, then it's simple.
     if (Node* node = nonPseudoNode()) {
@@ -3122,13 +3154,13 @@
             Position position = createLegacyEditingPosition(node, offset);
             Position candidate = position.downstream(CanCrossEditingBoundary);
             if (candidate.deprecatedNode()->rendererIsEditable())
-                return VisiblePosition(candidate, affinity);
+                return PositionWithAffinity(candidate, affinity);
             candidate = position.upstream(CanCrossEditingBoundary);
             if (candidate.deprecatedNode()->rendererIsEditable())
-                return VisiblePosition(candidate, affinity);
+                return PositionWithAffinity(candidate, affinity);
         }
         // FIXME: Eliminate legacy editing positions
-        return VisiblePosition(createLegacyEditingPosition(node, offset), affinity);
+        return PositionWithAffinity(createLegacyEditingPosition(node, offset), affinity);
     }
 
     // We don't want to cross the boundary between editable and non-editable
@@ -3143,7 +3175,7 @@
         RenderObject* renderer = child;
         while ((renderer = renderer->nextInPreOrder(parent))) {
             if (Node* node = renderer->nonPseudoNode())
-                return VisiblePosition(firstPositionInOrBeforeNode(node), DOWNSTREAM);
+                return PositionWithAffinity(firstPositionInOrBeforeNode(node), DOWNSTREAM);
         }
 
         // Find non-anonymous content before.
@@ -3152,28 +3184,28 @@
             if (renderer == parent)
                 break;
             if (Node* node = renderer->nonPseudoNode())
-                return VisiblePosition(lastPositionInOrAfterNode(node), DOWNSTREAM);
+                return PositionWithAffinity(lastPositionInOrAfterNode(node), DOWNSTREAM);
         }
 
         // Use the parent itself unless it too is anonymous.
         if (Node* node = parent->nonPseudoNode())
-            return VisiblePosition(firstPositionInOrBeforeNode(node), DOWNSTREAM);
+            return PositionWithAffinity(firstPositionInOrBeforeNode(node), DOWNSTREAM);
 
         // Repeat at the next level up.
         child = parent;
     }
 
     // Everything was anonymous. Give up.
-    return VisiblePosition();
+    return PositionWithAffinity();
 }
 
-VisiblePosition RenderObject::createVisiblePosition(const Position& position)
+PositionWithAffinity RenderObject::createPositionWithAffinity(const Position& position)
 {
     if (position.isNotNull())
-        return VisiblePosition(position);
+        return PositionWithAffinity(position);
 
     ASSERT(!node());
-    return createVisiblePosition(0, DOWNSTREAM);
+    return createPositionWithAffinity(0, DOWNSTREAM);
 }
 
 CursorDirective RenderObject::getCursor(const LayoutPoint&, Cursor&) const
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index d85358c..85d43f1 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -28,7 +28,7 @@
 
 #include "core/dom/DocumentStyleSheetCollection.h"
 #include "core/dom/Element.h"
-#include "core/editing/TextAffinity.h"
+#include "core/dom/Position.h"
 #include "core/loader/cache/CachedImageClient.h"
 #include "core/platform/graphics/FloatQuad.h"
 #include "core/platform/graphics/LayoutRect.h"
@@ -68,7 +68,6 @@
 class RenderTable;
 class RenderTheme;
 class TransformState;
-class VisiblePosition;
 
 struct PaintInfo;
 
@@ -301,20 +300,11 @@
 
     static RenderObject* createObject(Element*, RenderStyle*);
 
-    // Overloaded new operator.  Derived classes must override operator new
-    // in order to allocate out of the RenderArena.
-    void* operator new(size_t, RenderArena*);
-
-    // Overridden to prevent the normal delete from being called.
-    void operator delete(void*, size_t);
-
-private:
-    // The normal operator new is disallowed on all render objects.
-    void* operator new(size_t) throw();
+    // RenderObjects are allocated out of the rendering partition.
+    void* operator new(size_t);
+    void operator delete(void*);
 
 public:
-    RenderArena* renderArena() const { return document()->renderArena(); }
-
     bool isPseudoElement() const { return node() && node()->isPseudoElement(); }
 
     virtual bool isBR() const { return false; }
@@ -682,6 +672,9 @@
     /* This function performs a layout only if one is needed. */
     void layoutIfNeeded() { if (needsLayout()) layout(); }
 
+    void forceLayout();
+    void forceChildLayout();
+
     // used for element state updates that cannot be fixed with a
     // repaint and do not need a relayout
     virtual void updateFromElement() { }
@@ -695,9 +688,9 @@
     virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
-    VisiblePosition createVisiblePosition(int offset, EAffinity);
-    VisiblePosition createVisiblePosition(const Position&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&);
+    PositionWithAffinity createPositionWithAffinity(int offset, EAffinity);
+    PositionWithAffinity createPositionWithAffinity(const Position&);
 
     virtual void dirtyLinesFromChangedChild(RenderObject*);
 
@@ -1019,7 +1012,7 @@
 
     void clearLayoutRootIfNeeded() const;
     virtual void willBeDestroyed();
-    void arenaDelete(RenderArena*, void* objectBase);
+    void postDestroy();
 
     virtual bool canBeReplacedWithInlineRunIn() const;
 
@@ -1029,11 +1022,14 @@
     void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_node = document; }
 
     // Add hit-test rects for the render tree rooted at this node to the provided collection on a
-    // per-RenderLayer basis. CurrentLayer must be the enclosing layer,
-    // and layerOffset is the current offset within this layer. Subclass implementations will add
-    // any offset for this renderer within it's container, so callers should provide only the
-    // offset of the container within it's layer.
-    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const;
+    // per-RenderLayer basis.
+    // currentLayer must be the enclosing layer, and layerOffset is the current offset within
+    // this layer. Subclass implementations will add any offset for this renderer within it's
+    // container, so callers should provide only the offset of the container within it's layer.
+    // containerRect is a rect that has already been added for the currentLayer which is likely to
+    // be a container for child elements. Any rect wholly contained by containerRect can be
+    // skipped.
+    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const;
 
     // Add hit-test rects for this renderer only to the provided list. layerOffset is the offset
     // of this renderer within the current layer that should be used for each result.
diff --git a/Source/core/rendering/RenderQuote.cpp b/Source/core/rendering/RenderQuote.cpp
index 461b9ed..22623c6 100644
--- a/Source/core/rendering/RenderQuote.cpp
+++ b/Source/core/rendering/RenderQuote.cpp
@@ -266,7 +266,7 @@
     while (RenderObject* child = lastChild())
         child->destroy();
 
-    RenderTextFragment* fragment = new (renderArena()) RenderTextFragment(document(), m_text.impl());
+    RenderTextFragment* fragment = new RenderTextFragment(document(), m_text.impl());
     fragment->setStyle(style());
     addChild(fragment);
 }
diff --git a/Source/core/rendering/RenderRegion.cpp b/Source/core/rendering/RenderRegion.cpp
index 1952abe..203d207 100644
--- a/Source/core/rendering/RenderRegion.cpp
+++ b/Source/core/rendering/RenderRegion.cpp
@@ -45,6 +45,7 @@
     : RenderBlock(element)
     , m_flowThread(flowThread)
     , m_parentNamedFlowThread(0)
+    , m_computedAutoHeight(-1)
     , m_isValid(false)
     , m_hasCustomRegionStyle(false)
     , m_hasAutoLogicalHeight(false)
@@ -60,9 +61,9 @@
 LayoutUnit RenderRegion::pageLogicalHeight() const
 {
     ASSERT(m_flowThread);
-    if (hasOverrideHeight() && !m_flowThread->inConstrainedLayoutPhase()) {
+    if (hasComputedAutoHeight() && !m_flowThread->inConstrainedLayoutPhase()) {
         ASSERT(hasAutoLogicalHeight());
-        return overrideLogicalContentHeight();
+        return computedAutoHeight();
     }
     return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth();
 }
@@ -79,9 +80,9 @@
 LayoutUnit RenderRegion::logicalHeightOfAllFlowThreadContent() const
 {
     ASSERT(m_flowThread);
-    if (hasOverrideHeight() && !m_flowThread->inConstrainedLayoutPhase()) {
+    if (hasComputedAutoHeight() && !m_flowThread->inConstrainedLayoutPhase()) {
         ASSERT(hasAutoLogicalHeight());
-        return overrideLogicalContentHeight();
+        return computedAutoHeight();
     }
     return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth();
 }
@@ -242,7 +243,7 @@
         if (m_hasAutoLogicalHeight)
             incrementAutoLogicalHeightCount();
         else {
-            clearOverrideLogicalContentHeight();
+            clearComputedAutoHeight();
             decrementAutoLogicalHeightCount();
         }
     }
@@ -283,7 +284,7 @@
 
         if (hasAutoLogicalHeight() && !m_flowThread->inConstrainedLayoutPhase()) {
             m_flowThread->invalidateRegions();
-            clearOverrideLogicalContentHeight();
+            clearComputedAutoHeight();
             return;
         }
 
@@ -626,20 +627,22 @@
     if (!hasAutoLogicalHeight())
         return;
 
-    // We want to update the logical height based on the computed override logical
-    // content height only if the view is in the layout phase
-    // in which all the auto logical height regions have their override logical height set.
+    // We want to update the logical height based on the computed auto-height
+    // only if the view is in the layout phase in which all the
+    // auto logical height regions have a computed auto-height.
     if (!m_flowThread->inConstrainedLayoutPhase())
         return;
 
     // There may be regions with auto logical height that during the prerequisite layout phase
     // did not have the chance to layout flow thread content. Because of that, these regions do not
-    // have an overrideLogicalContentHeight computed and they will not be able to fragment any flow
+    // have a computedAutoHeight and they will not be able to fragment any flow
     // thread content.
-    if (!hasOverrideHeight())
+    if (!hasComputedAutoHeight())
         return;
 
-    LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPaddingLogicalHeight();
+    LayoutUnit autoHeight = hasOverrideHeight() ? overrideLogicalContentHeight() : computedAutoHeight();
+
+    LayoutUnit newLogicalHeight = autoHeight + borderAndPaddingLogicalHeight();
     ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
     if (newLogicalHeight > logicalHeight())
         setLogicalHeight(newLogicalHeight);
diff --git a/Source/core/rendering/RenderRegion.h b/Source/core/rendering/RenderRegion.h
index 2e5d431..052c059 100644
--- a/Source/core/rendering/RenderRegion.h
+++ b/Source/core/rendering/RenderRegion.h
@@ -108,6 +108,25 @@
 
     bool hasAutoLogicalHeight() const { return m_hasAutoLogicalHeight; }
 
+    const LayoutUnit& computedAutoHeight() const
+    {
+        ASSERT(hasComputedAutoHeight());
+        return m_computedAutoHeight;
+    }
+
+    void setComputedAutoHeight(LayoutUnit computedAutoHeight)
+    {
+        ASSERT(computedAutoHeight >= 0);
+        m_computedAutoHeight = computedAutoHeight;
+    }
+
+    void clearComputedAutoHeight()
+    {
+        m_computedAutoHeight = -1;
+    }
+
+    bool hasComputedAutoHeight() const { return (m_computedAutoHeight >= 0); }
+
     virtual void updateLogicalHeight() OVERRIDE;
 
     // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the
@@ -189,6 +208,8 @@
     typedef HashMap<const RenderObject*, ObjectRegionStyleInfo > RenderObjectRegionStyleMap;
     RenderObjectRegionStyleMap m_renderObjectRegionStyle;
 
+    LayoutUnit m_computedAutoHeight;
+
     bool m_isValid : 1;
     bool m_hasCustomRegionStyle : 1;
     bool m_hasAutoLogicalHeight : 1;
diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
index 4f47b3d..ff3d191 100644
--- a/Source/core/rendering/RenderReplaced.cpp
+++ b/Source/core/rendering/RenderReplaced.cpp
@@ -24,7 +24,6 @@
 #include "config.h"
 #include "core/rendering/RenderReplaced.h"
 
-#include "core/editing/VisiblePosition.h"
 #include "core/platform/graphics/GraphicsContext.h"
 #include "core/rendering/LayoutRepainter.h"
 #include "core/rendering/RenderBlock.h"
@@ -465,7 +464,7 @@
     setPreferredLogicalWidthsDirty(false);
 }
 
-VisiblePosition RenderReplaced::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderReplaced::positionForPoint(const LayoutPoint& point)
 {
     // FIXME: This code is buggy if the replaced element is relative positioned.
     InlineBox* box = inlineBoxWrapper();
@@ -478,15 +477,15 @@
     LayoutUnit lineDirectionPosition = isHorizontalWritingMode() ? point.x() + x() : point.y() + y();
 
     if (blockDirectionPosition < top)
-        return createVisiblePosition(caretMinOffset(), DOWNSTREAM); // coordinates are above
+        return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); // coordinates are above
 
     if (blockDirectionPosition >= bottom)
-        return createVisiblePosition(caretMaxOffset(), DOWNSTREAM); // coordinates are below
+        return createPositionWithAffinity(caretMaxOffset(), DOWNSTREAM); // coordinates are below
 
     if (node()) {
         if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2))
-            return createVisiblePosition(0, DOWNSTREAM);
-        return createVisiblePosition(1, DOWNSTREAM);
+            return createPositionWithAffinity(0, DOWNSTREAM);
+        return createPositionWithAffinity(1, DOWNSTREAM);
     }
 
     return RenderBox::positionForPoint(point);
diff --git a/Source/core/rendering/RenderReplaced.h b/Source/core/rendering/RenderReplaced.h
index 43775ad..9b04219 100644
--- a/Source/core/rendering/RenderReplaced.h
+++ b/Source/core/rendering/RenderReplaced.h
@@ -77,7 +77,7 @@
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
 
     virtual bool canBeSelectionLeaf() const { return true; }
 
diff --git a/Source/core/rendering/RenderReplica.cpp b/Source/core/rendering/RenderReplica.cpp
index c5831f6..3c6e78d 100644
--- a/Source/core/rendering/RenderReplica.cpp
+++ b/Source/core/rendering/RenderReplica.cpp
@@ -45,7 +45,7 @@
 
 RenderReplica* RenderReplica::createAnonymous(Document* document)
 {
-    RenderReplica* renderer = new (document->renderArena()) RenderReplica();
+    RenderReplica* renderer = new RenderReplica();
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderRubyBase.cpp b/Source/core/rendering/RenderRubyBase.cpp
index 503a9f5..2de4aeb 100644
--- a/Source/core/rendering/RenderRubyBase.cpp
+++ b/Source/core/rendering/RenderRubyBase.cpp
@@ -49,7 +49,7 @@
 
 RenderRubyBase* RenderRubyBase::createAnonymous(Document* document)
 {
-    RenderRubyBase* renderer = new (document->renderArena()) RenderRubyBase();
+    RenderRubyBase* renderer = new RenderRubyBase();
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderRubyRun.cpp b/Source/core/rendering/RenderRubyRun.cpp
index 5890d2a..80b4cbd 100644
--- a/Source/core/rendering/RenderRubyRun.cpp
+++ b/Source/core/rendering/RenderRubyRun.cpp
@@ -207,7 +207,7 @@
 RenderRubyRun* RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby)
 {
     ASSERT(parentRuby && parentRuby->isRuby());
-    RenderRubyRun* rr = new (parentRuby->renderArena()) RenderRubyRun();
+    RenderRubyRun* rr = new RenderRubyRun();
     rr->setDocumentForAnonymous(parentRuby->document());
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentRuby->style(), INLINE_BLOCK);
     rr->setStyle(newStyle.release());
diff --git a/Source/core/rendering/RenderScrollbarPart.cpp b/Source/core/rendering/RenderScrollbarPart.cpp
index 9d36cce..5d1dac3 100644
--- a/Source/core/rendering/RenderScrollbarPart.cpp
+++ b/Source/core/rendering/RenderScrollbarPart.cpp
@@ -48,7 +48,7 @@
 
 RenderScrollbarPart* RenderScrollbarPart::createAnonymous(Document* document, RenderScrollbar* scrollbar, ScrollbarPart part)
 {
-    RenderScrollbarPart* renderer = new (document->renderArena()) RenderScrollbarPart(scrollbar, part);
+    RenderScrollbarPart* renderer = new RenderScrollbarPart(scrollbar, part);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index aaea9fb..f086f2a 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -1421,7 +1421,7 @@
 RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE);
-    RenderTable* newTable = new (parent->renderArena()) RenderTable(0);
+    RenderTable* newTable = new RenderTable(0);
     newTable->setDocumentForAnonymous(parent->document());
     newTable->setStyle(newStyle.release());
     return newTable;
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
index b612c20..44316f7 100644
--- a/Source/core/rendering/RenderTableCell.cpp
+++ b/Source/core/rendering/RenderTableCell.cpp
@@ -1251,7 +1251,7 @@
 
 RenderTableCell* RenderTableCell::createAnonymous(Document* document)
 {
-    RenderTableCell* renderer = new (document->renderArena()) RenderTableCell(0);
+    RenderTableCell* renderer = new RenderTableCell(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderTableRow.cpp b/Source/core/rendering/RenderTableRow.cpp
index 2584b37..f6831b2 100644
--- a/Source/core/rendering/RenderTableRow.cpp
+++ b/Source/core/rendering/RenderTableRow.cpp
@@ -267,7 +267,7 @@
 
 RenderTableRow* RenderTableRow::createAnonymous(Document* document)
 {
-    RenderTableRow* renderer = new (document->renderArena()) RenderTableRow(0);
+    RenderTableRow* renderer = new RenderTableRow(0);
     renderer->setDocumentForAnonymous(document);
     return renderer;
 }
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index 765b35e..7bd4433 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -369,12 +369,32 @@
     extraRowSpanningHeight -= accumulatedPositionIncrease;
 }
 
+// To avoid unneeded extra height distributions, we apply the following sorting algorithm:
+// 1. We sort by increasing start row but decreasing last row (ie the top-most, shortest cells first).
+// 2. For cells spanning the same rows, we sort by intrinsic size.
+static bool compareRowSpanCellsInHeightDistributionOrder(const RenderTableCell* cell2, const RenderTableCell* cell1)
+{
+    unsigned cellRowIndex1 = cell1->rowIndex();
+    unsigned cellRowSpan1 = cell1->rowSpan();
+    unsigned cellRowIndex2 = cell2->rowIndex();
+    unsigned cellRowSpan2 = cell2->rowSpan();
+
+    if (cellRowIndex1 == cellRowIndex2 && cellRowSpan1 == cellRowSpan2)
+        return (cell2->logicalHeightForRowSizing() > cell1->logicalHeightForRowSizing());
+
+    return (cellRowIndex2 >= cellRowIndex1 && (cellRowIndex2 + cellRowSpan2) <= (cellRowIndex1 + cellRowSpan1));
+}
+
 // Distribute rowSpan cell height in rows those comes in rowSpan cell based on the ratio of row's height if
 // 1. RowSpan cell height is greater then the total height of rows in rowSpan cell
 void RenderTableSection::distributeRowSpanHeightToRows(SpanningRenderTableCells& rowSpanCells)
 {
     ASSERT(rowSpanCells.size());
 
+    // 'rowSpanCells' list is already sorted based on the cells rowIndex in ascending order
+    // Arrange row spanning cell in the order in which we need to process first.
+    std::sort(rowSpanCells.begin(), rowSpanCells.end(), compareRowSpanCellsInHeightDistributionOrder);
+
     unsigned extraHeightToPropagate = 0;
     unsigned lastRowIndex = 0;
     unsigned lastRowSpan = 0;
@@ -384,12 +404,13 @@
 
         unsigned rowIndex = cell->rowIndex();
 
-        // FIXME: For now, we are handling only rowspan cells those are not overlapping with other
-        // rowspan cells but this is wrong.
-        if (rowIndex < lastRowIndex + lastRowSpan)
+        unsigned rowSpan = cell->rowSpan();
+
+        // Only heightest spanning cell will distribute it's extra height in row if more then one spanning cells
+        // present at same level.
+        if (rowIndex == lastRowIndex && rowSpan == lastRowSpan)
             continue;
 
-        unsigned rowSpan = cell->rowSpan();
         int originalBeforePosition = m_rowPos[rowIndex + rowSpan];
 
         if (extraHeightToPropagate) {
@@ -411,6 +432,9 @@
         int totalAutoRowsHeight = 0;
         int totalRemainingRowsHeight = spanningRowsHeight.totalRowsHeight;
 
+        // FIXME: Inner spanning cell height should not change if it have fixed height when it's parent spanning cell
+        // is distributing it's extra height in rows.
+
         // Calculate total percentage, total auto rows height and total rows height except percent rows.
         for (unsigned row = rowIndex; row < (rowIndex + rowSpan); row++) {
             if (m_grid[row].logicalHeight.isPercent()) {
@@ -525,8 +549,7 @@
                     }
                     cell->clearIntrinsicPadding();
                     cell->clearOverrideSize();
-                    cell->setChildNeedsLayout(true, MarkOnlyThis);
-                    cell->layoutIfNeeded();
+                    cell->forceChildLayout();
                 }
 
                 if (RuntimeEnabledFeatures::rowSpanLogicalHeightSpreadingEnabled()) {
@@ -792,12 +815,11 @@
             }
 
             if (cellChildrenFlex) {
-                cell->setChildNeedsLayout(true, MarkOnlyThis);
                 // Alignment within a cell is based off the calculated
                 // height, which becomes irrelevant once the cell has
                 // been resized based off its percentage.
                 cell->setOverrideLogicalContentHeightFromRowHeight(rHeight);
-                cell->layoutIfNeeded();
+                cell->forceChildLayout();
 
                 // If the baseline moved, we may have to update the data for our row. Find out the new baseline.
                 if (cell->isBaselineAligned()) {
@@ -1635,7 +1657,7 @@
 RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const RenderObject* parent)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE_ROW_GROUP);
-    RenderTableSection* newSection = new (parent->renderArena()) RenderTableSection(0);
+    RenderTableSection* newSection = new RenderTableSection(0);
     newSection->setDocumentForAnonymous(parent->document());
     newSection->setStyle(newStyle.release());
     return newSection;
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index cf91399..94a73bf 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -27,12 +27,10 @@
 
 #include "core/accessibility/AXObjectCache.h"
 #include "core/dom/Text.h"
-#include "core/editing/VisiblePosition.h"
 #include "core/loader/TextResourceDecoder.h"
 #include "core/page/FrameView.h"
 #include "core/page/Settings.h"
 #include "core/platform/graphics/FloatQuad.h"
-#include "core/platform/text/Hyphenation.h"
 #include "core/platform/text/TextBreakIterator.h"
 #include "core/platform/text/transcoder/FontTranscoder.h"
 #include "core/rendering/EllipsisBox.h"
@@ -298,11 +296,10 @@
 void RenderText::deleteTextBoxes()
 {
     if (firstTextBox()) {
-        RenderArena* arena = renderArena();
         InlineTextBox* next;
         for (InlineTextBox* curr = firstTextBox(); curr; curr = next) {
             next = curr->nextTextBox();
-            curr->destroy(arena);
+            curr->destroy();
         }
         m_firstTextBox = m_lastTextBox = 0;
     }
@@ -517,7 +514,7 @@
     return false;
 }
 
-static VisiblePosition createVisiblePositionForBox(const InlineBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream)
+static PositionWithAffinity createPositionWithAffinityForBox(const InlineBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream)
 {
     EAffinity affinity = VP_DEFAULT_AFFINITY;
     switch (shouldAffinityBeDownstream) {
@@ -531,17 +528,17 @@
         affinity = offset > box->caretMinOffset() ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM;
         break;
     }
-    return box->renderer()->createVisiblePosition(offset, affinity);
+    return box->renderer()->createPositionWithAffinity(offset, affinity);
 }
 
-static VisiblePosition createVisiblePositionAfterAdjustingOffsetForBiDi(const InlineTextBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream)
+static PositionWithAffinity createPositionWithAffinityForBoxAfterAdjustingOffsetForBiDi(const InlineTextBox* box, int offset, ShouldAffinityBeDownstream shouldAffinityBeDownstream)
 {
     ASSERT(box);
     ASSERT(box->renderer());
     ASSERT(offset >= 0);
 
     if (offset && static_cast<unsigned>(offset) < box->len())
-        return createVisiblePositionForBox(box, box->start() + offset, shouldAffinityBeDownstream);
+        return createPositionWithAffinityForBox(box, box->start() + offset, shouldAffinityBeDownstream);
 
     bool positionIsAtStartOfBox = !offset;
     if (positionIsAtStartOfBox == box->isLeftToRightDirection()) {
@@ -550,7 +547,7 @@
         const InlineBox* prevBox = box->prevLeafChildIgnoringLineBreak();
         if ((prevBox && prevBox->bidiLevel() == box->bidiLevel())
             || box->renderer()->containingBlock()->style()->direction() == box->direction()) // FIXME: left on 12CBA
-            return createVisiblePositionForBox(box, box->caretLeftmostOffset(), shouldAffinityBeDownstream);
+            return createPositionWithAffinityForBox(box, box->caretLeftmostOffset(), shouldAffinityBeDownstream);
 
         if (prevBox && prevBox->bidiLevel() > box->bidiLevel()) {
             // e.g. left of B in aDC12BAb
@@ -559,7 +556,7 @@
                 leftmostBox = prevBox;
                 prevBox = leftmostBox->prevLeafChildIgnoringLineBreak();
             } while (prevBox && prevBox->bidiLevel() > box->bidiLevel());
-            return createVisiblePositionForBox(leftmostBox, leftmostBox->caretRightmostOffset(), shouldAffinityBeDownstream);
+            return createPositionWithAffinityForBox(leftmostBox, leftmostBox->caretRightmostOffset(), shouldAffinityBeDownstream);
         }
 
         if (!prevBox || prevBox->bidiLevel() < box->bidiLevel()) {
@@ -570,17 +567,17 @@
                 rightmostBox = nextBox;
                 nextBox = rightmostBox->nextLeafChildIgnoringLineBreak();
             } while (nextBox && nextBox->bidiLevel() >= box->bidiLevel());
-            return createVisiblePositionForBox(rightmostBox,
+            return createPositionWithAffinityForBox(rightmostBox,
                 box->isLeftToRightDirection() ? rightmostBox->caretMaxOffset() : rightmostBox->caretMinOffset(), shouldAffinityBeDownstream);
         }
 
-        return createVisiblePositionForBox(box, box->caretRightmostOffset(), shouldAffinityBeDownstream);
+        return createPositionWithAffinityForBox(box, box->caretRightmostOffset(), shouldAffinityBeDownstream);
     }
 
     const InlineBox* nextBox = box->nextLeafChildIgnoringLineBreak();
     if ((nextBox && nextBox->bidiLevel() == box->bidiLevel())
         || box->renderer()->containingBlock()->style()->direction() == box->direction())
-        return createVisiblePositionForBox(box, box->caretRightmostOffset(), shouldAffinityBeDownstream);
+        return createPositionWithAffinityForBox(box, box->caretRightmostOffset(), shouldAffinityBeDownstream);
 
     // offset is on the right edge
     if (nextBox && nextBox->bidiLevel() > box->bidiLevel()) {
@@ -590,7 +587,7 @@
             rightmostBox = nextBox;
             nextBox = rightmostBox->nextLeafChildIgnoringLineBreak();
         } while (nextBox && nextBox->bidiLevel() > box->bidiLevel());
-        return createVisiblePositionForBox(rightmostBox, rightmostBox->caretLeftmostOffset(), shouldAffinityBeDownstream);
+        return createPositionWithAffinityForBox(rightmostBox, rightmostBox->caretLeftmostOffset(), shouldAffinityBeDownstream);
     }
 
     if (!nextBox || nextBox->bidiLevel() < box->bidiLevel()) {
@@ -601,17 +598,17 @@
             leftmostBox = prevBox;
             prevBox = leftmostBox->prevLeafChildIgnoringLineBreak();
         } while (prevBox && prevBox->bidiLevel() >= box->bidiLevel());
-        return createVisiblePositionForBox(leftmostBox,
+        return createPositionWithAffinityForBox(leftmostBox,
             box->isLeftToRightDirection() ? leftmostBox->caretMinOffset() : leftmostBox->caretMaxOffset(), shouldAffinityBeDownstream);
     }
 
-    return createVisiblePositionForBox(box, box->caretLeftmostOffset(), shouldAffinityBeDownstream);
+    return createPositionWithAffinityForBox(box, box->caretLeftmostOffset(), shouldAffinityBeDownstream);
 }
 
-VisiblePosition RenderText::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderText::positionForPoint(const LayoutPoint& point)
 {
     if (!firstTextBox() || textLength() == 0)
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     LayoutUnit pointLineDirection = firstTextBox()->isHorizontal() ? point.x() : point.y();
     LayoutUnit pointBlockDirection = firstTextBox()->isHorizontal() ? point.y() : point.x();
@@ -632,7 +629,7 @@
             if (pointBlockDirection < bottom || (blocksAreFlipped && pointBlockDirection == bottom)) {
                 ShouldAffinityBeDownstream shouldAffinityBeDownstream;
                 if (lineDirectionPointFitsInBox(pointLineDirection, box, shouldAffinityBeDownstream))
-                    return createVisiblePositionAfterAdjustingOffsetForBiDi(box, box->offsetForPosition(pointLineDirection), shouldAffinityBeDownstream);
+                    return createPositionWithAffinityForBoxAfterAdjustingOffsetForBiDi(box, box->offsetForPosition(pointLineDirection), shouldAffinityBeDownstream);
             }
         }
         lastBox = box;
@@ -641,9 +638,9 @@
     if (lastBox) {
         ShouldAffinityBeDownstream shouldAffinityBeDownstream;
         lineDirectionPointFitsInBox(pointLineDirection, lastBox, shouldAffinityBeDownstream);
-        return createVisiblePositionAfterAdjustingOffsetForBiDi(lastBox, lastBox->offsetForPosition(pointLineDirection) + lastBox->start(), shouldAffinityBeDownstream);
+        return createPositionWithAffinityForBoxAfterAdjustingOffsetForBiDi(lastBox, lastBox->offsetForPosition(pointLineDirection) + lastBox->start(), shouldAffinityBeDownstream);
     }
-    return createVisiblePosition(0, DOWNSTREAM);
+    return createPositionWithAffinity(0, DOWNSTREAM);
 }
 
 LayoutRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, LayoutUnit* extraWidthToEndOfLine)
@@ -889,50 +886,6 @@
     return font.width(RenderBlock::constructTextRun(renderer, font, style->hyphenString().string(), style));
 }
 
-static float maxWordFragmentWidth(RenderText* renderer, RenderStyle* style, const Font& font, int wordOffset, int wordLength, int minimumPrefixLength, int minimumSuffixLength, int& suffixStart)
-{
-    suffixStart = 0;
-    if (wordLength <= minimumSuffixLength)
-        return 0;
-
-    Vector<int, 8> hyphenLocations;
-    int hyphenLocation = wordLength - minimumSuffixLength;
-    String word = renderer->substring(wordOffset, wordLength);
-    while ((hyphenLocation = lastHyphenLocation(word, hyphenLocation, style->locale())) >= minimumPrefixLength)
-        hyphenLocations.append(hyphenLocation);
-
-    if (hyphenLocations.isEmpty())
-        return 0;
-
-    hyphenLocations.reverse();
-
-    float minimumFragmentWidthToConsider = font.pixelSize() * 5 / 4 + hyphenWidth(renderer, font);
-    float maxFragmentWidth = 0;
-    for (size_t k = 0; k < hyphenLocations.size(); ++k) {
-        int fragmentLength = hyphenLocations[k] - suffixStart;
-        StringBuilder fragmentWithHyphen;
-        if (renderer->is8Bit())
-            fragmentWithHyphen.append(renderer->characters8() + wordOffset + suffixStart, fragmentLength);
-        else
-            fragmentWithHyphen.append(renderer->characters16() + wordOffset + suffixStart, fragmentLength);
-        fragmentWithHyphen.append(style->hyphenString());
-
-        TextRun run = RenderBlock::constructTextRun(renderer, font, fragmentWithHyphen.toString(), style);
-        run.setCharactersLength(fragmentWithHyphen.length());
-        run.setCharacterScanForCodePath(!renderer->canUseSimpleFontCodePath());
-        float fragmentWidth = font.width(run);
-
-        // Narrow prefixes are ignored. See tryHyphenating in RenderBlockLineLayout.cpp.
-        if (fragmentWidth <= minimumFragmentWidthToConsider)
-            continue;
-
-        suffixStart += fragmentLength;
-        maxFragmentWidth = max(maxFragmentWidth, fragmentWidth);
-    }
-
-    return maxFragmentWidth;
-}
-
 void RenderText::computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow& glyphOverflow)
 {
     ASSERT(m_hasTab || preferredLogicalWidthsDirty() || !m_knownToHaveNoOverflowAndNoFallbackFonts);
@@ -976,19 +929,6 @@
     float maxWordWidth = numeric_limits<float>::max();
     int minimumPrefixLength = 0;
     int minimumSuffixLength = 0;
-    if (styleToUse->hyphens() == HyphensAuto && canHyphenate(styleToUse->locale())) {
-        maxWordWidth = 0;
-
-        // Map 'hyphenate-limit-{before,after}: auto;' to 2.
-        minimumPrefixLength = styleToUse->hyphenationLimitBefore();
-        if (minimumPrefixLength < 0)
-            minimumPrefixLength = 2;
-
-        minimumSuffixLength = styleToUse->hyphenationLimitAfter();
-        if (minimumSuffixLength < 0)
-            minimumSuffixLength = 2;
-    }
-
     int firstGlyphLeftOverflow = -1;
 
     bool breakAll = (styleToUse->wordBreak() == BreakAllWordBreak || styleToUse->wordBreak() == BreakWordBreak) && styleToUse->autoWrap();
@@ -1034,7 +974,7 @@
             ASSERT(lastWordBoundary == i);
             lastWordBoundary++;
             continue;
-        } else if (c == softHyphen && styleToUse->hyphens() != HyphensNone) {
+        } else if (c == softHyphen) {
             currMaxWidth += widthFromCache(f, lastWordBoundary, i - lastWordBoundary, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow);
             if (firstGlyphLeftOverflow < 0)
                 firstGlyphLeftOverflow = glyphOverflow.left;
@@ -1045,7 +985,7 @@
         bool hasBreak = breakAll || isBreakable(breakIterator, i, nextBreakable);
         bool betweenWords = true;
         int j = i;
-        while (c != '\n' && c != ' ' && c != '\t' && (c != softHyphen || styleToUse->hyphens() == HyphensNone)) {
+        while (c != '\n' && c != ' ' && c != '\t' && (c != softHyphen)) {
             j++;
             if (j == len)
                 break;
@@ -1066,28 +1006,11 @@
                 w = widthFromCache(f, i, wordLen + 1, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow) - wordTrailingSpaceWidth;
             else {
                 w = widthFromCache(f, i, wordLen, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow);
-                if (c == softHyphen && styleToUse->hyphens() != HyphensNone)
+                if (c == softHyphen)
                     currMinWidth += hyphenWidth(this, f);
             }
 
-            if (w > maxWordWidth) {
-                int suffixStart;
-                float maxFragmentWidth = maxWordFragmentWidth(this, styleToUse, f, i, wordLen, minimumPrefixLength, minimumSuffixLength, suffixStart);
-
-                if (suffixStart) {
-                    float suffixWidth;
-                    if (wordTrailingSpaceWidth && isSpace)
-                        suffixWidth = widthFromCache(f, i + suffixStart, wordLen - suffixStart + 1, leadWidth + currMaxWidth, 0, 0) - wordTrailingSpaceWidth;
-                    else
-                        suffixWidth = widthFromCache(f, i + suffixStart, wordLen - suffixStart, leadWidth + currMaxWidth, 0, 0);
-
-                    maxFragmentWidth = max(maxFragmentWidth, suffixWidth);
-
-                    currMinWidth += maxFragmentWidth - w;
-                    maxWordWidth = max(maxWordWidth, maxFragmentWidth);
-                } else
-                    maxWordWidth = w;
-            }
+            maxWordWidth = max(maxWordWidth, w);
 
             if (firstGlyphLeftOverflow < 0)
                 firstGlyphLeftOverflow = glyphOverflow.left;
@@ -1372,7 +1295,7 @@
     return prev;
 }
 
-void RenderText::addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const
+void RenderText::addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
 {
     // Text nodes aren't event targets, so don't descend any further.
 }
@@ -1496,7 +1419,7 @@
 
 InlineTextBox* RenderText::createTextBox()
 {
-    return new (renderArena()) InlineTextBox(this);
+    return new InlineTextBox(this);
 }
 
 InlineTextBox* RenderText::createInlineTextBox()
@@ -1529,7 +1452,7 @@
             m_lastTextBox = s->prevTextBox();
         else
             s->nextTextBox()->setPreviousTextBox(s->prevTextBox());
-        s->destroy(renderArena());
+        s->destroy();
         return;
     }
 
diff --git a/Source/core/rendering/RenderText.h b/Source/core/rendering/RenderText.h
index 4aa1d4c..7579704 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -67,7 +67,7 @@
     enum ClippingOption { NoClipping, ClipToEllipsis };
     void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed = 0, ClippingOption = NoClipping) const;
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE;
 
     bool is8Bit() const { return m_text.is8Bit(); }
     const LChar* characters8() const { return m_text.impl()->characters8(); }
@@ -152,7 +152,7 @@
     virtual void setTextInternal(PassRefPtr<StringImpl>);
     virtual UChar previousCharacter() const;
 
-    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const OVERRIDE;
+    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const OVERRIDE;
 
     virtual InlineTextBox* createTextBox(); // Subclassed by SVG.
 
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 8bfcbf2..12b102b 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -216,7 +216,7 @@
 // inner flows have the necessary information to correctly fragment the content.
 // 2. The flows are laid out from the inner flow to the outer flow. After an inner flow is laid out it goes into the constrained layout phase
 // and marks the auto-height regions they need layout. This means the outer flows will relayout if they depend on regions with auto-height regions
-// belonging to inner flows. This step will correctly compute the overrideLogicalHeights for the auto-height regions. It's possible for non-auto-height
+// belonging to inner flows. This step will correctly set the computedAutoHeight for the auto-height regions. It's possible for non-auto-height
 // regions to relayout if they depend on auto-height regions. This will invalidate the inner flow threads and mark them as needing layout.
 // 3. The last step is to do one last layout if there are pathological dependencies between non-auto-height regions and auto-height regions
 // as detected in the previous step.
@@ -893,7 +893,7 @@
     size_t size = renderWidgets.size();
 
     for (size_t i = 0; i < size; ++i)
-        renderWidgets[i]->deref(renderArena());
+        renderWidgets[i]->deref();
 }
 
 void RenderView::updateWidgetPositions()
@@ -1015,7 +1015,7 @@
     ASSERT(m_layoutStateDisableCount == 0);
     ASSERT(m_layoutState == 0);
 
-    m_layoutState = new (renderArena()) LayoutState(root);
+    m_layoutState = new LayoutState(root);
 }
 
 bool RenderView::shouldDisableLayoutStateForSubtree(RenderObject* renderer) const
diff --git a/Source/core/rendering/RenderView.h b/Source/core/rendering/RenderView.h
index 33846ef..80061e0 100644
--- a/Source/core/rendering/RenderView.h
+++ b/Source/core/rendering/RenderView.h
@@ -225,7 +225,7 @@
             || (renderer->isRenderBlock() && toRenderBlock(renderer)->shapeInsideInfo())
             || (m_layoutState->shapeInsideInfo() && renderer->isRenderBlock() && !toRenderBlock(renderer)->allowsShapeInsideInfoSharing())
             ) {
-            m_layoutState = new (renderArena()) LayoutState(m_layoutState, renderer, offset, pageHeight, pageHeightChanged, colInfo);
+            m_layoutState = new LayoutState(m_layoutState, renderer, offset, pageHeight, pageHeightChanged, colInfo);
             return true;
         }
         return false;
@@ -235,7 +235,7 @@
     {
         LayoutState* state = m_layoutState;
         m_layoutState = state->m_next;
-        state->destroy(renderArena());
+        delete state;
     }
 
     // Suspends the LayoutState optimization. Used under transforms that cannot be represented by
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index 99e30dd..2c8d271 100644
--- a/Source/core/rendering/RenderWidget.cpp
+++ b/Source/core/rendering/RenderWidget.cpp
@@ -31,7 +31,6 @@
 #include "core/rendering/RenderLayer.h"
 #include "core/rendering/RenderLayerBacking.h"
 #include "core/rendering/RenderView.h"
-#include "core/rendering/RenderWidgetProtector.h"
 
 using namespace std;
 
@@ -111,12 +110,8 @@
 void RenderWidget::destroy()
 {
     willBeDestroyed();
-
-    // Grab the arena from node()->document()->renderArena() before clearing the node pointer.
-    // Clear the node before deref-ing, as this may be deleted when deref is called.
-    RenderArena* arena = renderArena();
     clearNode();
-    deref(arena);
+    deref();
 }
 
 RenderWidget::~RenderWidget()
@@ -148,7 +143,7 @@
 
     m_clipRect = clipRect;
 
-    RenderWidgetProtector protector(this);
+    RefPtr<RenderWidget> protector(this);
     RefPtr<Node> protectedNode(node());
     m_widget->setFrameRect(newFrame);
 
@@ -318,10 +313,10 @@
     toFrameView(m_widget.get())->setIsOverlapped(isOverlapped);
 }
 
-void RenderWidget::deref(RenderArena *arena)
+void RenderWidget::deref()
 {
     if (--m_refCount <= 0)
-        arenaDelete(arena, this);
+        postDestroy();
 }
 
 void RenderWidget::updateWidgetPosition()
diff --git a/Source/core/rendering/RenderWidget.h b/Source/core/rendering/RenderWidget.h
index 3f4e572..3e4eeb2 100644
--- a/Source/core/rendering/RenderWidget.h
+++ b/Source/core/rendering/RenderWidget.h
@@ -67,8 +67,8 @@
     void widgetPositionsUpdated();
     IntRect windowClipRect() const;
 
-    RenderArena* ref() { ++m_refCount; return renderArena(); }
-    void deref(RenderArena*);
+    void ref() { ++m_refCount; }
+    void deref();
 
 protected:
     RenderWidget(Element*);
diff --git a/Source/core/rendering/RenderWidgetProtector.h b/Source/core/rendering/RenderWidgetProtector.h
deleted file mode 100644
index 2a65ab4..0000000
--- a/Source/core/rendering/RenderWidgetProtector.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RenderWidgetProtector_h
-#define RenderWidgetProtector_h
-
-#include "core/rendering/RenderWidget.h"
-
-namespace WebCore {
-
-class RenderWidgetProtector {
-    WTF_MAKE_NONCOPYABLE(RenderWidgetProtector);
-public:
-    explicit RenderWidgetProtector(RenderWidget* object)
-        : m_object(object)
-        , m_arena(object->ref())
-    {
-    }
-
-    ~RenderWidgetProtector()
-    {
-        m_object->deref(m_arena);
-    }
-
-private:
-    RenderWidget* m_object;
-    RenderArena* m_arena;
-};
-
-}
-
-#endif // RenderWidgetProtector_h
diff --git a/Source/core/rendering/RootInlineBox.cpp b/Source/core/rendering/RootInlineBox.cpp
index fa1def2..bd816bb 100644
--- a/Source/core/rendering/RootInlineBox.cpp
+++ b/Source/core/rendering/RootInlineBox.cpp
@@ -31,7 +31,6 @@
 #include "core/rendering/HitTestResult.h"
 #include "core/rendering/InlineTextBox.h"
 #include "core/rendering/PaintInfo.h"
-#include "core/rendering/RenderArena.h"
 #include "core/rendering/RenderBlock.h"
 #include "core/rendering/RenderFlowThread.h"
 #include "core/rendering/RenderView.h"
@@ -65,18 +64,18 @@
 }
 
 
-void RootInlineBox::destroy(RenderArena* arena)
+void RootInlineBox::destroy()
 {
-    detachEllipsisBox(arena);
-    InlineFlowBox::destroy(arena);
+    detachEllipsisBox();
+    InlineFlowBox::destroy();
 }
 
-void RootInlineBox::detachEllipsisBox(RenderArena* arena)
+void RootInlineBox::detachEllipsisBox()
 {
     if (hasEllipsisBox()) {
         EllipsisBox* box = gEllipsisBoxMap->take(this);
         box->setParent(0);
-        box->destroy(arena);
+        box->destroy();
         setHasEllipsisBox(false);
     }
 }
@@ -89,7 +88,7 @@
 void RootInlineBox::clearTruncation()
 {
     if (hasEllipsisBox()) {
-        detachEllipsisBox(renderer()->renderArena());
+        detachEllipsisBox();
         InlineFlowBox::clearTruncation();
     }
 }
@@ -132,9 +131,9 @@
                                   InlineBox* markupBox)
 {
     // Create an ellipsis box.
-    EllipsisBox* ellipsisBox = new (renderer()->renderArena()) EllipsisBox(renderer(), ellipsisStr, this,
-                                                              ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(),
-                                                              y(), !prevRootBox(), isHorizontal(), markupBox);
+    EllipsisBox* ellipsisBox = new EllipsisBox(renderer(), ellipsisStr, this,
+        ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(),
+        y(), !prevRootBox(), isHorizontal(), markupBox);
 
     if (!gEllipsisBoxMap)
         gEllipsisBoxMap = new EllipsisBoxMap();
diff --git a/Source/core/rendering/RootInlineBox.h b/Source/core/rendering/RootInlineBox.h
index 5cf5e68..f6ddc5f 100644
--- a/Source/core/rendering/RootInlineBox.h
+++ b/Source/core/rendering/RootInlineBox.h
@@ -37,11 +37,11 @@
 public:
     explicit RootInlineBox(RenderBlock*);
 
-    virtual void destroy(RenderArena*) OVERRIDE FINAL;
+    virtual void destroy() OVERRIDE FINAL;
 
     virtual bool isRootInlineBox() const OVERRIDE FINAL { return true; }
 
-    void detachEllipsisBox(RenderArena*);
+    void detachEllipsisBox();
 
     RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_nextLineBox); }
     RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_prevLineBox); }
diff --git a/Source/core/rendering/style/ContentData.cpp b/Source/core/rendering/style/ContentData.cpp
index dd052ba..828568f 100644
--- a/Source/core/rendering/style/ContentData.cpp
+++ b/Source/core/rendering/style/ContentData.cpp
@@ -79,21 +79,21 @@
 
 RenderObject* TextContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
 {
-    RenderObject* renderer = new (doc->renderArena()) RenderTextFragment(doc, m_text.impl());
+    RenderObject* renderer = new RenderTextFragment(doc, m_text.impl());
     renderer->setPseudoStyle(pseudoStyle);
     return renderer;
 }
 
 RenderObject* CounterContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
 {
-    RenderObject* renderer = new (doc->renderArena()) RenderCounter(doc, *m_counter);
+    RenderObject* renderer = new RenderCounter(doc, *m_counter);
     renderer->setPseudoStyle(pseudoStyle);
     return renderer;
 }
 
 RenderObject* QuoteContentData::createRenderer(Document* doc, RenderStyle* pseudoStyle) const
 {
-    RenderObject* renderer = new (doc->renderArena()) RenderQuote(doc, m_quote);
+    RenderObject* renderer = new RenderQuote(doc, m_quote);
     renderer->setPseudoStyle(pseudoStyle);
     return renderer;
 }
diff --git a/Source/core/rendering/style/FillLayer.cpp b/Source/core/rendering/style/FillLayer.cpp
index 0a3cf36..e93d0a1 100644
--- a/Source/core/rendering/style/FillLayer.cpp
+++ b/Source/core/rendering/style/FillLayer.cpp
@@ -351,6 +351,9 @@
     if (m_composite == CompositeClear || m_composite == CompositeCopy)
         return true;
 
+    if (m_blendMode != BlendModeNormal)
+        return false;
+
     if (m_composite == CompositeSourceOver)
         return m_image->knownToBeOpaque(renderer);
 
diff --git a/Source/core/rendering/style/GridCoordinate.h b/Source/core/rendering/style/GridCoordinate.h
index a55b7fb..ec0d890 100644
--- a/Source/core/rendering/style/GridCoordinate.h
+++ b/Source/core/rendering/style/GridCoordinate.h
@@ -31,7 +31,9 @@
 #ifndef GridCoordinate_h
 #define GridCoordinate_h
 
+#include "wtf/HashMap.h"
 #include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
@@ -51,6 +53,11 @@
         ASSERT(initialPositionIndex <= finalPositionIndex);
     }
 
+    bool operator==(const GridSpan& o) const
+    {
+        return initialPositionIndex == o.initialPositionIndex && finalPositionIndex == o.finalPositionIndex;
+    }
+
     size_t initialPositionIndex;
     size_t finalPositionIndex;
 };
@@ -70,10 +77,22 @@
     {
     }
 
+    bool operator==(const GridCoordinate& o) const
+    {
+        return columns == o.columns && rows == o.rows;
+    }
+
+    bool operator!=(const GridCoordinate& o) const
+    {
+        return !(*this == o);
+    }
+
     GridSpan columns;
     GridSpan rows;
 };
 
+typedef HashMap<String, GridCoordinate> NamedGridAreaMap;
+
 } // namespace WebCore
 
 #endif // GridCoordinate_h
diff --git a/Source/core/rendering/style/KeyframeList.cpp b/Source/core/rendering/style/KeyframeList.cpp
index 634699e..9d20a1c 100644
--- a/Source/core/rendering/style/KeyframeList.cpp
+++ b/Source/core/rendering/style/KeyframeList.cpp
@@ -20,11 +20,27 @@
  */
 
 #include "config.h"
-#include "core/rendering/RenderObject.h"
 #include "core/rendering/style/KeyframeList.h"
 
+#include "core/css/StylePropertySet.h"
+#include "core/rendering/RenderObject.h"
+
 namespace WebCore {
 
+void KeyframeValue::addProperties(const StylePropertySet* propertySet)
+{
+    if (!propertySet)
+        return;
+    unsigned propertyCount = propertySet->propertyCount();
+    for (unsigned i = 0; i < propertyCount; ++i) {
+        CSSPropertyID property = propertySet->propertyAt(i).id();
+        // Timing-function within keyframes is special, because it is not animated; it just
+        // describes the timing function between this keyframe and the next.
+        if (property != CSSPropertyWebkitAnimationTimingFunction)
+            addProperty(property);
+    }
+}
+
 KeyframeList::~KeyframeList()
 {
     clear();
diff --git a/Source/core/rendering/style/KeyframeList.h b/Source/core/rendering/style/KeyframeList.h
index adab92f..5a5cf92 100644
--- a/Source/core/rendering/style/KeyframeList.h
+++ b/Source/core/rendering/style/KeyframeList.h
@@ -36,6 +36,7 @@
 
 class RenderObject;
 class RenderStyle;
+class StylePropertySet;
 
 class KeyframeValue {
 public:
@@ -45,6 +46,7 @@
     {
     }
 
+    void addProperties(const StylePropertySet*);
     void addProperty(CSSPropertyID prop) { m_properties.add(prop); }
     bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); }
     const HashSet<CSSPropertyID>& properties() const { return m_properties; }
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index 2e89c6a..929b894 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -1006,8 +1006,6 @@
 
 const AtomicString& RenderStyle::hyphenString() const
 {
-    ASSERT(hyphens() != HyphensNone);
-
     const AtomicString& hyphenationString = rareInheritedData.get()->hyphenationString;
     if (!hyphenationString.isNull())
         return hyphenationString;
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index 286ea49..b4c6a66 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -737,6 +737,9 @@
     const Vector<GridTrackSize>& gridDefinitionRows() const { return rareNonInheritedData->m_grid->m_gridDefinitionRows; }
     const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheritedData->m_grid->m_namedGridColumnLines; }
     const NamedGridLinesMap& namedGridRowLines() const { return rareNonInheritedData->m_grid->m_namedGridRowLines; }
+    const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData->m_grid->m_namedGridArea; }
+    size_t namedGridAreaRowCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaRowCount; }
+    size_t namedGridAreaColumnCount() const { return rareNonInheritedData->m_grid->m_namedGridAreaColumnCount; }
     GridAutoFlow gridAutoFlow() const { return rareNonInheritedData->m_grid->m_gridAutoFlow; }
     const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData->m_grid->m_gridAutoColumns; }
     const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_grid->m_gridAutoRows; }
@@ -772,10 +775,6 @@
     EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(rareInheritedData->overflowWrap); }
     LineBreak lineBreak() const { return static_cast<LineBreak>(rareInheritedData->lineBreak); }
     const AtomicString& highlight() const { return rareInheritedData->highlight; }
-    Hyphens hyphens() const { return static_cast<Hyphens>(rareInheritedData->hyphens); }
-    short hyphenationLimitBefore() const { return rareInheritedData->hyphenationLimitBefore; }
-    short hyphenationLimitAfter() const { return rareInheritedData->hyphenationLimitAfter; }
-    short hyphenationLimitLines() const { return rareInheritedData->hyphenationLimitLines; }
     const AtomicString& hyphenationString() const { return rareInheritedData->hyphenationString; }
     const AtomicString& locale() const { return rareInheritedData->locale; }
     EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); }
@@ -1187,6 +1186,9 @@
     void setGridDefinitionRows(const Vector<GridTrackSize>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridDefinitionRows, lengths); }
     void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGridColumnLines); }
     void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLines); }
+    void setNamedGridArea(const NamedGridAreaMap& namedGridArea) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridArea, namedGridArea); }
+    void setNamedGridAreaRowCount(size_t rowCount) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridAreaRowCount, rowCount); }
+    void setNamedGridAreaColumnCount(size_t columnCount) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridAreaColumnCount, columnCount); }
     void setGridAutoFlow(GridAutoFlow flow) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoFlow, flow); }
 
     void setGridColumnStart(const GridPosition& columnStartPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridColumnStart, columnStartPosition); }
@@ -1210,9 +1212,6 @@
     void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); }
     void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); }
     void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
-    void setHyphenationLimitBefore(short limit) { SET_VAR(rareInheritedData, hyphenationLimitBefore, limit); }
-    void setHyphenationLimitAfter(short limit) { SET_VAR(rareInheritedData, hyphenationLimitAfter, limit); }
-    void setHyphenationLimitLines(short limit) { SET_VAR(rareInheritedData, hyphenationLimitLines, limit); }
     void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationString, h); }
     void setLocale(const AtomicString& locale) { SET_VAR(rareInheritedData, locale, locale); }
     void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); }
@@ -1539,10 +1538,6 @@
     static LineBreak initialLineBreak() { return LineBreakAuto; }
     static const AtomicString& initialHighlight() { return nullAtom; }
     static ESpeak initialSpeak() { return SpeakNormal; }
-    static Hyphens initialHyphens() { return HyphensManual; }
-    static short initialHyphenationLimitBefore() { return -1; }
-    static short initialHyphenationLimitAfter() { return -1; }
-    static short initialHyphenationLimitLines() { return -1; }
     static const AtomicString& initialHyphenationString() { return nullAtom; }
     static const AtomicString& initialLocale() { return nullAtom; }
     static EBorderFit initialBorderFit() { return BorderFitBorder; }
@@ -1595,6 +1590,9 @@
     static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLinesMap(); }
     static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesMap(); }
 
+    static NamedGridAreaMap initialNamedGridArea() { return NamedGridAreaMap(); }
+    static size_t initialNamedGridAreaCount() { return 0; }
+
     // 'auto' is the default.
     static GridPosition initialGridColumnStart() { return GridPosition(); }
     static GridPosition initialGridColumnEnd() { return GridPosition(); }
diff --git a/Source/core/rendering/style/StyleGridData.cpp b/Source/core/rendering/style/StyleGridData.cpp
index 5a11326..8ecde3c 100644
--- a/Source/core/rendering/style/StyleGridData.cpp
+++ b/Source/core/rendering/style/StyleGridData.cpp
@@ -33,11 +33,14 @@
 StyleGridData::StyleGridData()
     : m_gridDefinitionColumns(RenderStyle::initialGridDefinitionColumns())
     , m_gridDefinitionRows(RenderStyle::initialGridDefinitionRows())
+    , m_namedGridColumnLines(RenderStyle::initialNamedGridColumnLines())
+    , m_namedGridRowLines(RenderStyle::initialNamedGridRowLines())
     , m_gridAutoFlow(RenderStyle::initialGridAutoFlow())
     , m_gridAutoRows(RenderStyle::initialGridAutoRows())
     , m_gridAutoColumns(RenderStyle::initialGridAutoColumns())
-    , m_namedGridColumnLines(RenderStyle::initialNamedGridColumnLines())
-    , m_namedGridRowLines(RenderStyle::initialNamedGridRowLines())
+    , m_namedGridArea(RenderStyle::initialNamedGridArea())
+    , m_namedGridAreaRowCount(RenderStyle::initialNamedGridAreaCount())
+    , m_namedGridAreaColumnCount(RenderStyle::initialNamedGridAreaCount())
 {
 }
 
@@ -50,6 +53,9 @@
     , m_gridAutoFlow(o.m_gridAutoFlow)
     , m_gridAutoRows(o.m_gridAutoRows)
     , m_gridAutoColumns(o.m_gridAutoColumns)
+    , m_namedGridArea(o.m_namedGridArea)
+    , m_namedGridAreaRowCount(o.m_namedGridAreaRowCount)
+    , m_namedGridAreaColumnCount(o.m_namedGridAreaColumnCount)
 {
 }
 
diff --git a/Source/core/rendering/style/StyleGridData.h b/Source/core/rendering/style/StyleGridData.h
index 96f1ca5..21d9b01 100644
--- a/Source/core/rendering/style/StyleGridData.h
+++ b/Source/core/rendering/style/StyleGridData.h
@@ -26,6 +26,7 @@
 #ifndef StyleGridData_h
 #define StyleGridData_h
 
+#include "core/rendering/style/GridCoordinate.h"
 #include "core/rendering/style/GridTrackSize.h"
 #include "core/rendering/style/RenderStyleConstants.h"
 #include "wtf/PassRefPtr.h"
@@ -44,7 +45,7 @@
 
     bool operator==(const StyleGridData& o) const
     {
-        return m_gridDefinitionColumns == o.m_gridDefinitionColumns && m_gridDefinitionRows == o.m_gridDefinitionRows && m_gridAutoFlow == o.m_gridAutoFlow && m_gridAutoRows == o.m_gridAutoRows && m_gridAutoColumns == o.m_gridAutoColumns && m_namedGridColumnLines == o.m_namedGridColumnLines && m_namedGridRowLines == o.m_namedGridRowLines;
+        return m_gridDefinitionColumns == o.m_gridDefinitionColumns && m_gridDefinitionRows == o.m_gridDefinitionRows && m_gridAutoFlow == o.m_gridAutoFlow && m_gridAutoRows == o.m_gridAutoRows && m_gridAutoColumns == o.m_gridAutoColumns && m_namedGridColumnLines == o.m_namedGridColumnLines && m_namedGridRowLines == o.m_namedGridRowLines && m_namedGridArea == o.m_namedGridArea && m_namedGridArea == o.m_namedGridArea && m_namedGridAreaRowCount == o.m_namedGridAreaRowCount && m_namedGridAreaColumnCount == o.m_namedGridAreaColumnCount;
     }
 
     bool operator!=(const StyleGridData& o) const
@@ -63,6 +64,12 @@
     GridTrackSize m_gridAutoRows;
     GridTrackSize m_gridAutoColumns;
 
+    NamedGridAreaMap m_namedGridArea;
+    // Because m_namedGridArea doesn't store the unnamed grid areas, we need to keep track
+    // of the explicit grid size defined by both named and unnamed grid areas.
+    size_t m_namedGridAreaRowCount;
+    size_t m_namedGridAreaColumnCount;
+
 private:
     StyleGridData();
     StyleGridData(const StyleGridData&);
diff --git a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
index b78922a..11ce00e 100644
--- a/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
+++ b/Source/core/rendering/svg/ReferenceFilterBuilder.cpp
@@ -44,13 +44,13 @@
 
 namespace WebCore {
 
-// Returns whether or not the SVGStyledElement object contains a valid color-interpolation-filters attribute
-static bool getSVGStyledElementColorSpace(SVGStyledElement* svgStyledElement, ColorSpace& cs)
+// Returns whether or not the SVGElement object contains a valid color-interpolation-filters attribute
+static bool getSVGElementColorSpace(SVGElement* svgElement, ColorSpace& cs)
 {
-    if (!svgStyledElement)
+    if (!svgElement)
         return false;
 
-    const RenderObject* renderer = svgStyledElement->renderer();
+    const RenderObject* renderer = svgElement->renderer();
     const RenderStyle* style = renderer ? renderer->style() : 0;
     const SVGRenderStyle* svgStyle = style ? style->svgStyle() : 0;
     EColorInterpolation eColorInterpolation = CI_AUTO;
@@ -59,7 +59,7 @@
         eColorInterpolation = svgStyle->colorInterpolationFilters();
     } else {
         // Otherwise, use the slow path by using string comparison (used by external svg files)
-        RefPtr<CSSValue> cssValue = svgStyledElement->getPresentationAttribute(
+        RefPtr<CSSValue> cssValue = svgElement->getPresentationAttribute(
             SVGNames::color_interpolation_filtersAttr.toString());
         if (cssValue.get() && cssValue->isPrimitiveValue()) {
             const CSSPrimitiveValue& primitiveValue = *((CSSPrimitiveValue*)cssValue.get());
@@ -125,7 +125,7 @@
     RefPtr<SVGFilterBuilder> builder = SVGFilterBuilder::create(previousEffect, SourceAlpha::create(parentFilter));
 
     ColorSpace filterColorSpace = ColorSpaceDeviceRGB;
-    bool useFilterColorSpace = getSVGStyledElementColorSpace(filterElement, filterColorSpace);
+    bool useFilterColorSpace = getSVGElementColorSpace(filterElement, filterColorSpace);
 
     for (Node* node = filterElement->firstChild(); node; node = node->nextSibling()) {
         if (!node->isSVGElement())
@@ -144,7 +144,7 @@
         effectElement->setStandardAttributes(effect.get());
         effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrentValue(), parentFilter->sourceImageRect()));
         ColorSpace colorSpace = filterColorSpace;
-        if (useFilterColorSpace || getSVGStyledElementColorSpace(effectElement, colorSpace))
+        if (useFilterColorSpace || getSVGElementColorSpace(effectElement, colorSpace))
             effect->setOperatingColorSpace(colorSpace);
         builder->add(effectElement->resultCurrentValue(), effect);
     }
diff --git a/Source/core/rendering/svg/RenderSVGContainer.cpp b/Source/core/rendering/svg/RenderSVGContainer.cpp
index 7b1bf66..d64aec4 100644
--- a/Source/core/rendering/svg/RenderSVGContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGContainer.cpp
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-RenderSVGContainer::RenderSVGContainer(SVGStyledElement* node)
+RenderSVGContainer::RenderSVGContainer(SVGElement* node)
     : RenderSVGModelObject(node)
     , m_objectBoundingBoxValid(false)
     , m_needsBoundariesUpdate(true)
diff --git a/Source/core/rendering/svg/RenderSVGContainer.h b/Source/core/rendering/svg/RenderSVGContainer.h
index f5a40fa..b25932b 100644
--- a/Source/core/rendering/svg/RenderSVGContainer.h
+++ b/Source/core/rendering/svg/RenderSVGContainer.h
@@ -31,7 +31,7 @@
 
 class RenderSVGContainer : public RenderSVGModelObject {
 public:
-    explicit RenderSVGContainer(SVGStyledElement*);
+    explicit RenderSVGContainer(SVGElement*);
     virtual ~RenderSVGContainer();
 
     RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
diff --git a/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp b/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
index 7f02252..9fc703e 100644
--- a/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
@@ -23,7 +23,7 @@
 
 namespace WebCore {
 
-RenderSVGHiddenContainer::RenderSVGHiddenContainer(SVGStyledElement* element)
+RenderSVGHiddenContainer::RenderSVGHiddenContainer(SVGElement* element)
     : RenderSVGContainer(element)
 {
 }
diff --git a/Source/core/rendering/svg/RenderSVGHiddenContainer.h b/Source/core/rendering/svg/RenderSVGHiddenContainer.h
index ee2b992..f8e57d3 100644
--- a/Source/core/rendering/svg/RenderSVGHiddenContainer.h
+++ b/Source/core/rendering/svg/RenderSVGHiddenContainer.h
@@ -24,13 +24,13 @@
 
 namespace WebCore {
 
-class SVGStyledElement;
+class SVGElement;
 
 // This class is for containers which are never drawn, but do need to support style
 // <defs>, <linearGradient>, <radialGradient> are all good examples
 class RenderSVGHiddenContainer : public RenderSVGContainer {
 public:
-    explicit RenderSVGHiddenContainer(SVGStyledElement*);
+    explicit RenderSVGHiddenContainer(SVGElement*);
 
     virtual const char* renderName() const { return "RenderSVGHiddenContainer"; }
 
diff --git a/Source/core/rendering/svg/RenderSVGInline.cpp b/Source/core/rendering/svg/RenderSVGInline.cpp
index bec0c50..917ea33 100644
--- a/Source/core/rendering/svg/RenderSVGInline.cpp
+++ b/Source/core/rendering/svg/RenderSVGInline.cpp
@@ -30,6 +30,14 @@
 
 namespace WebCore {
 
+bool RenderSVGInline::isChildAllowed(RenderObject* child, RenderStyle* style) const
+{
+    if (SVGRenderSupport::isEmptySVGInlineText(child))
+        return false;
+
+    return RenderInline::isChildAllowed(child, style);
+}
+
 RenderSVGInline::RenderSVGInline(Element* element)
     : RenderInline(element)
 {
@@ -38,7 +46,7 @@
 
 InlineFlowBox* RenderSVGInline::createInlineFlowBox()
 {
-    InlineFlowBox* box = new (renderArena()) SVGInlineFlowBox(this);
+    InlineFlowBox* box = new SVGInlineFlowBox(this);
     box->setHasVirtualLogicalHeight();
     return box;
 }
diff --git a/Source/core/rendering/svg/RenderSVGInline.h b/Source/core/rendering/svg/RenderSVGInline.h
index 5a01988..4cc390f 100644
--- a/Source/core/rendering/svg/RenderSVGInline.h
+++ b/Source/core/rendering/svg/RenderSVGInline.h
@@ -33,6 +33,8 @@
     virtual bool requiresLayer() const OVERRIDE FINAL { return false; }
     virtual bool isSVGInline() const OVERRIDE FINAL { return true; }
 
+    virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
+
     // Chapter 10.4 of the SVG Specification say that we should use the
     // object bounding box of the parent text element.
     // We search for the root text element and take its bounding box.
diff --git a/Source/core/rendering/svg/RenderSVGInlineText.cpp b/Source/core/rendering/svg/RenderSVGInlineText.cpp
index f81b3e1..1141a56 100644
--- a/Source/core/rendering/svg/RenderSVGInlineText.cpp
+++ b/Source/core/rendering/svg/RenderSVGInlineText.cpp
@@ -100,7 +100,7 @@
 
 InlineTextBox* RenderSVGInlineText::createTextBox()
 {
-    InlineTextBox* box = new (renderArena()) SVGInlineTextBox(this);
+    InlineTextBox* box = new SVGInlineTextBox(this);
     box->setHasVirtualLogicalHeight();
     return box;
 }
@@ -155,10 +155,10 @@
     return it->value.x != SVGTextLayoutAttributes::emptyValue() || it->value.y != SVGTextLayoutAttributes::emptyValue();
 }
 
-VisiblePosition RenderSVGInlineText::positionForPoint(const LayoutPoint& point)
+PositionWithAffinity RenderSVGInlineText::positionForPoint(const LayoutPoint& point)
 {
     if (!firstTextBox() || !textLength())
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     float baseline = m_scaledFont.fontMetrics().floatAscent();
 
@@ -203,10 +203,10 @@
     }
 
     if (!closestDistanceFragment)
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     int offset = closestDistanceBox->offsetForPositionInFragment(*closestDistanceFragment, absolutePoint.x() - closestDistancePosition, true);
-    return createVisiblePosition(offset + closestDistanceBox->start(), offset > 0 ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM);
+    return createPositionWithAffinity(offset + closestDistanceBox->start(), offset > 0 ? VP_UPSTREAM_IF_POSSIBLE : DOWNSTREAM);
 }
 
 void RenderSVGInlineText::updateScaledFont()
diff --git a/Source/core/rendering/svg/RenderSVGInlineText.h b/Source/core/rendering/svg/RenderSVGInlineText.h
index ec01d03..8ce8fd2 100644
--- a/Source/core/rendering/svg/RenderSVGInlineText.h
+++ b/Source/core/rendering/svg/RenderSVGInlineText.h
@@ -55,7 +55,7 @@
     virtual bool requiresLayer() const { return false; }
     virtual bool isSVGInlineText() const { return true; }
 
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
     virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0);
     virtual IntRect linesBoundingBox() const;
     virtual InlineTextBox* createTextBox();
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp
index 4f66d62..10f3d8f 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp
@@ -35,11 +35,11 @@
 #include "SVGNames.h"
 #include "core/rendering/svg/RenderSVGRoot.h"
 #include "core/rendering/svg/SVGResourcesCache.h"
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-RenderSVGModelObject::RenderSVGModelObject(SVGStyledElement* node)
+RenderSVGModelObject::RenderSVGModelObject(SVGElement* node)
     : RenderObject(node)
 {
 }
@@ -100,7 +100,7 @@
     SVGRenderSupport::findTreeRootObject(this)->computeLayerHitTestRects(rects);
 }
 
-void RenderSVGModelObject::addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const
+void RenderSVGModelObject::addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
 {
     // We don't walk into SVG trees at all - just report their container.
 }
@@ -140,10 +140,8 @@
 
     while (current && current->isSVGElement()) {
         SVGElement* currentElement = toSVGElement(current);
-        if (currentElement->isSVGStyledElement()) {
-            localTransform = currentElement->renderer()->localToParentTransform();
-            transform = localTransform.multiply(transform);
-        }
+        localTransform = currentElement->renderer()->localToParentTransform();
+        transform = localTransform.multiply(transform);
         // For getCTM() computation, stop at the nearest viewport element
         if (currentElement == stopAtElement)
             break;
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.h b/Source/core/rendering/svg/RenderSVGModelObject.h
index 2a616d8..0a36ff8 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.h
+++ b/Source/core/rendering/svg/RenderSVGModelObject.h
@@ -42,11 +42,11 @@
 // required by SVG renders need to be declared on RenderObject, but shared
 // logic can go in this class or in SVGRenderSupport.
 
-class SVGStyledElement;
+class SVGElement;
 
 class RenderSVGModelObject : public RenderObject {
 public:
-    explicit RenderSVGModelObject(SVGStyledElement*);
+    explicit RenderSVGModelObject(SVGElement*);
 
     virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
     virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect&, bool fixed = false) const OVERRIDE FINAL;
@@ -66,7 +66,7 @@
     virtual void computeLayerHitTestRects(LayerHitTestRects&) const OVERRIDE;
 
 protected:
-    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentCompositedLayer, const LayoutPoint& layerOffset) const OVERRIDE;
+    virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const OVERRIDE;
     virtual void willBeDestroyed();
 
 private:
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index a1875ff..92a96dd 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -226,7 +226,7 @@
     // Draw all clipPath children into a global mask.
     for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
         RenderObject* renderer = childNode->renderer();
-        if (!childNode->isSVGElement() || !toSVGElement(childNode)->isSVGStyledElement() || !renderer)
+        if (!childNode->isSVGElement() || !renderer)
             continue;
         if (renderer->needsLayout()) {
             frame()->view()->setPaintBehavior(oldBehavior);
@@ -268,7 +268,7 @@
     // This is a rough heuristic to appraise the clip size and doesn't consider clip on clip.
     for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
         RenderObject* renderer = childNode->renderer();
-        if (!childNode->isSVGElement() || !toSVGElement(childNode)->isSVGStyledElement() || !renderer)
+        if (!childNode->isSVGElement() || !renderer)
             continue;
         if (!renderer->isSVGShape() && !renderer->isSVGText() && !childNode->hasTagName(SVGNames::useTag))
             continue;
@@ -298,7 +298,7 @@
 
     for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
         RenderObject* renderer = childNode->renderer();
-        if (!childNode->isSVGElement() || !toSVGElement(childNode)->isSVGStyledElement() || !renderer)
+        if (!childNode->isSVGElement() || !renderer)
             continue;
         if (!renderer->isSVGShape() && !renderer->isSVGText() && !childNode->hasTagName(SVGNames::useTag))
             continue;
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
index f60b32b..33fb263 100644
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.cpp
@@ -37,7 +37,7 @@
     return node->document()->accessSVGExtensions();
 }
 
-RenderSVGResourceContainer::RenderSVGResourceContainer(SVGStyledElement* node)
+RenderSVGResourceContainer::RenderSVGResourceContainer(SVGElement* node)
     : RenderSVGHiddenContainer(node)
     , m_id(node->getIdAttribute())
     , m_registered(false)
diff --git a/Source/core/rendering/svg/RenderSVGResourceContainer.h b/Source/core/rendering/svg/RenderSVGResourceContainer.h
index 3bb912d..a2e4bd1 100644
--- a/Source/core/rendering/svg/RenderSVGResourceContainer.h
+++ b/Source/core/rendering/svg/RenderSVGResourceContainer.h
@@ -30,7 +30,7 @@
 class RenderSVGResourceContainer : public RenderSVGHiddenContainer,
                                    public RenderSVGResource {
 public:
-    RenderSVGResourceContainer(SVGStyledElement*);
+    RenderSVGResourceContainer(SVGElement*);
     virtual ~RenderSVGResourceContainer();
 
     virtual void layout();
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h b/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h
index 50b5f0d..c44b1e7 100644
--- a/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h
+++ b/Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h
@@ -35,7 +35,7 @@
 
 class RenderSVGResourceFilterPrimitive FINAL : public RenderSVGHiddenContainer {
 public:
-    explicit RenderSVGResourceFilterPrimitive(SVGStyledElement* filterPrimitiveElement)
+    explicit RenderSVGResourceFilterPrimitive(SVGElement* filterPrimitiveElement)
         : RenderSVGHiddenContainer(filterPrimitiveElement)
     {
     }
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
index 3a9cead..d6e5e60 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
@@ -29,7 +29,6 @@
 #include "core/rendering/svg/SVGRenderSupport.h"
 #include "core/svg/SVGElement.h"
 #include "core/svg/SVGMarkerElement.h"
-#include "core/svg/SVGStyledElement.h"
 
 namespace WebCore {
 
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.h b/Source/core/rendering/svg/RenderSVGResourceMarker.h
index 7e83c53..528f1f1 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.h
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.h
@@ -22,8 +22,8 @@
 
 #include "core/platform/graphics/FloatRect.h"
 #include "core/rendering/svg/RenderSVGResourceContainer.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGMarkerElement.h"
-#include "core/svg/SVGStyledElement.h"
 
 #include "wtf/HashSet.h"
 
diff --git a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
index b4790e4..ad9631d 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
@@ -91,7 +91,7 @@
     FloatRect repaintRect = object->repaintRectInLocalCoordinates();
 
     if (!maskerData->maskImage && !repaintRect.isEmpty()) {
-        SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
+        SVGMaskElement* maskElement = toSVGMaskElement(node());
         if (!maskElement)
             return false;
 
@@ -131,7 +131,7 @@
     // Draw the content into the ImageBuffer.
     for (Node* node = maskElement->firstChild(); node; node = node->nextSibling()) {
         RenderObject* renderer = node->renderer();
-        if (!node->isSVGElement() || !toSVGElement(node)->isSVGStyledElement() || !renderer)
+        if (!node->isSVGElement() || !renderer)
             continue;
         if (renderer->needsLayout())
             return false;
@@ -156,7 +156,7 @@
 {
     for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
         RenderObject* renderer = childNode->renderer();
-        if (!childNode->isSVGElement() || !toSVGElement(childNode)->isSVGStyledElement() || !renderer)
+        if (!childNode->isSVGElement() || !renderer)
             continue;
         RenderStyle* style = renderer->style();
         if (!style || style->display() == NONE || style->visibility() != VISIBLE)
@@ -167,7 +167,7 @@
 
 FloatRect RenderSVGResourceMasker::resourceBoundingBox(RenderObject* object)
 {
-    SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
+    SVGMaskElement* maskElement = toSVGMaskElement(node());
     ASSERT(maskElement);
 
     FloatRect objectBoundingBox = object->objectBoundingBox();
diff --git a/Source/core/rendering/svg/RenderSVGResourceMasker.h b/Source/core/rendering/svg/RenderSVGResourceMasker.h
index 66a34c6..c3f6272 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMasker.h
+++ b/Source/core/rendering/svg/RenderSVGResourceMasker.h
@@ -49,8 +49,8 @@
     virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
     virtual FloatRect resourceBoundingBox(RenderObject*);
 
-    SVGUnitTypes::SVGUnitType maskUnits() const { return static_cast<SVGMaskElement*>(node())->maskUnitsCurrentValue(); }
-    SVGUnitTypes::SVGUnitType maskContentUnits() const { return static_cast<SVGMaskElement*>(node())->maskContentUnitsCurrentValue(); }
+    SVGUnitTypes::SVGUnitType maskUnits() const { return toSVGMaskElement(node())->maskUnitsCurrentValue(); }
+    SVGUnitTypes::SVGUnitType maskContentUnits() const { return toSVGMaskElement(node())->maskContentUnitsCurrentValue(); }
 
     virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
     static RenderSVGResourceType s_resourceType;
diff --git a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
index ff4f87b..b8dfe39 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
@@ -261,7 +261,7 @@
 
     // Draw the content into the ImageBuffer.
     for (Node* node = attributes.patternContentElement()->firstChild(); node; node = node->nextSibling()) {
-        if (!node->isSVGElement() || !toSVGElement(node)->isSVGStyledElement() || !node->renderer())
+        if (!node->isSVGElement() || !node->renderer())
             continue;
         if (node->renderer()->needsLayout())
             return nullptr;
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 0537fbb..7f52741 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -38,14 +38,14 @@
 #include "core/rendering/svg/SVGRenderingContext.h"
 #include "core/rendering/svg/SVGResources.h"
 #include "core/rendering/svg/SVGResourcesCache.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGSVGElement.h"
-#include "core/svg/SVGStyledElement.h"
 
 using namespace std;
 
 namespace WebCore {
 
-RenderSVGRoot::RenderSVGRoot(SVGStyledElement* node)
+RenderSVGRoot::RenderSVGRoot(SVGElement* node)
     : RenderReplaced(node)
     , m_objectBoundingBoxValid(false)
     , m_isLayoutSizeChanged(false)
diff --git a/Source/core/rendering/svg/RenderSVGRoot.h b/Source/core/rendering/svg/RenderSVGRoot.h
index 1872904..ff1fbe3 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.h
+++ b/Source/core/rendering/svg/RenderSVGRoot.h
@@ -30,11 +30,11 @@
 namespace WebCore {
 
 class AffineTransform;
-class SVGStyledElement;
+class SVGElement;
 
 class RenderSVGRoot FINAL : public RenderReplaced {
 public:
-    explicit RenderSVGRoot(SVGStyledElement*);
+    explicit RenderSVGRoot(SVGElement*);
     virtual ~RenderSVGRoot();
 
     bool isEmbeddedThroughSVGImage() const;
diff --git a/Source/core/rendering/svg/RenderSVGText.cpp b/Source/core/rendering/svg/RenderSVGText.cpp
index 4f79c74..f3e17a0 100644
--- a/Source/core/rendering/svg/RenderSVGText.cpp
+++ b/Source/core/rendering/svg/RenderSVGText.cpp
@@ -28,7 +28,6 @@
 
 #include "core/rendering/svg/RenderSVGText.h"
 
-#include "core/editing/VisiblePosition.h"
 #include "core/platform/FloatConversion.h"
 #include "core/platform/graphics/FloatQuad.h"
 #include "core/platform/graphics/FontCache.h"
@@ -70,7 +69,7 @@
 
 bool RenderSVGText::isChildAllowed(RenderObject* child, RenderStyle*) const
 {
-    return child->isInline();
+    return child->isInline() && !SVGRenderSupport::isEmptySVGInlineText(child);
 }
 
 RenderSVGText* RenderSVGText::locateRenderSVGTextAncestor(RenderObject* start)
@@ -434,7 +433,7 @@
 
 RootInlineBox* RenderSVGText::createRootInlineBox()
 {
-    RootInlineBox* box = new (renderArena()) SVGRootInlineBox(this);
+    RootInlineBox* box = new SVGRootInlineBox(this);
     box->setHasVirtualLogicalHeight();
     return box;
 }
@@ -465,11 +464,11 @@
     return false;
 }
 
-VisiblePosition RenderSVGText::positionForPoint(const LayoutPoint& pointInContents)
+PositionWithAffinity RenderSVGText::positionForPoint(const LayoutPoint& pointInContents)
 {
     RootInlineBox* rootBox = firstRootBox();
     if (!rootBox)
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     ASSERT_WITH_SECURITY_IMPLICATION(rootBox->isSVGRootInlineBox());
     ASSERT(!rootBox->nextRootBox());
@@ -477,7 +476,7 @@
 
     InlineBox* closestBox = static_cast<SVGRootInlineBox*>(rootBox)->closestLeafChildForPosition(pointInContents);
     if (!closestBox)
-        return createVisiblePosition(0, DOWNSTREAM);
+        return createPositionWithAffinity(0, DOWNSTREAM);
 
     return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents.x(), closestBox->y()));
 }
diff --git a/Source/core/rendering/svg/RenderSVGText.h b/Source/core/rendering/svg/RenderSVGText.h
index ac8f498..a048138 100644
--- a/Source/core/rendering/svg/RenderSVGText.h
+++ b/Source/core/rendering/svg/RenderSVGText.h
@@ -63,7 +63,7 @@
     virtual void paint(PaintInfo&, const LayoutPoint&);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
     virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
-    virtual VisiblePosition positionForPoint(const LayoutPoint&);
+    virtual PositionWithAffinity positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
 
     virtual bool requiresLayer() const { return false; }
     virtual void layout();
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
index 67c82e5..3b79919 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
@@ -32,7 +32,7 @@
 
 namespace WebCore {
 
-RenderSVGViewportContainer::RenderSVGViewportContainer(SVGStyledElement* node)
+RenderSVGViewportContainer::RenderSVGViewportContainer(SVGElement* node)
     : RenderSVGContainer(node)
     , m_didTransformToRootUpdate(false)
     , m_isLayoutSizeChanged(false)
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.h b/Source/core/rendering/svg/RenderSVGViewportContainer.h
index 3416ede..c01e7a5 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.h
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.h
@@ -31,7 +31,7 @@
 // thus we inherit from RenderSVGContainer instead of RenderSVGTransformableContainer
 class RenderSVGViewportContainer FINAL : public RenderSVGContainer {
 public:
-    explicit RenderSVGViewportContainer(SVGStyledElement*);
+    explicit RenderSVGViewportContainer(SVGElement*);
     FloatRect viewport() const { return m_viewport; }
 
     bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; }
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index cb54b01..8731b0c 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -432,6 +432,10 @@
     RenderText* text = textRenderer();
     ASSERT(text);
 
+    // FIXME(crbug.com/264211): This should not be necessary but can occur if we
+    //                          layout during layout. Remove this when 264211 is fixed.
+    RELEASE_ASSERT(!text->needsLayout());
+
     TextRun run(static_cast<const LChar*>(0) // characters, will be set below if non-zero.
                 , 0 // length, will be set below if non-zero.
                 , 0 // xPos, only relevant with allowTabs=true
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
index 3c5ad62..8d4a272 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
@@ -29,6 +29,7 @@
 #include "core/platform/graphics/transforms/TransformState.h"
 #include "core/rendering/RenderGeometryMap.h"
 #include "core/rendering/RenderLayer.h"
+#include "core/rendering/svg/RenderSVGInlineText.h"
 #include "core/rendering/svg/RenderSVGResourceClipper.h"
 #include "core/rendering/svg/RenderSVGResourceFilter.h"
 #include "core/rendering/svg/RenderSVGResourceMasker.h"
@@ -37,7 +38,7 @@
 #include "core/rendering/svg/RenderSVGViewportContainer.h"
 #include "core/rendering/svg/SVGResources.h"
 #include "core/rendering/svg/SVGResourcesCache.h"
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 #include "wtf/UnusedParam.h"
 
 namespace WebCore {
@@ -225,7 +226,7 @@
         if (layoutSizeChanged) {
             // When selfNeedsLayout is false and the layout size changed, we have to check whether this child uses relative lengths
             if (SVGElement* element = child->node()->isSVGElement() ? toSVGElement(child->node()) : 0) {
-                if (element->isSVGStyledElement() && toSVGStyledElement(element)->hasRelativeLengths()) {
+                if (element->hasRelativeLengths()) {
                     // When the layout size changed and when using relative values tell the RenderSVGShape to update its shape object
                     if (child->isSVGShape())
                         toRenderSVGShape(child)->setNeedsShapeUpdate();
@@ -388,4 +389,12 @@
     strokeData->setLineDash(dashArray, svgStyle->strokeDashOffset().value(lengthContext));
 }
 
+bool SVGRenderSupport::isEmptySVGInlineText(const RenderObject* object)
+{
+    // RenderSVGInlineText performs whitespace filtering in order to support xml:space
+    // (http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs), and can end up with an empty string
+    // even when its original constructor argument is non-empty.
+    return object->isSVGInlineText() && toRenderSVGInlineText(object)->hasEmptyText();
+}
+
 }
diff --git a/Source/core/rendering/svg/SVGRenderSupport.h b/Source/core/rendering/svg/SVGRenderSupport.h
index ee15e3b..285e447 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.h
+++ b/Source/core/rendering/svg/SVGRenderSupport.h
@@ -78,6 +78,9 @@
     // FIXME: These methods do not belong here.
     static const RenderSVGRoot* findTreeRootObject(const RenderObject*);
 
+    // Helper method for determining whether an RenderSVGInlineText object has zero length text.
+    static bool isEmptySVGInlineText(const RenderObject*);
+
 private:
     // This class is not constructable.
     SVGRenderSupport();
diff --git a/Source/core/rendering/svg/SVGResources.cpp b/Source/core/rendering/svg/SVGResources.cpp
index 6acd132..3fd84a8 100644
--- a/Source/core/rendering/svg/SVGResources.cpp
+++ b/Source/core/rendering/svg/SVGResources.cpp
@@ -176,8 +176,7 @@
 static inline void registerPendingResource(SVGDocumentExtensions* extensions, const AtomicString& id, SVGElement* element)
 {
     ASSERT(element);
-    ASSERT_WITH_SECURITY_IMPLICATION(element->isSVGStyledElement());
-    extensions->addPendingResource(id, toSVGStyledElement(element));
+    extensions->addPendingResource(id, element);
 }
 
 bool SVGResources::buildResources(const RenderObject* object, const SVGRenderStyle* style)
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
index 2fca5c2..0ade353 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
@@ -268,12 +268,12 @@
         fprintf(stderr, "        textBox properties, start=%i, len=%i, box direction=%i\n", textBox->start(), textBox->len(), textBox->direction());
         fprintf(stderr, "   textRenderer properties, textLength=%i\n", textBox->textRenderer()->textLength());
 
-        const UChar* characters = textBox->textRenderer()->characters();
+        String characters = textBox->textRenderer()->text();
 
         unsigned fragmentCount = fragments.size();
         for (unsigned i = 0; i < fragmentCount; ++i) {
             SVGTextFragment& fragment = fragments.at(i);
-            String fragmentString(characters + fragment.characterOffset, fragment.length);
+            String fragmentString = characters.substring(fragment.characterOffset, fragment.length);
             fprintf(stderr, "    -> Fragment %i, x=%lf, y=%lf, width=%lf, height=%lf, characterOffset=%i, length=%i, characters='%s'\n"
                           , i, fragment.x, fragment.y, fragment.width, fragment.height, fragment.characterOffset, fragment.length, fragmentString.utf8().data());
         }
@@ -389,9 +389,6 @@
     unsigned boxStart = textBox->start();
     unsigned boxLength = textBox->len();
 
-    if (m_visualMetricsListOffset == textMetricsSize)
-        return false;
-
     while (m_visualMetricsListOffset < textMetricsSize) {
         // Advance to text box start location.
         if (m_visualCharacterOffset < boxStart) {
diff --git a/Source/core/scripts/StaticString.pm b/Source/core/scripts/StaticString.pm
index 61968fb..a404d70 100644
--- a/Source/core/scripts/StaticString.pm
+++ b/Source/core/scripts/StaticString.pm
@@ -26,7 +26,7 @@
 use strict;
 use Hasher;
 
-sub GenerateStrings($)
+sub GenerateStringImpls($)
 {
     my $stringsRef = shift;
     my %strings = %$stringsRef;
@@ -36,52 +36,13 @@
     push(@result, "\n");
 
     while ( my ($name, $value) = each %strings ) {
-        push(@result, "static const LChar ${name}String8[] = \"${value}\";\n");
-    }
-
-    push(@result, "\n");
-
-    while ( my ($name, $value) = each %strings ) {
         my $length = length($value);
         my $hash = Hasher::GenerateHashValue($value);
-        push(@result, <<END);
-static StringImpl::StaticASCIILiteral ${name}Data = {
-    ${name}String8,
-    StringImpl::StaticASCIILiteral::s_initialRefCount,
-    $length,
-    StringImpl::StaticASCIILiteral::s_initialFlags | (${hash} << StringImpl::StaticASCIILiteral::s_hashShift)
-};
-END
+        push(@result, "    StringImpl* ${name}Impl = StringImpl::createStatic(\"$value\", $length, $hash);\n");
     }
 
     push(@result, "\n");
 
-    while ( my ($name, $value) = each %strings ) {
-        push(@result, "static StringImpl* ${name}Impl = reinterpret_cast<StringImpl*>(&${name}Data);\n");
-    }
-
-    push(@result, "\n");
-
-    return join "", @result;
-}
-
-sub GenerateStringAsserts($)
-{
-    my $stringsRef = shift;
-    my %strings = %$stringsRef;
-
-    my @result = ();
-
-    push(@result, "#ifndef NDEBUG\n");
-
-    while ( my ($name, $value) = each %strings ) {
-        push(@result, "    ${name}Impl->assertHashIsCorrect();\n");
-    }
-
-    push(@result, "#endif // NDEBUG\n");
-
-    push(@result, "\n");
-
     return join "", @result;
 }
 
diff --git a/Source/core/scripts/make_names.pl b/Source/core/scripts/make_names.pl
index 276e45f..d1285c8 100755
--- a/Source/core/scripts/make_names.pl
+++ b/Source/core/scripts/make_names.pl
@@ -115,6 +115,7 @@
 die "You must specify a namespaceURI (e.g. http://www.w3.org/2000/svg)" unless $parameters{namespaceURI};
 
 $parameters{namespacePrefix} = $parameters{namespace} unless $parameters{namespacePrefix};
+$parameters{fallbackJSInterfaceName} = $parameters{fallbackInterfaceName} unless $parameters{fallbackJSInterfaceName};
 
 my $namesBasePath = "$outputDir/$parameters{namespace}Names";
 my $factoryBasePath = "$outputDir/$parameters{namespace}ElementFactory";
@@ -159,7 +160,8 @@
         'guardFactoryWith' => '',
         'tagsNullNamespace' => 0,
         'attrsNullNamespace' => 0,
-        'fallbackInterfaceName' => ''
+        'fallbackInterfaceName' => '',
+        'fallbackJSInterfaceName' => ''
     );
 }
 
@@ -619,8 +621,6 @@
 
     print F "DEFINE_GLOBAL(AtomicString, ${lowerNamespace}NamespaceURI)\n\n";
 
-    print F StaticString::GenerateStrings(\%allStrings);
-
     if (keys %allTags) {
         print F "// Tags\n";
         for my $name (sort keys %allTags) {
@@ -659,7 +659,7 @@
     print(F "    // Namespace\n");
     print(F "    new ((void*)&${lowerNamespace}NamespaceURI) AtomicString(${lowerNamespace}NS);\n");
     print(F "\n");
-    print F StaticString::GenerateStringAsserts(\%allStrings);
+    print F StaticString::GenerateStringImpls(\%allStrings);
 
     if (keys %allTags) {
         my $tagsNamespace = $parameters{tagsNullNamespace} ? "nullAtom" : "${lowerNamespace}NS";
@@ -690,7 +690,7 @@
 
         print F "#include \"V8${JSInterfaceName}.h\"\n";
     }
-    print F "#include \"V8$parameters{fallbackInterfaceName}.h\"\n";
+    print F "#include \"V8$parameters{fallbackJSInterfaceName}.h\"\n";
 }
 
 sub printElementIncludes
@@ -966,7 +966,7 @@
     for my $tagName (sort keys %enabledTags) {
         # Avoid defining the same wrapper method twice.
         my $JSInterfaceName = $enabledTags{$tagName}{JSInterfaceName};
-        next if defined($tagsSeen{$JSInterfaceName}) || (usesDefaultJSWrapper($tagName) && ($parameters{fallbackInterfaceName} eq $parameters{namespace} . "Element"));
+        next if defined($tagsSeen{$JSInterfaceName}) || (usesDefaultJSWrapper($tagName) && ($parameters{fallbackJSInterfaceName} eq $parameters{namespace} . "Element"));
         $tagsSeen{$JSInterfaceName} = 1;
 
         my $conditional = $enabledTags{$tagName}{conditional};
@@ -1096,7 +1096,7 @@
 
     for my $tag (sort keys %enabledTags) {
         # Do not add the name to the map if it does not have a JS wrapper constructor or uses the default wrapper.
-        next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallbackInterfaceName} eq $parameters{namespace} . "Element"));
+        next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallbackJSInterfaceName} eq $parameters{namespace} . "Element"));
 
         my $conditional = $enabledTags{$tag}{conditional};
         if ($conditional) {
@@ -1203,7 +1203,7 @@
 
     print F <<END
 #include <V8$parameters{namespace}Element.h>
-#include <V8$parameters{fallbackInterfaceName}.h>
+#include <V8$parameters{fallbackJSInterfaceName}.h>
 #include <v8.h>
 
 namespace WebCore {
@@ -1216,9 +1216,9 @@
     {
         return V8$parameters{namespace}Element::createWrapper(element, creationContext, isolate);
     }
-    inline v8::Handle<v8::Object> createV8$parameters{namespace}FallbackWrapper($parameters{fallbackInterfaceName}* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
+    inline v8::Handle<v8::Object> createV8$parameters{namespace}FallbackWrapper($parameters{fallbackJSInterfaceName}* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
     {
-        return V8$parameters{fallbackInterfaceName}::createWrapper(element, creationContext, isolate);
+        return V8$parameters{fallbackJSInterfaceName}::createWrapper(element, creationContext, isolate);
     }
 }
 END
@@ -1263,8 +1263,6 @@
     printLicenseHeader($F);
     printCppHead($F, $basePrefix, $baseName, "WTF");
 
-    print F StaticString::GenerateStrings(\%parameters);
-
     while ( my ($name, $identifier) = each %parameters ) {
         print F "DEFINE_GLOBAL(AtomicString, $name)\n";
     }
@@ -1272,7 +1270,7 @@
     printInit($F, 0);
 
     print F "\n";
-    print F StaticString::GenerateStringAsserts(\%parameters);
+    print F StaticString::GenerateStringImpls(\%parameters);
 
     while ( my ($name, $identifier) = each %parameters ) {
         print F "    new ((void*)&$name) AtomicString(${name}Impl);\n";
@@ -1282,4 +1280,3 @@
     close F;
     exit 0;
 }
-
diff --git a/Source/core/scripts/make_style_builder.py b/Source/core/scripts/make_style_builder.py
index bdad99e..e6cf16b 100755
--- a/Source/core/scripts/make_style_builder.py
+++ b/Source/core/scripts/make_style_builder.py
@@ -39,6 +39,7 @@
 
     valid_values = {
         'apply_type': ['default', 'length'],
+        'svg': [True, False],
         'use_none': [True, False],
         'use_intrinsic': [True, False],
         'use_auto': [True, False],
@@ -52,6 +53,7 @@
         'apply_type': 'default',
         'name_for_methods': None,
         'use_handlers_for': None,
+        'svg': False,
 # These depend on property name by default
         'type_name': None,
         'getter': None,
diff --git a/Source/core/scripts/templates/StyleBuilder.cpp.tmpl b/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
index 64b840d..0d25729 100644
--- a/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
+++ b/Source/core/scripts/templates/StyleBuilder.cpp.tmpl
@@ -6,13 +6,17 @@
 
 #include "StyleBuilderFunctions.h"
 #include "core/css/CSSPrimitiveValueMappings.h"
-#include "core/css/resolver/StyleResolver.h"
+#include "core/css/resolver/StyleResolverState.h"
 
 // FIXME: currently we're just generating a switch statement, but we should
 //   test other variations for performance once we have more properties here.
 
-{%- macro set_value(property) -%}
+{%- macro set_value(property) %}
+{%- if property.svg -%}
+    state.style()->accessSVGStyle()->{{property.setter}}
+{%- else -%}
     state.style()->{{property.setter}}
+{%- endif %}
 {%- endmacro %}
 
 namespace WebCore {
@@ -72,21 +76,29 @@
 {%- set apply_type = property.apply_type %}
 
 {%- if not property.custom_initial %}
-void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolverState& state)
 {
+{%- if property.svg %}
+    {{ set_value(property) }}(SVGRenderStyle::{{property.initial}}());
+{%- else %}
     {{ set_value(property) }}(RenderStyle::{{property.initial}}());
+{%- endif %}
 }
 {% endif %}
 
 {%- if not property.custom_inherit %}
-void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolverState& state)
 {
+{%- if property.svg %}
+    {{ set_value(property) }}(state.parentStyle()->svgStyle()->{{property.getter}}());
+{%- else %}
     {{ set_value(property) }}(state.parentStyle()->{{property.getter}}());
+{%- endif %}
 }
 {% endif %}
 
 {%- if not property.custom_value %}
-void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, CSSValue* value)
 {
 {%- if apply_type == "length" %}
     {{ apply_value_length(property) }}
@@ -99,7 +111,7 @@
 {%- endcall %}
 {%- endfor %}
 
-bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit) {
+bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit) {
     switch(property) {
 {%- for property_id, property in properties.items() %}
 {%- set used_property = properties[property.use_handlers_for] or property %}
@@ -107,11 +119,11 @@
 {%- call wrap_with_condition(used_property.condition) %}
     case {{ property_id }}:
         if (isInitial)
-            StyleBuilderFunctions::applyInitial{{ used_property_id }}(styleResolver, state);
+            StyleBuilderFunctions::applyInitial{{ used_property_id }}(state);
         else if (isInherit)
-            StyleBuilderFunctions::applyInherit{{ used_property_id }}(styleResolver, state);
+            StyleBuilderFunctions::applyInherit{{ used_property_id }}(state);
         else
-            StyleBuilderFunctions::applyValue{{ used_property_id }}(styleResolver, state, value);
+            StyleBuilderFunctions::applyValue{{ used_property_id }}(state, value);
         return true;
 {%- endcall %}
 {% endfor %}
diff --git a/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index b57437e..861e733 100644
--- a/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/Source/core/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -15,22 +15,30 @@
 #include "core/css/BasicShapeFunctions.h"
 #include "core/css/CSSPrimitiveValueMappings.h"
 #include "core/css/Pair.h"
-#include "core/css/resolver/StyleResolver.h"
+#include "core/css/resolver/StyleResolverState.h"
+#include "core/platform/animation/CSSAnimationDataList.h"
+
 
 {%- macro declare_initial_function(property_id) -%}
-void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolverState& state)
 {%- endmacro %}
 
 {%- macro declare_inherit_function(property_id) -%}
-void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state)
+void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolverState& state)
 {%- endmacro %}
 
 {%- macro declare_value_function(property_id) -%}
-void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolver* styleResolver, StyleResolverState& state, CSSValue* value)
+void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, CSSValue* value)
 {%- endmacro %}
 
-{%- macro set_value(property) -%}
+// FIXME: This is duplicated in StyleBuilder.cpp.tmpl, but we'll move the
+// function definitions there over to here later.
+{%- macro set_value(property) %}
+{%- if property.svg -%}
+    state.style()->accessSVGStyle()->{{property.setter}}
+{%- else -%}
     state.style()->{{property.setter}}
+{%- endif -%}
 {%- endmacro %}
 
 namespace WebCore {
@@ -301,7 +309,7 @@
 
 {%- if inherit_color %}
     if (primitiveValue->getValueID() == CSSValueCurrentcolor) {
-        applyInherit{{property_id}}(styleResolver, state);
+        applyInherit{{property_id}}(state);
         return;
     }
 {%- endif %}
@@ -574,9 +582,6 @@
 }
 {%- endmacro %}
 
-{{ apply_value_number("CSSPropertyWebkitHyphenateLimitAfter", "CSSValueAuto") }}
-{{ apply_value_number("CSSPropertyWebkitHyphenateLimitBefore", "CSSValueAuto") }}
-{{ apply_value_number("CSSPropertyWebkitHyphenateLimitLines", "CSSValueNoLimit") }}
 {{ apply_value_number("CSSPropertyWebkitMarqueeRepetition", "CSSValueInfinite") }}
 
 {%- macro apply_value_shape(property_id) %}
diff --git a/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl b/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl
index c89324c..f3e1109 100644
--- a/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl
+++ b/Source/core/scripts/templates/StyleBuilderFunctions.h.tmpl
@@ -4,7 +4,6 @@
 namespace WebCore {
 
 class CSSValue;
-class StyleResolver;
 class StyleResolverState;
 
 class StyleBuilderFunctions {
@@ -12,9 +11,9 @@
 
 {%- for property_id, property in properties.items() if not property.use_handlers_for %}
 {% call wrap_with_condition(property.condition) %}
-    static void applyInitial{{property_id}}(StyleResolver*, StyleResolverState&);
-    static void applyInherit{{property_id}}(StyleResolver*, StyleResolverState&);
-    static void applyValue{{property_id}}(StyleResolver*, StyleResolverState&, CSSValue*);
+    static void applyInitial{{property_id}}(StyleResolverState&);
+    static void applyInherit{{property_id}}(StyleResolverState&);
+    static void applyValue{{property_id}}(StyleResolverState&, CSSValue*);
 {%- endcall %}
 {%- endfor %}
 
diff --git a/Source/core/svg/ColorDistance.cpp b/Source/core/svg/ColorDistance.cpp
index 561eb4e..df61eee 100644
--- a/Source/core/svg/ColorDistance.cpp
+++ b/Source/core/svg/ColorDistance.cpp
@@ -18,11 +18,10 @@
  */
 
 #include "config.h"
-
 #include "core/svg/ColorDistance.h"
 
 #include "core/platform/graphics/Color.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAElement.cpp b/Source/core/svg/SVGAElement.cpp
index 04ae952..23b39ce 100644
--- a/Source/core/svg/SVGAElement.cpp
+++ b/Source/core/svg/SVGAElement.cpp
@@ -88,7 +88,7 @@
         return title;
 
     // Otherwise, use the title of this element.
-    return SVGStyledElement::title();
+    return SVGElement::title();
 }
 
 bool SVGAElement::isSupportedAttribute(const QualifiedName& attrName)
@@ -145,9 +145,9 @@
 RenderObject* SVGAElement::createRenderer(RenderStyle*)
 {
     if (parentNode() && parentNode()->isSVGElement() && toSVGElement(parentNode())->isTextContent())
-        return new (document()->renderArena()) RenderSVGInline(this);
+        return new RenderSVGInline(this);
 
-    return new (document()->renderArena()) RenderSVGTransformableContainer(this);
+    return new RenderSVGTransformableContainer(this);
 }
 
 void SVGAElement::defaultEventHandler(Event* event)
diff --git a/Source/core/svg/SVGAltGlyphDefElement.h b/Source/core/svg/SVGAltGlyphDefElement.h
index 89146b2..8e083fc 100644
--- a/Source/core/svg/SVGAltGlyphDefElement.h
+++ b/Source/core/svg/SVGAltGlyphDefElement.h
@@ -22,7 +22,7 @@
 
 #if ENABLE(SVG_FONTS)
 #include "core/svg/SVGElement.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
@@ -34,6 +34,8 @@
 
 private:
     SVGAltGlyphDefElement(const QualifiedName&, Document*);
+
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 }
diff --git a/Source/core/svg/SVGAltGlyphElement.cpp b/Source/core/svg/SVGAltGlyphElement.cpp
index 87d2e6a..0f4132d 100644
--- a/Source/core/svg/SVGAltGlyphElement.cpp
+++ b/Source/core/svg/SVGAltGlyphElement.cpp
@@ -84,7 +84,7 @@
 
 RenderObject* SVGAltGlyphElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGTSpan(this);
+    return new RenderSVGTSpan(this);
 }
 
 bool SVGAltGlyphElement::hasValidGlyphElements(Vector<String>& glyphNames) const
diff --git a/Source/core/svg/SVGAltGlyphElement.h b/Source/core/svg/SVGAltGlyphElement.h
index 5febf29..6ed5525 100644
--- a/Source/core/svg/SVGAltGlyphElement.h
+++ b/Source/core/svg/SVGAltGlyphElement.h
@@ -25,7 +25,7 @@
 #if ENABLE(SVG_FONTS)
 #include "core/svg/SVGTextPositioningElement.h"
 #include "core/svg/SVGURIReference.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAltGlyphItemElement.h b/Source/core/svg/SVGAltGlyphItemElement.h
index 25ff815..8d22813 100644
--- a/Source/core/svg/SVGAltGlyphItemElement.h
+++ b/Source/core/svg/SVGAltGlyphItemElement.h
@@ -22,7 +22,7 @@
 
 #if ENABLE(SVG_FONTS)
 #include "core/svg/SVGElement.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
@@ -34,6 +34,8 @@
 
 private:
     SVGAltGlyphItemElement(const QualifiedName&, Document*);
+
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 }
diff --git a/Source/core/svg/SVGAngle.cpp b/Source/core/svg/SVGAngle.cpp
index 6bd37ea..e88f600 100644
--- a/Source/core/svg/SVGAngle.cpp
+++ b/Source/core/svg/SVGAngle.cpp
@@ -20,13 +20,12 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGAngle.h"
 
 #include "core/dom/ExceptionCode.h"
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/MathExtras.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/MathExtras.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAnimateElement.h b/Source/core/svg/SVGAnimateElement.h
index cd79857..d987374 100644
--- a/Source/core/svg/SVGAnimateElement.h
+++ b/Source/core/svg/SVGAnimateElement.h
@@ -24,7 +24,7 @@
 #define SVGAnimateElement_h
 
 #include "core/svg/SVGAnimationElement.h"
-#include <wtf/OwnPtr.h>
+#include "wtf/OwnPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAnimateMotionElement.cpp b/Source/core/svg/SVGAnimateMotionElement.cpp
index 57f289a..f8a929b 100644
--- a/Source/core/svg/SVGAnimateMotionElement.cpp
+++ b/Source/core/svg/SVGAnimateMotionElement.cpp
@@ -33,8 +33,8 @@
 #include "core/svg/SVGParserUtilities.h"
 #include "core/svg/SVGPathElement.h"
 #include "core/svg/SVGPathUtilities.h"
-#include <wtf/MathExtras.h>
-#include <wtf/StdLibExtras.h>
+#include "wtf/MathExtras.h"
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
@@ -137,7 +137,7 @@
 
     for (Node* child = firstChild(); child; child = child->nextSibling()) {
         if (child->hasTagName(SVGNames::mpathTag)) {
-            SVGMPathElement* mPath = static_cast<SVGMPathElement*>(child);
+            SVGMPathElement* mPath = toSVGMPathElement(child);
             SVGPathElement* pathElement = mPath->pathElement();
             if (pathElement) {
                 updatePathFromGraphicsElement(pathElement, m_animationPath);
@@ -200,8 +200,17 @@
 {
     if (!targetElement)
         return;
-    if (AffineTransform* transform = targetElement->supplementalTransform())
-        transform->makeIdentity();
+
+    AffineTransform* transform = targetElement->supplementalTransform();
+    if (!transform)
+        return;
+
+    transform->makeIdentity();
+
+    if (RenderObject* targetRenderer = targetElement->renderer()) {
+        targetRenderer->setNeedsTransformUpdate();
+        RenderSVGResource::markForLayoutAndParentResourceInvalidation(targetRenderer);
+    }
 }
 
 bool SVGAnimateMotionElement::calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString)
diff --git a/Source/core/svg/SVGAnimatedInteger.cpp b/Source/core/svg/SVGAnimatedInteger.cpp
index 0f3356a..ff7ccee 100644
--- a/Source/core/svg/SVGAnimatedInteger.cpp
+++ b/Source/core/svg/SVGAnimatedInteger.cpp
@@ -18,12 +18,11 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGAnimatedInteger.h"
 
 #include "core/svg/SVGAnimateElement.h"
 #include "core/svg/SVGAnimatedNumber.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAnimatedType.cpp b/Source/core/svg/SVGAnimatedType.cpp
index 8fc2c73..8816e7a 100644
--- a/Source/core/svg/SVGAnimatedType.cpp
+++ b/Source/core/svg/SVGAnimatedType.cpp
@@ -250,7 +250,7 @@
         ASSERT(m_data.string);
         return *m_data.string;
 
-    // These types don't appear in the table in SVGStyledElement::cssPropertyToTypeMap() and thus don't need valueAsString() support.
+    // These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need valueAsString() support.
     case AnimatedAngle:
     case AnimatedBoolean:
     case AnimatedEnumeration:
@@ -301,7 +301,7 @@
         *m_data.string = value;
         break;
 
-    // These types don't appear in the table in SVGStyledElement::cssPropertyToTypeMap() and thus don't need setValueAsString() support.
+    // These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need setValueAsString() support.
     case AnimatedAngle:
     case AnimatedBoolean:
     case AnimatedEnumeration:
diff --git a/Source/core/svg/SVGAnimatedTypeAnimator.h b/Source/core/svg/SVGAnimatedTypeAnimator.h
index 0c7e880..fd6c4e3 100644
--- a/Source/core/svg/SVGAnimatedTypeAnimator.h
+++ b/Source/core/svg/SVGAnimatedTypeAnimator.h
@@ -24,7 +24,7 @@
 #include "core/svg/SVGAnimatedType.h"
 #include "core/svg/SVGElementInstance.h"
 #include "core/svg/properties/SVGAnimatedProperty.h"
-#include <wtf/PassOwnPtr.h>
+#include "wtf/PassOwnPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGAnimationElement.cpp b/Source/core/svg/SVGAnimationElement.cpp
index 03d80dd..6e7f664 100644
--- a/Source/core/svg/SVGAnimationElement.cpp
+++ b/Source/core/svg/SVGAnimationElement.cpp
@@ -33,9 +33,9 @@
 #include "core/page/UseCounter.h"
 #include "core/platform/FloatConversion.h"
 #include "core/svg/SVGAnimateElement.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGParserUtilities.h"
-#include "core/svg/SVGStyledElement.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
 
 namespace WebCore {
 
@@ -362,10 +362,8 @@
 bool SVGAnimationElement::isTargetAttributeCSSProperty(SVGElement* targetElement, const QualifiedName& attributeName)
 {
     ASSERT(targetElement);
-    if (!targetElement->isSVGStyledElement())
-        return false;
 
-    return SVGStyledElement::isAnimatableCSSProperty(attributeName);
+    return SVGElement::isAnimatableCSSProperty(attributeName);
 }
 
 SVGAnimationElement::ShouldApplyAnimation SVGAnimationElement::shouldApplyAnimation(SVGElement* targetElement, const QualifiedName& attributeName)
@@ -643,7 +641,6 @@
 void SVGAnimationElement::computeCSSPropertyValue(SVGElement* element, CSSPropertyID id, String& value)
 {
     ASSERT(element);
-    ASSERT(element->isSVGStyledElement());
 
     // Don't include any properties resulting from CSS Transitions/Animations or SMIL animations, as we want to retrieve the "base value".
     element->setUseOverrideComputedStyle(true);
@@ -662,8 +659,6 @@
         return;
 
     SVGElement* svgParent = toSVGElement(parent);
-    if (!svgParent->isSVGStyledElement())
-        return;
     computeCSSPropertyValue(svgParent, cssPropertyID(attributeName.localName()), value);
 }
 
@@ -672,9 +667,9 @@
     ASSERT(targetElement);
     DEFINE_STATIC_LOCAL(const AtomicString, inherit, ("inherit", AtomicString::ConstructFromLiteral));
 
-    if (value.isEmpty() || value != inherit || !targetElement->isSVGStyledElement())
+    if (value.isEmpty() || value != inherit)
         return false;
-    return SVGStyledElement::isAnimatableCSSProperty(attributeName);
+    return SVGElement::isAnimatableCSSProperty(attributeName);
 }
 
 void SVGAnimationElement::determinePropertyValueTypes(const String& from, const String& to)
diff --git a/Source/core/svg/SVGCircleElement.cpp b/Source/core/svg/SVGCircleElement.cpp
index 3039498..42cbb92 100644
--- a/Source/core/svg/SVGCircleElement.cpp
+++ b/Source/core/svg/SVGCircleElement.cpp
@@ -136,7 +136,7 @@
 
 RenderObject* SVGCircleElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGEllipse(this);
+    return new RenderSVGEllipse(this);
 }
 
 }
diff --git a/Source/core/svg/SVGClipPathElement.cpp b/Source/core/svg/SVGClipPathElement.cpp
index db973a9..efea4ee 100644
--- a/Source/core/svg/SVGClipPathElement.cpp
+++ b/Source/core/svg/SVGClipPathElement.cpp
@@ -109,7 +109,7 @@
 
 RenderObject* SVGClipPathElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceClipper(this);
+    return new RenderSVGResourceClipper(this);
 }
 
 }
diff --git a/Source/core/svg/SVGColor.h b/Source/core/svg/SVGColor.h
index 8218ff2..fca9d76 100644
--- a/Source/core/svg/SVGColor.h
+++ b/Source/core/svg/SVGColor.h
@@ -24,7 +24,7 @@
 
 #include "core/css/CSSValue.h"
 #include "core/platform/graphics/Color.h"
-#include <wtf/PassRefPtr.h>
+#include "wtf/PassRefPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGComponentTransferFunctionElement.h b/Source/core/svg/SVGComponentTransferFunctionElement.h
index 6ec3a09..2ffaeb7 100644
--- a/Source/core/svg/SVGComponentTransferFunctionElement.h
+++ b/Source/core/svg/SVGComponentTransferFunctionElement.h
@@ -80,6 +80,8 @@
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&);
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
 private:
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGComponentTransferFunctionElement)
         DECLARE_ANIMATED_ENUMERATION(Type, type, ComponentTransferType)
diff --git a/Source/core/svg/SVGCursorElement.h b/Source/core/svg/SVGCursorElement.h
index 57501ba..825b940 100644
--- a/Source/core/svg/SVGCursorElement.h
+++ b/Source/core/svg/SVGCursorElement.h
@@ -55,6 +55,8 @@
 
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement)
         DECLARE_ANIMATED_LENGTH(X, x)
         DECLARE_ANIMATED_LENGTH(Y, y)
diff --git a/Source/core/svg/SVGDefsElement.cpp b/Source/core/svg/SVGDefsElement.cpp
index 5992687..222a28c 100644
--- a/Source/core/svg/SVGDefsElement.cpp
+++ b/Source/core/svg/SVGDefsElement.cpp
@@ -55,7 +55,7 @@
 
 RenderObject* SVGDefsElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGHiddenContainer(this);
+    return new RenderSVGHiddenContainer(this);
 }
 
 }
diff --git a/Source/core/svg/SVGDescElement.cpp b/Source/core/svg/SVGDescElement.cpp
index d343d50..6da4709 100644
--- a/Source/core/svg/SVGDescElement.cpp
+++ b/Source/core/svg/SVGDescElement.cpp
@@ -25,7 +25,7 @@
 namespace WebCore {
 
 inline SVGDescElement::SVGDescElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::descTag));
     ScriptWrappable::init(this);
diff --git a/Source/core/svg/SVGDescElement.h b/Source/core/svg/SVGDescElement.h
index 3585247..e22fcd7 100644
--- a/Source/core/svg/SVGDescElement.h
+++ b/Source/core/svg/SVGDescElement.h
@@ -21,11 +21,11 @@
 #ifndef SVGDescElement_h
 #define SVGDescElement_h
 
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-class SVGDescElement FINAL : public SVGStyledElement {
+class SVGDescElement FINAL : public SVGElement {
 public:
     static PassRefPtr<SVGDescElement> create(const QualifiedName&, Document*);
 
diff --git a/Source/core/svg/SVGDescElement.idl b/Source/core/svg/SVGDescElement.idl
index 70a5033..701fbe3 100644
--- a/Source/core/svg/SVGDescElement.idl
+++ b/Source/core/svg/SVGDescElement.idl
@@ -23,6 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGDescElement : SVGStyledElement {
+interface SVGDescElement : SVGElement {
 };
 
diff --git a/Source/core/svg/SVGDocumentExtensions.cpp b/Source/core/svg/SVGDocumentExtensions.cpp
index 4a71068..6df85d2 100644
--- a/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/Source/core/svg/SVGDocumentExtensions.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGDocumentExtensions.h"
 
 #include "XLinkNames.h"
@@ -29,7 +28,7 @@
 #include "core/svg/SVGElement.h"
 #include "core/svg/SVGSVGElement.h"
 #include "core/svg/animation/SMILTimeContainer.h"
-#include <wtf/text/AtomicString.h>
+#include "wtf/text/AtomicString.h"
 
 namespace WebCore {
 
@@ -140,6 +139,7 @@
 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element* element)
 {
     ASSERT(element);
+    ASSERT(element->inDocument());
 
     if (id.isEmpty())
         return;
diff --git a/Source/core/svg/SVGDocumentExtensions.h b/Source/core/svg/SVGDocumentExtensions.h
index 5dd26fe..1223dd3 100644
--- a/Source/core/svg/SVGDocumentExtensions.h
+++ b/Source/core/svg/SVGDocumentExtensions.h
@@ -21,10 +21,10 @@
 #ifndef SVGDocumentExtensions_h
 #define SVGDocumentExtensions_h
 
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/text/AtomicStringHash.h>
+#include "wtf/Forward.h"
+#include "wtf/HashMap.h"
+#include "wtf/HashSet.h"
+#include "wtf/text/AtomicStringHash.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp
index 70cb071..9fa1de0 100644
--- a/Source/core/svg/SVGElement.cpp
+++ b/Source/core/svg/SVGElement.cpp
@@ -31,26 +31,50 @@
 #include "XMLNames.h"
 #include "bindings/v8/ScriptEventListener.h"
 #include "core/css/CSSCursorImageValue.h"
+#include "core/css/CSSParser.h"
 #include "core/dom/DOMImplementation.h"
 #include "core/dom/Document.h"
 #include "core/dom/Event.h"
 #include "core/dom/NodeRenderingContext.h"
+#include "core/dom/NodeTraversal.h"
+#include "core/dom/shadow/ShadowRoot.h"
 #include "core/rendering/RenderObject.h"
+#include "core/rendering/svg/RenderSVGResourceContainer.h"
 #include "core/svg/SVGCursorElement.h"
 #include "core/svg/SVGDocumentExtensions.h"
 #include "core/svg/SVGElementInstance.h"
 #include "core/svg/SVGElementRareData.h"
 #include "core/svg/SVGGraphicsElement.h"
 #include "core/svg/SVGSVGElement.h"
+#include "core/svg/SVGUseElement.h"
 
 namespace WebCore {
 
+// Animated property definitions
+DEFINE_ANIMATED_STRING(SVGElement, HTMLNames::classAttr, ClassName, className)
+
+BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGElement)
+    REGISTER_LOCAL_ANIMATED_PROPERTY(className)
+END_REGISTER_ANIMATED_PROPERTIES
+
 using namespace HTMLNames;
+using namespace SVGNames;
+
+void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName)
+{
+    // FIXME: when CSS supports "transform-origin" the special case for transform_originAttr can be removed.
+    CSSPropertyID propertyId = cssPropertyID(attrName.localName());
+    if (!propertyId && attrName == transform_originAttr)
+        propertyId = CSSPropertyWebkitTransformOrigin; // cssPropertyID("-webkit-transform-origin")
+    ASSERT(propertyId > 0);
+    propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
+}
 
 SVGElement::SVGElement(const QualifiedName& tagName, Document* document, ConstructionType constructionType)
     : Element(tagName, document, constructionType)
 {
     ScriptWrappable::init(this);
+    registerAnimatedPropertiesForSVGElement();
     setHasCustomStyleCallbacks();
 }
 
@@ -82,6 +106,10 @@
         // modifying the rare data map. Do not rely on the existing iterator.
         ASSERT(rareDataMap.contains(this));
         rareDataMap.remove(this);
+        // Clear HasSVGRareData flag now so that we are in a consistent state when
+        // calling rebuildAllElementReferencesForTarget() and
+        // removeAllElementReferencesForTarget() below.
+        clearHasSVGRareData();
     }
     ASSERT(document());
     document()->accessSVGExtensions()->rebuildAllElementReferencesForTarget(this);
@@ -102,6 +130,43 @@
         svgRareData()->setNeedsOverrideComputedStyleUpdate();
 }
 
+void SVGElement::buildPendingResourcesIfNeeded()
+{
+    Document* document = this->document();
+    if (!needsPendingResourceHandling() || !document || !inDocument() || isInShadowTree())
+        return;
+
+    SVGDocumentExtensions* extensions = document->accessSVGExtensions();
+    String resourceId = getIdAttribute();
+    if (!extensions->hasPendingResource(resourceId))
+        return;
+
+    // Mark pending resources as pending for removal.
+    extensions->markPendingResourcesForRemoval(resourceId);
+
+    // Rebuild pending resources for each client of a pending resource that is being removed.
+    while (Element* clientElement = extensions->removeElementFromPendingResourcesForRemoval(resourceId)) {
+        ASSERT(clientElement->hasPendingResources());
+        if (clientElement->hasPendingResources()) {
+            clientElement->buildPendingResource();
+            extensions->clearHasPendingResourcesIfPossible(clientElement);
+        }
+    }
+}
+
+bool SVGElement::rendererIsNeeded(const NodeRenderingContext& context)
+{
+    // http://www.w3.org/TR/SVG/extend.html#PrivateData
+    // Prevent anything other than SVG renderers from appearing in our render tree
+    // Spec: SVG allows inclusion of elements from foreign namespaces anywhere
+    // with the SVG content. In general, the SVG user agent will include the unknown
+    // elements in the DOM but will otherwise ignore unknown elements.
+    if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement())
+        return Element::rendererIsNeeded(context);
+
+    return false;
+}
+
 SVGElementRareData* SVGElement::svgRareData() const
 {
     ASSERT(hasSVGRareData());
@@ -170,6 +235,85 @@
     return DOMImplementation::hasFeature(feature, version);
 }
 
+String SVGElement::title() const
+{
+    // According to spec, we should not return titles when hovering over root <svg> elements (those
+    // <title> elements are the title of the document, not a tooltip) so we instantly return.
+    if (isOutermostSVGSVGElement())
+        return String();
+
+    // Walk up the tree, to find out whether we're inside a <use> shadow tree, to find the right title.
+    if (isInShadowTree()) {
+        Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host();
+        // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do
+        // have should be a use. The assert and following test is here to catch future shadow DOM changes
+        // that do enable SVG in a shadow tree.
+        ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::useTag));
+        if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)) {
+            SVGUseElement* useElement = toSVGUseElement(shadowHostElement);
+
+            // If the <use> title is not empty we found the title to use.
+            String useTitle(useElement->title());
+            if (!useTitle.isEmpty())
+                return useTitle;
+        }
+    }
+
+    // If we aren't an instance in a <use> or the <use> title was not found, then find the first
+    // <title> child of this element.
+    Element* titleElement = ElementTraversal::firstWithin(this);
+    for (; titleElement; titleElement = ElementTraversal::nextSkippingChildren(titleElement, this)) {
+        if (titleElement->hasTagName(SVGNames::titleTag) && titleElement->isSVGElement())
+            break;
+    }
+
+    // If a title child was found, return the text contents.
+    if (titleElement)
+        return titleElement->innerText();
+
+    // Otherwise return a null/empty string.
+    return String();
+}
+
+PassRefPtr<CSSValue> SVGElement::getPresentationAttribute(const String& name)
+{
+    if (!hasAttributesWithoutUpdate())
+        return 0;
+
+    QualifiedName attributeName(nullAtom, name, nullAtom);
+    const Attribute* attr = getAttributeItem(attributeName);
+    if (!attr)
+        return 0;
+
+    RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(SVGAttributeMode);
+    CSSPropertyID propertyID = SVGElement::cssPropertyIdForSVGAttributeName(attr->name());
+    style->setProperty(propertyID, attr->value());
+    RefPtr<CSSValue> cssValue = style->getPropertyCSSValue(propertyID);
+    return cssValue ? cssValue->cloneForCSSOM() : 0;
+}
+
+bool SVGElement::isKnownAttribute(const QualifiedName& attrName)
+{
+    return isIdAttributeName(attrName);
+}
+
+bool SVGElement::instanceUpdatesBlocked() const
+{
+    return hasSVGRareData() && svgRareData()->instanceUpdatesBlocked();
+}
+
+void SVGElement::setInstanceUpdatesBlocked(bool value)
+{
+    if (hasSVGRareData())
+        svgRareData()->setInstanceUpdatesBlocked(value);
+}
+
+AffineTransform SVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const
+{
+    // To be overriden by SVGGraphicsElement (or as special case SVGTextElement and SVGPatternElement)
+    return AffineTransform();
+}
+
 String SVGElement::xmlbase() const
 {
     return fastGetAttribute(XMLNames::baseAttr);
@@ -180,16 +324,148 @@
     setAttribute(XMLNames::baseAttr, value);
 }
 
+Node::InsertionNotificationRequest SVGElement::insertedInto(ContainerNode* rootParent)
+{
+    Element::insertedInto(rootParent);
+    updateRelativeLengthsInformation();
+    buildPendingResourcesIfNeeded();
+    return InsertionDone;
+}
+
 void SVGElement::removedFrom(ContainerNode* rootParent)
 {
     bool wasInDocument = rootParent->inDocument();
 
+    if (wasInDocument)
+        updateRelativeLengthsInformation(false, this);
+
     Element::removedFrom(rootParent);
 
     if (wasInDocument) {
         document()->accessSVGExtensions()->rebuildAllElementReferencesForTarget(this);
         document()->accessSVGExtensions()->removeAllElementReferencesForTarget(this);
     }
+
+    SVGElementInstance::invalidateAllInstancesOfElement(this);
+}
+
+void SVGElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+{
+    Element::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+
+    // Invalidate all SVGElementInstances associated with us.
+    if (!changedByParser)
+        SVGElementInstance::invalidateAllInstancesOfElement(this);
+}
+
+CSSPropertyID SVGElement::cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
+{
+    if (!attrName.namespaceURI().isNull())
+        return CSSPropertyInvalid;
+
+    static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0;
+    if (!propertyNameToIdMap) {
+        propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>;
+        // This is a list of all base CSS and SVG CSS properties which are exposed as SVG XML attributes
+        mapAttributeToCSSProperty(propertyNameToIdMap, alignment_baselineAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, baseline_shiftAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, buffered_renderingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, clipAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, clip_pathAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, clip_ruleAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::colorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolationAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolation_filtersAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, color_profileAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, color_renderingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, cursorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::directionAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, displayAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, dominant_baselineAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, enable_backgroundAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, fillAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, fill_opacityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, fill_ruleAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, filterAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, flood_colorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, flood_opacityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, font_weightAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_horizontalAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_verticalAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, image_renderingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, kerningAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, letter_spacingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, lighting_colorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, marker_endAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, marker_midAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, marker_startAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, maskAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, mask_typeAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, opacityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, overflowAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, pointer_eventsAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, shape_renderingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stop_colorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stop_opacityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, strokeAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dasharrayAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dashoffsetAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linecapAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linejoinAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_miterlimitAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_opacityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_widthAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, text_anchorAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, text_decorationAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, text_renderingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, transform_originAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, unicode_bidiAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, vector_effectAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, visibilityAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, word_spacingAttr);
+        mapAttributeToCSSProperty(propertyNameToIdMap, writing_modeAttr);
+    }
+
+    return propertyNameToIdMap->get(attrName.localName().impl());
+}
+
+void SVGElement::updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement* element)
+{
+    // If we're not yet in a document, this function will be called again from insertedInto(). Do nothing now.
+    if (!inDocument())
+        return;
+
+    // An element wants to notify us that its own relative lengths state changed.
+    // Register it in the relative length map, and register us in the parent relative length map.
+    // Register the parent in the grandparents map, etc. Repeat procedure until the root of the SVG tree.
+    if (hasRelativeLengths) {
+        m_elementsWithRelativeLengths.add(element);
+    } else {
+        if (!m_elementsWithRelativeLengths.contains(element)) {
+            // We were never registered. Do nothing.
+            return;
+        }
+
+        m_elementsWithRelativeLengths.remove(element);
+    }
+
+    // Find first styled parent node, and notify it that we've changed our relative length state.
+    ContainerNode* node = parentNode();
+    while (node) {
+        if (!node->isSVGElement())
+            break;
+
+        SVGElement* element = toSVGElement(node);
+
+        // Register us in the parent element map.
+        element->updateRelativeLengthsInformation(hasRelativeLengths, this);
+        break;
+    }
 }
 
 SVGSVGElement* SVGElement::ownerSVGElement() const
@@ -338,14 +614,110 @@
         setAttributeEventListener(eventNames().focusoutEvent, createAttributeEventListener(this, name, value));
     else if (name == SVGNames::onactivateAttr)
         setAttributeEventListener(eventNames().DOMActivateEvent, createAttributeEventListener(this, name, value));
-    else if (SVGLangSpace::parseAttribute(name, value)) {
+    else if (name == HTMLNames::classAttr) {
+        // SVG animation has currently requires special storage of values so we set
+        // the className here. svgAttributeChanged actually causes the resulting
+        // style updates (instead of Element::parseAttribute). We don't
+        // tell Element about the change to avoid parsing the class list twice
+        setClassNameBaseValue(value);
+    } else if (SVGLangSpace::parseAttribute(name, value)) {
     } else
         Element::parseAttribute(name, value);
 }
 
+typedef HashMap<QualifiedName, AnimatedPropertyType> AttributeToPropertyTypeMap;
+static inline AttributeToPropertyTypeMap& cssPropertyToTypeMap()
+{
+    DEFINE_STATIC_LOCAL(AttributeToPropertyTypeMap, s_cssPropertyMap, ());
+
+    if (!s_cssPropertyMap.isEmpty())
+        return s_cssPropertyMap;
+
+    // Fill the map for the first use.
+    s_cssPropertyMap.set(alignment_baselineAttr, AnimatedString);
+    s_cssPropertyMap.set(baseline_shiftAttr, AnimatedString);
+    s_cssPropertyMap.set(buffered_renderingAttr, AnimatedString);
+    s_cssPropertyMap.set(clipAttr, AnimatedRect);
+    s_cssPropertyMap.set(clip_pathAttr, AnimatedString);
+    s_cssPropertyMap.set(clip_ruleAttr, AnimatedString);
+    s_cssPropertyMap.set(SVGNames::colorAttr, AnimatedColor);
+    s_cssPropertyMap.set(color_interpolationAttr, AnimatedString);
+    s_cssPropertyMap.set(color_interpolation_filtersAttr, AnimatedString);
+    s_cssPropertyMap.set(color_profileAttr, AnimatedString);
+    s_cssPropertyMap.set(color_renderingAttr, AnimatedString);
+    s_cssPropertyMap.set(cursorAttr, AnimatedString);
+    s_cssPropertyMap.set(displayAttr, AnimatedString);
+    s_cssPropertyMap.set(dominant_baselineAttr, AnimatedString);
+    s_cssPropertyMap.set(fillAttr, AnimatedColor);
+    s_cssPropertyMap.set(fill_opacityAttr, AnimatedNumber);
+    s_cssPropertyMap.set(fill_ruleAttr, AnimatedString);
+    s_cssPropertyMap.set(filterAttr, AnimatedString);
+    s_cssPropertyMap.set(flood_colorAttr, AnimatedColor);
+    s_cssPropertyMap.set(flood_opacityAttr, AnimatedNumber);
+    s_cssPropertyMap.set(font_familyAttr, AnimatedString);
+    s_cssPropertyMap.set(font_sizeAttr, AnimatedLength);
+    s_cssPropertyMap.set(font_stretchAttr, AnimatedString);
+    s_cssPropertyMap.set(font_styleAttr, AnimatedString);
+    s_cssPropertyMap.set(font_variantAttr, AnimatedString);
+    s_cssPropertyMap.set(font_weightAttr, AnimatedString);
+    s_cssPropertyMap.set(image_renderingAttr, AnimatedString);
+    s_cssPropertyMap.set(kerningAttr, AnimatedLength);
+    s_cssPropertyMap.set(letter_spacingAttr, AnimatedLength);
+    s_cssPropertyMap.set(lighting_colorAttr, AnimatedColor);
+    s_cssPropertyMap.set(marker_endAttr, AnimatedString);
+    s_cssPropertyMap.set(marker_midAttr, AnimatedString);
+    s_cssPropertyMap.set(marker_startAttr, AnimatedString);
+    s_cssPropertyMap.set(maskAttr, AnimatedString);
+    s_cssPropertyMap.set(mask_typeAttr, AnimatedString);
+    s_cssPropertyMap.set(opacityAttr, AnimatedNumber);
+    s_cssPropertyMap.set(overflowAttr, AnimatedString);
+    s_cssPropertyMap.set(pointer_eventsAttr, AnimatedString);
+    s_cssPropertyMap.set(shape_renderingAttr, AnimatedString);
+    s_cssPropertyMap.set(stop_colorAttr, AnimatedColor);
+    s_cssPropertyMap.set(stop_opacityAttr, AnimatedNumber);
+    s_cssPropertyMap.set(strokeAttr, AnimatedColor);
+    s_cssPropertyMap.set(stroke_dasharrayAttr, AnimatedLengthList);
+    s_cssPropertyMap.set(stroke_dashoffsetAttr, AnimatedLength);
+    s_cssPropertyMap.set(stroke_linecapAttr, AnimatedString);
+    s_cssPropertyMap.set(stroke_linejoinAttr, AnimatedString);
+    s_cssPropertyMap.set(stroke_miterlimitAttr, AnimatedNumber);
+    s_cssPropertyMap.set(stroke_opacityAttr, AnimatedNumber);
+    s_cssPropertyMap.set(stroke_widthAttr, AnimatedLength);
+    s_cssPropertyMap.set(text_anchorAttr, AnimatedString);
+    s_cssPropertyMap.set(text_decorationAttr, AnimatedString);
+    s_cssPropertyMap.set(text_renderingAttr, AnimatedString);
+    s_cssPropertyMap.set(vector_effectAttr, AnimatedString);
+    s_cssPropertyMap.set(visibilityAttr, AnimatedString);
+    s_cssPropertyMap.set(word_spacingAttr, AnimatedLength);
+    return s_cssPropertyMap;
+}
+
 void SVGElement::animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>& propertyTypes)
 {
     localAttributeToPropertyMap().animatedPropertyTypeForAttribute(attributeName, propertyTypes);
+    if (!propertyTypes.isEmpty())
+        return;
+
+    AttributeToPropertyTypeMap& cssPropertyTypeMap = cssPropertyToTypeMap();
+    if (cssPropertyTypeMap.contains(attributeName))
+        propertyTypes.append(cssPropertyTypeMap.get(attributeName));
+}
+
+bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attrName)
+{
+    return cssPropertyToTypeMap().contains(attrName);
+}
+
+bool SVGElement::isPresentationAttribute(const QualifiedName& name) const
+{
+    return cssPropertyIdForSVGAttributeName(name) > 0;
+}
+
+void SVGElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
+{
+    CSSPropertyID propertyID = cssPropertyIdForSVGAttributeName(name);
+    if (propertyID > 0)
+        addPropertyToPresentationAttributeStyle(style, propertyID, value);
 }
 
 bool SVGElement::haveLoadedRequiredResources()
@@ -365,13 +737,9 @@
     if (element->containingShadowRoot())
         return;
 
-    if (!element->isSVGStyledElement())
-        return;
+    ASSERT(!element->instanceUpdatesBlocked());
 
-    SVGStyledElement* styledElement = toSVGStyledElement(element);
-    ASSERT(!styledElement->instanceUpdatesBlocked());
-
-    instances = styledElement->instancesForElement();
+    instances = element->instancesForElement();
 }
 
 bool SVGElement::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> prpListener, bool useCapture)
@@ -557,6 +925,32 @@
         svgAttributeChanged(name);
 }
 
+void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+    CSSPropertyID propId = SVGElement::cssPropertyIdForSVGAttributeName(attrName);
+    if (propId > 0) {
+        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        return;
+    }
+
+    if (attrName == HTMLNames::classAttr) {
+        classAttributeChanged(classNameCurrentValue());
+        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        return;
+    }
+
+    if (isIdAttributeName(attrName)) {
+        RenderObject* object = renderer();
+        // Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
+        if (object && object->isSVGResourceContainer())
+            object->toRenderSVGResourceContainer()->idChanged();
+        if (inDocument())
+            buildPendingResourcesIfNeeded();
+        SVGElementInstance::invalidateAllInstancesOfElement(this);
+        return;
+    }
+}
+
 void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) const
 {
     if (!elementData() || !elementData()->m_animatedSVGAttributesAreDirty)
@@ -570,12 +964,6 @@
         nonConstThis->localAttributeToPropertyMap().synchronizeProperty(nonConstThis, name);
 }
 
-SVGAttributeToPropertyMap& SVGElement::localAttributeToPropertyMap() const
-{
-    DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, emptyMap, ());
-    return emptyMap;
-}
-
 void SVGElement::synchronizeRequiredFeatures(SVGElement* contextElement)
 {
     ASSERT(contextElement);
@@ -647,7 +1035,7 @@
     return mutableThis->hasEventListeners(eventNames().focusinEvent) || mutableThis->hasEventListeners(eventNames().focusoutEvent);
 }
 
-bool SVGElement::isKeyboardFocusable(KeyboardEvent*) const
+bool SVGElement::isKeyboardFocusable() const
 {
     return isFocusable();
 }
@@ -754,7 +1142,7 @@
     }
 
     if (name == classAttr)
-        return isSVGStyledElement();
+        return true;
 
     return animatableAttributes.contains(name);
 }
diff --git a/Source/core/svg/SVGElement.h b/Source/core/svg/SVGElement.h
index a0e81b2..e493ab2 100644
--- a/Source/core/svg/SVGElement.h
+++ b/Source/core/svg/SVGElement.h
@@ -24,11 +24,13 @@
 
 #include "core/dom/Element.h"
 #include "core/platform/Timer.h"
+#include "core/svg/SVGAnimatedString.h"
 #include "core/svg/SVGLangSpace.h"
 #include "core/svg/SVGLocatable.h"
 #include "core/svg/SVGParsingError.h"
+#include "core/svg/properties/SVGAnimatedPropertyMacros.h"
 #include "core/svg/properties/SVGPropertyInfo.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
 
 namespace WebCore {
 
@@ -42,6 +44,8 @@
 class SVGElementRareData;
 class SVGSVGElement;
 
+void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
+
 class SVGElement : public Element, public SVGLangSpace {
 public:
     static PassRefPtr<SVGElement> create(const QualifiedName&, Document*);
@@ -49,6 +53,18 @@
 
     bool isOutermostSVGSVGElement() const;
 
+    virtual String title() const;
+    bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
+    virtual bool supportsMarkers() const { return false; }
+    PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
+    bool isKnownAttribute(const QualifiedName&);
+    static bool isAnimatableCSSProperty(const QualifiedName&);
+    virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
+    virtual bool needsPendingResourceHandling() const { return true; }
+
+    bool instanceUpdatesBlocked() const;
+    void setInstanceUpdatesBlocked(bool);
+
     String xmlbase() const;
     void setXmlbase(const String&);
 
@@ -57,7 +73,6 @@
 
     SVGDocumentExtensions* accessDocumentSVGExtensions();
 
-    virtual bool isSVGStyledElement() const { return false; }
     virtual bool isSVGGraphicsElement() const { return false; }
     virtual bool isSVGSVGElement() const { return false; }
     virtual bool isFilterEffect() const { return false; }
@@ -67,7 +82,7 @@
     // For SVGTests
     virtual bool isValid() const { return true; }
 
-    virtual void svgAttributeChanged(const QualifiedName&) { }
+    virtual void svgAttributeChanged(const QualifiedName&);
 
     virtual void animatedPropertyTypeForAttribute(const QualifiedName&, Vector<AnimatedPropertyType>&);
 
@@ -104,8 +119,6 @@
     virtual void synchronizeRequiredExtensions() { }
     virtual void synchronizeSystemLanguage() { }
 
-    virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const;
-
 #ifndef NDEBUG
     bool isAnimatableAttribute(const QualifiedName&) const;
 #endif
@@ -130,7 +143,19 @@
     virtual void attributeChanged(const QualifiedName&, const AtomicString&, AttributeModificationReason = ModifiedDirectly) OVERRIDE;
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
 
+    virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
+    virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
+
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+
+    static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
+    void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
+    void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
+
+    virtual bool selfHasRelativeLengths() const { return false; }
 
     SVGElementRareData* svgRareData() const;
     SVGElementRareData* ensureSVGRareData();
@@ -148,14 +173,20 @@
     RenderStyle* computedStyle(PseudoId = NOPSEUDO);
     virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return computedStyle(pseudoElementSpecifier); }
     virtual void willRecalcStyle(StyleChange) OVERRIDE;
-    virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
-    virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
+    virtual bool isKeyboardFocusable() const OVERRIDE;
+
+    void buildPendingResourcesIfNeeded();
 
     virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
 
     void mapInstanceToElement(SVGElementInstance*);
     void removeInstanceMapping(SVGElementInstance*);
 
+    HashSet<SVGElement*> m_elementsWithRelativeLengths;
+
+    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGElement)
+        DECLARE_ANIMATED_STRING(ClassName, className)
+    END_DECLARE_ANIMATED_PROPERTIES
 };
 
 struct SVGAttributeHashTranslator {
diff --git a/Source/core/svg/SVGElement.idl b/Source/core/svg/SVGElement.idl
index 7e45efb..26d6c95 100644
--- a/Source/core/svg/SVGElement.idl
+++ b/Source/core/svg/SVGElement.idl
@@ -23,12 +23,16 @@
 [
     CustomToV8
 ] interface SVGElement : Element {
-    [Reflect] attribute DOMString id;
     [TreatNullAs=NullString] attribute DOMString xmlbase;
     readonly attribute SVGSVGElement ownerSVGElement;
     readonly attribute SVGElement viewportElement;
 
     attribute DOMString xmllang;
     attribute DOMString xmlspace;
+
+    readonly attribute SVGAnimatedString className;
+    readonly attribute CSSStyleDeclaration style;
+
+    CSSValue getPresentationAttribute([Default=Undefined] optional DOMString name);
 };
 
diff --git a/Source/core/svg/SVGElementInstance.cpp b/Source/core/svg/SVGElementInstance.cpp
index 9f3a6e6..a25bf7f 100644
--- a/Source/core/svg/SVGElementInstance.cpp
+++ b/Source/core/svg/SVGElementInstance.cpp
@@ -31,7 +31,7 @@
 #include "core/svg/SVGElementInstanceList.h"
 #include "core/svg/SVGUseElement.h"
 
-#include <wtf/RefCountedLeakCounter.h>
+#include "wtf/RefCountedLeakCounter.h"
 
 namespace WebCore {
 
@@ -172,7 +172,7 @@
     if (!element || !element->inDocument())
         return;
 
-    if (element->isSVGStyledElement() && toSVGStyledElement(element)->instanceUpdatesBlocked())
+    if (element->instanceUpdatesBlocked())
         return;
 
     const HashSet<SVGElementInstance*>& set = element->instancesForElement();
@@ -256,7 +256,7 @@
 }
 
 SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* targetElement)
-    : m_targetElement(targetElement->isSVGStyledElement() ? toSVGStyledElement(targetElement) : 0)
+    : m_targetElement(targetElement)
 {
     if (m_targetElement)
         m_targetElement->setInstanceUpdatesBlocked(true);
diff --git a/Source/core/svg/SVGElementInstance.h b/Source/core/svg/SVGElementInstance.h
index 8e0e86e..88e39a3 100644
--- a/Source/core/svg/SVGElementInstance.h
+++ b/Source/core/svg/SVGElementInstance.h
@@ -35,7 +35,6 @@
 class Document;
 class SVGElement;
 class SVGElementInstanceList;
-class SVGStyledElement;
 class SVGUseElement;
 
 // SVGElementInstance mimics Node, but without providing all its functionality
@@ -91,7 +90,7 @@
         ~InstanceUpdateBlocker();
 
     private:
-        SVGStyledElement* m_targetElement;
+        SVGElement* m_targetElement;
     };
 
     static void invalidateAllInstancesOfElement(SVGElement*);
diff --git a/Source/core/svg/SVGElementRareData.h b/Source/core/svg/SVGElementRareData.h
index 8bb4484..262000a 100644
--- a/Source/core/svg/SVGElementRareData.h
+++ b/Source/core/svg/SVGElementRareData.h
@@ -22,9 +22,9 @@
 
 #include "core/css/StylePropertySet.h"
 #include "core/css/resolver/StyleResolver.h"
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/StdLibExtras.h>
+#include "wtf/HashSet.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGEllipseElement.cpp b/Source/core/svg/SVGEllipseElement.cpp
index f766f25..eef94a2 100644
--- a/Source/core/svg/SVGEllipseElement.cpp
+++ b/Source/core/svg/SVGEllipseElement.cpp
@@ -144,7 +144,7 @@
 
 RenderObject* SVGEllipseElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGEllipse(this);
+    return new RenderSVGEllipse(this);
 }
 
 }
diff --git a/Source/core/svg/SVGExternalResourcesRequired.h b/Source/core/svg/SVGExternalResourcesRequired.h
index e0d304b..c8781c3 100644
--- a/Source/core/svg/SVGExternalResourcesRequired.h
+++ b/Source/core/svg/SVGExternalResourcesRequired.h
@@ -22,7 +22,7 @@
 #define SVGExternalResourcesRequired_h
 
 #include "core/dom/QualifiedName.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGFEBlendElement.idl b/Source/core/svg/SVGFEBlendElement.idl
index 66925d0..fc3abe6 100644
--- a/Source/core/svg/SVGFEBlendElement.idl
+++ b/Source/core/svg/SVGFEBlendElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFEBlendElement : SVGStyledElement {
+] interface SVGFEBlendElement : SVGElement {
     // Blend Mode Types
     const unsigned short SVG_FEBLEND_MODE_UNKNOWN  = 0;
     const unsigned short SVG_FEBLEND_MODE_NORMAL   = 1;
diff --git a/Source/core/svg/SVGFEColorMatrixElement.idl b/Source/core/svg/SVGFEColorMatrixElement.idl
index 93d064e..4d5504b 100644
--- a/Source/core/svg/SVGFEColorMatrixElement.idl
+++ b/Source/core/svg/SVGFEColorMatrixElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFEColorMatrixElement : SVGStyledElement {
+] interface SVGFEColorMatrixElement : SVGElement {
     // Color Matrix Types
     const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0;
     const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX           = 1;
diff --git a/Source/core/svg/SVGFEComponentTransferElement.idl b/Source/core/svg/SVGFEComponentTransferElement.idl
index 48f91da..a91f58b 100644
--- a/Source/core/svg/SVGFEComponentTransferElement.idl
+++ b/Source/core/svg/SVGFEComponentTransferElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEComponentTransferElement : SVGStyledElement {
+interface SVGFEComponentTransferElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
 };
 
diff --git a/Source/core/svg/SVGFECompositeElement.idl b/Source/core/svg/SVGFECompositeElement.idl
index 264aaae..986e4e1 100644
--- a/Source/core/svg/SVGFECompositeElement.idl
+++ b/Source/core/svg/SVGFECompositeElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFECompositeElement : SVGStyledElement {
+] interface SVGFECompositeElement : SVGElement {
     // Composite Operators
     const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0;
     const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER       = 1;
diff --git a/Source/core/svg/SVGFEConvolveMatrixElement.idl b/Source/core/svg/SVGFEConvolveMatrixElement.idl
index 0cfcb71..b759230 100644
--- a/Source/core/svg/SVGFEConvolveMatrixElement.idl
+++ b/Source/core/svg/SVGFEConvolveMatrixElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFEConvolveMatrixElement : SVGStyledElement {
+] interface SVGFEConvolveMatrixElement : SVGElement {
     // Edge Mode Values
     const unsigned short SVG_EDGEMODE_UNKNOWN   = 0;
     const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
diff --git a/Source/core/svg/SVGFEDiffuseLightingElement.idl b/Source/core/svg/SVGFEDiffuseLightingElement.idl
index a1f5012..b4ebb2b 100644
--- a/Source/core/svg/SVGFEDiffuseLightingElement.idl
+++ b/Source/core/svg/SVGFEDiffuseLightingElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEDiffuseLightingElement : SVGStyledElement {
+interface SVGFEDiffuseLightingElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
     readonly attribute SVGAnimatedNumber surfaceScale;
     readonly attribute SVGAnimatedNumber diffuseConstant;
diff --git a/Source/core/svg/SVGFEDisplacementMapElement.idl b/Source/core/svg/SVGFEDisplacementMapElement.idl
index 40fc6e7..74ad074 100644
--- a/Source/core/svg/SVGFEDisplacementMapElement.idl
+++ b/Source/core/svg/SVGFEDisplacementMapElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFEDisplacementMapElement : SVGStyledElement {
+] interface SVGFEDisplacementMapElement : SVGElement {
     // Channel Selectors
     const unsigned short SVG_CHANNEL_UNKNOWN = 0;
     const unsigned short SVG_CHANNEL_R       = 1;
diff --git a/Source/core/svg/SVGFEDropShadowElement.idl b/Source/core/svg/SVGFEDropShadowElement.idl
index a3f3d85..8e7f36f 100644
--- a/Source/core/svg/SVGFEDropShadowElement.idl
+++ b/Source/core/svg/SVGFEDropShadowElement.idl
@@ -17,7 +17,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-interface SVGFEDropShadowElement : SVGStyledElement {
+interface SVGFEDropShadowElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
     readonly attribute SVGAnimatedNumber dx;
     readonly attribute SVGAnimatedNumber dy;
diff --git a/Source/core/svg/SVGFEFloodElement.idl b/Source/core/svg/SVGFEFloodElement.idl
index 3504083..5334c50 100644
--- a/Source/core/svg/SVGFEFloodElement.idl
+++ b/Source/core/svg/SVGFEFloodElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEFloodElement : SVGStyledElement {
+interface SVGFEFloodElement : SVGElement {
 };
 
 SVGFEFloodElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/Source/core/svg/SVGFEGaussianBlurElement.idl b/Source/core/svg/SVGFEGaussianBlurElement.idl
index c257049..53a06f3 100644
--- a/Source/core/svg/SVGFEGaussianBlurElement.idl
+++ b/Source/core/svg/SVGFEGaussianBlurElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEGaussianBlurElement : SVGStyledElement {
+interface SVGFEGaussianBlurElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
     readonly attribute SVGAnimatedNumber stdDeviationX;
     readonly attribute SVGAnimatedNumber stdDeviationY;
diff --git a/Source/core/svg/SVGFEImageElement.idl b/Source/core/svg/SVGFEImageElement.idl
index 9cf092e..40e4191 100644
--- a/Source/core/svg/SVGFEImageElement.idl
+++ b/Source/core/svg/SVGFEImageElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEImageElement : SVGStyledElement {
+interface SVGFEImageElement : SVGElement {
     readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
 };
 
diff --git a/Source/core/svg/SVGFELightElement.h b/Source/core/svg/SVGFELightElement.h
index 4a17b1b..4d84041 100644
--- a/Source/core/svg/SVGFELightElement.h
+++ b/Source/core/svg/SVGFELightElement.h
@@ -43,6 +43,8 @@
     virtual void svgAttributeChanged(const QualifiedName&);
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFELightElement)
         DECLARE_ANIMATED_NUMBER(Azimuth, azimuth)
         DECLARE_ANIMATED_NUMBER(Elevation, elevation)
diff --git a/Source/core/svg/SVGFEMergeElement.idl b/Source/core/svg/SVGFEMergeElement.idl
index 91d26f6..f4d8558 100644
--- a/Source/core/svg/SVGFEMergeElement.idl
+++ b/Source/core/svg/SVGFEMergeElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEMergeElement : SVGStyledElement {
+interface SVGFEMergeElement : SVGElement {
 };
 
 SVGFEMergeElement implements SVGFilterPrimitiveStandardAttributes;
diff --git a/Source/core/svg/SVGFEMergeNodeElement.h b/Source/core/svg/SVGFEMergeNodeElement.h
index b044895..6e1f408 100644
--- a/Source/core/svg/SVGFEMergeNodeElement.h
+++ b/Source/core/svg/SVGFEMergeNodeElement.h
@@ -37,6 +37,8 @@
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&);
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEMergeNodeElement)
         DECLARE_ANIMATED_STRING(In1, in1)
     END_DECLARE_ANIMATED_PROPERTIES
diff --git a/Source/core/svg/SVGFEMorphologyElement.idl b/Source/core/svg/SVGFEMorphologyElement.idl
index 168b4ef..550c368 100644
--- a/Source/core/svg/SVGFEMorphologyElement.idl
+++ b/Source/core/svg/SVGFEMorphologyElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFEMorphologyElement : SVGStyledElement {
+] interface SVGFEMorphologyElement : SVGElement {
     // Morphology Operators
     const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN  = 0;
     const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE    = 1;
diff --git a/Source/core/svg/SVGFEOffsetElement.idl b/Source/core/svg/SVGFEOffsetElement.idl
index d0c6829..1b6460a 100644
--- a/Source/core/svg/SVGFEOffsetElement.idl
+++ b/Source/core/svg/SVGFEOffsetElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFEOffsetElement : SVGStyledElement {
+interface SVGFEOffsetElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
     readonly attribute SVGAnimatedNumber dx;
     readonly attribute SVGAnimatedNumber dy;
diff --git a/Source/core/svg/SVGFESpecularLightingElement.idl b/Source/core/svg/SVGFESpecularLightingElement.idl
index 015c239..00b609e 100644
--- a/Source/core/svg/SVGFESpecularLightingElement.idl
+++ b/Source/core/svg/SVGFESpecularLightingElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFESpecularLightingElement : SVGStyledElement {
+interface SVGFESpecularLightingElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
     readonly attribute SVGAnimatedNumber surfaceScale;
     readonly attribute SVGAnimatedNumber specularConstant;
diff --git a/Source/core/svg/SVGFETileElement.idl b/Source/core/svg/SVGFETileElement.idl
index a9fa454..c384323 100644
--- a/Source/core/svg/SVGFETileElement.idl
+++ b/Source/core/svg/SVGFETileElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFETileElement : SVGStyledElement {
+interface SVGFETileElement : SVGElement {
     readonly attribute SVGAnimatedString in1;
 };
 
diff --git a/Source/core/svg/SVGFETurbulenceElement.idl b/Source/core/svg/SVGFETurbulenceElement.idl
index d786498..b914739 100644
--- a/Source/core/svg/SVGFETurbulenceElement.idl
+++ b/Source/core/svg/SVGFETurbulenceElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGFETurbulenceElement : SVGStyledElement {
+] interface SVGFETurbulenceElement : SVGElement {
     // Turbulence Types
     const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN      = 0;
     const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
diff --git a/Source/core/svg/SVGFilterElement.cpp b/Source/core/svg/SVGFilterElement.cpp
index 4925681..c7e9be0 100644
--- a/Source/core/svg/SVGFilterElement.cpp
+++ b/Source/core/svg/SVGFilterElement.cpp
@@ -60,7 +60,7 @@
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_filterUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_primitiveUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
     , m_x(LengthModeWidth, "-10%")
@@ -123,7 +123,7 @@
     SVGParsingError parseError = NoError;
 
     if (!isSupportedAttribute(name))
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     else if (name == SVGNames::filterUnitsAttr) {
         SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
         if (propertyValue > 0)
@@ -157,7 +157,7 @@
 void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -175,7 +175,7 @@
 
 void SVGFilterElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (changedByParser)
         return;
@@ -186,7 +186,7 @@
 
 RenderObject* SVGFilterElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceFilter(this);
+    return new RenderSVGResourceFilter(this);
 }
 
 bool SVGFilterElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/svg/SVGFilterElement.h b/Source/core/svg/SVGFilterElement.h
index e384ea9..9b75012 100644
--- a/Source/core/svg/SVGFilterElement.h
+++ b/Source/core/svg/SVGFilterElement.h
@@ -28,14 +28,14 @@
 #include "core/svg/SVGAnimatedEnumeration.h"
 #include "core/svg/SVGAnimatedInteger.h"
 #include "core/svg/SVGAnimatedLength.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGURIReference.h"
 #include "core/svg/SVGUnitTypes.h"
 
 namespace WebCore {
 
-class SVGFilterElement FINAL : public SVGStyledElement,
+class SVGFilterElement FINAL : public SVGElement,
                                public SVGURIReference,
                                public SVGExternalResourcesRequired {
 public:
diff --git a/Source/core/svg/SVGFilterElement.idl b/Source/core/svg/SVGFilterElement.idl
index d982992..7934751 100644
--- a/Source/core/svg/SVGFilterElement.idl
+++ b/Source/core/svg/SVGFilterElement.idl
@@ -24,7 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGFilterElement : SVGStyledElement {
+interface SVGFilterElement : SVGElement {
     readonly attribute SVGAnimatedEnumeration filterUnits;
     readonly attribute SVGAnimatedEnumeration primitiveUnits;
     readonly attribute SVGAnimatedLength      x;
diff --git a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
index 6aa2fd0..9a8b8b8 100644
--- a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -28,7 +28,6 @@
 #include "core/rendering/svg/RenderSVGResourceFilterPrimitive.h"
 #include "core/svg/SVGElementInstance.h"
 #include "core/svg/SVGLength.h"
-#include "core/svg/SVGStyledElement.h"
 
 namespace WebCore {
 
@@ -45,11 +44,11 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(width)
     REGISTER_LOCAL_ANIMATED_PROPERTY(height)
     REGISTER_LOCAL_ANIMATED_PROPERTY(result)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_x(LengthModeWidth, "0%")
     , m_y(LengthModeHeight, "0%")
     , m_width(LengthModeWidth, "100%")
@@ -78,7 +77,7 @@
     SVGParsingError parseError = NoError;
 
     if (!isSupportedAttribute(name))
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     else if (name == SVGNames::xAttr)
         setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::yAttr)
@@ -105,7 +104,7 @@
 void SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -115,7 +114,7 @@
 
 void SVGFilterPrimitiveStandardAttributes::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (!changedByParser)
         invalidate();
@@ -139,13 +138,13 @@
 
 RenderObject* SVGFilterPrimitiveStandardAttributes::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceFilterPrimitive(this);
+    return new RenderSVGResourceFilterPrimitive(this);
 }
 
 bool SVGFilterPrimitiveStandardAttributes::rendererIsNeeded(const NodeRenderingContext& context)
 {
     if (parentNode() && (parentNode()->hasTagName(SVGNames::filterTag)))
-        return SVGStyledElement::rendererIsNeeded(context);
+        return SVGElement::rendererIsNeeded(context);
 
     return false;
 }
diff --git a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.h b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.h
index 776ed34..82c3a92 100644
--- a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -24,10 +24,9 @@
 #include "core/rendering/svg/RenderSVGResource.h"
 #include "core/svg/SVGAnimatedLength.h"
 #include "core/svg/SVGAnimatedString.h"
-#include "core/svg/SVGStyledElement.h"
-
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
+#include "core/svg/SVGElement.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
 
 namespace WebCore {
 
@@ -36,7 +35,7 @@
 class RenderSVGResourceFilterPrimitive;
 class SVGFilterBuilder;
 
-class SVGFilterPrimitiveStandardAttributes : public SVGStyledElement {
+class SVGFilterPrimitiveStandardAttributes : public SVGElement {
 public:
     void setStandardAttributes(FilterEffect*) const;
 
diff --git a/Source/core/svg/SVGFitToViewBox.cpp b/Source/core/svg/SVGFitToViewBox.cpp
index a123bc1..ed7de02 100644
--- a/Source/core/svg/SVGFitToViewBox.cpp
+++ b/Source/core/svg/SVGFitToViewBox.cpp
@@ -30,7 +30,7 @@
 #include "core/svg/SVGDocumentExtensions.h"
 #include "core/svg/SVGParserUtilities.h"
 #include "core/svg/SVGPreserveAspectRatio.h"
-#include <wtf/text/StringImpl.h>
+#include "wtf/text/StringImpl.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGFitToViewBox.h b/Source/core/svg/SVGFitToViewBox.h
index ab7ddf1..736eca6 100644
--- a/Source/core/svg/SVGFitToViewBox.h
+++ b/Source/core/svg/SVGFitToViewBox.h
@@ -25,7 +25,7 @@
 #include "core/dom/QualifiedName.h"
 #include "core/platform/graphics/FloatRect.h"
 #include "core/svg/SVGPreserveAspectRatio.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGFontData.cpp b/Source/core/svg/SVGFontData.cpp
index e3acea3..add2578 100644
--- a/Source/core/svg/SVGFontData.cpp
+++ b/Source/core/svg/SVGFontData.cpp
@@ -33,9 +33,9 @@
 #include "core/svg/SVGFontElement.h"
 #include "core/svg/SVGFontFaceElement.h"
 #include "core/svg/SVGGlyphElement.h"
-#include <wtf/text/StringBuilder.h>
-#include <wtf/unicode/CharacterNames.h>
-#include <wtf/unicode/Unicode.h>
+#include "wtf/text/StringBuilder.h"
+#include "wtf/unicode/CharacterNames.h"
+#include "wtf/unicode/Unicode.h"
 
 using namespace WTF;
 using namespace Unicode;
diff --git a/Source/core/svg/SVGFontElement.cpp b/Source/core/svg/SVGFontElement.cpp
index 0f83191..08d15de 100644
--- a/Source/core/svg/SVGFontElement.cpp
+++ b/Source/core/svg/SVGFontElement.cpp
@@ -39,11 +39,11 @@
 
 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFontElement)
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_missingGlyph(0)
     , m_isGlyphCacheValid(false)
 {
diff --git a/Source/core/svg/SVGFontElement.h b/Source/core/svg/SVGFontElement.h
index c19156d..1d3b570 100644
--- a/Source/core/svg/SVGFontElement.h
+++ b/Source/core/svg/SVGFontElement.h
@@ -25,10 +25,10 @@
 #if ENABLE(SVG_FONTS)
 #include "SVGNames.h"
 #include "core/svg/SVGAnimatedBoolean.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
 #include "core/svg/SVGGlyphMap.h"
 #include "core/svg/SVGParserUtilities.h"
-#include "core/svg/SVGStyledElement.h"
 
 namespace WebCore {
 
@@ -52,7 +52,7 @@
 
 class SVGMissingGlyphElement;
 
-class SVGFontElement FINAL : public SVGStyledElement
+class SVGFontElement FINAL : public SVGElement
                            , public SVGExternalResourcesRequired {
 public:
     static PassRefPtr<SVGFontElement> create(const QualifiedName&, Document*);
diff --git a/Source/core/svg/SVGFontFaceElement.h b/Source/core/svg/SVGFontFaceElement.h
index 0da43df..086a793 100644
--- a/Source/core/svg/SVGFontFaceElement.h
+++ b/Source/core/svg/SVGFontFaceElement.h
@@ -61,6 +61,8 @@
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void removedFrom(ContainerNode*) OVERRIDE;
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     RefPtr<StyleRuleFontFace> m_fontFaceRule;
     SVGFontElement* m_fontElement;
 };
diff --git a/Source/core/svg/SVGFontFaceFormatElement.h b/Source/core/svg/SVGFontFaceFormatElement.h
index 91861ef..4370a27 100644
--- a/Source/core/svg/SVGFontFaceFormatElement.h
+++ b/Source/core/svg/SVGFontFaceFormatElement.h
@@ -33,6 +33,7 @@
     SVGFontFaceFormatElement(const QualifiedName&, Document*);
 
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 } // namespace WebCore
diff --git a/Source/core/svg/SVGFontFaceNameElement.h b/Source/core/svg/SVGFontFaceNameElement.h
index 0becec8..9a1e96d 100644
--- a/Source/core/svg/SVGFontFaceNameElement.h
+++ b/Source/core/svg/SVGFontFaceNameElement.h
@@ -35,6 +35,8 @@
 
 private:
     SVGFontFaceNameElement(const QualifiedName&, Document*);
+
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 } // namespace WebCore
diff --git a/Source/core/svg/SVGFontFaceSrcElement.h b/Source/core/svg/SVGFontFaceSrcElement.h
index b099379..5f47b8a 100644
--- a/Source/core/svg/SVGFontFaceSrcElement.h
+++ b/Source/core/svg/SVGFontFaceSrcElement.h
@@ -37,6 +37,7 @@
     SVGFontFaceSrcElement(const QualifiedName&, Document*);
 
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 } // namespace WebCore
diff --git a/Source/core/svg/SVGFontFaceUriElement.h b/Source/core/svg/SVGFontFaceUriElement.h
index ba39ffc..1d06358 100644
--- a/Source/core/svg/SVGFontFaceUriElement.h
+++ b/Source/core/svg/SVGFontFaceUriElement.h
@@ -44,6 +44,8 @@
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     void loadFont();
 
     ResourcePtr<CachedFont> m_cachedFont;
diff --git a/Source/core/svg/SVGForeignObjectElement.cpp b/Source/core/svg/SVGForeignObjectElement.cpp
index 1969ed0..80a895e 100644
--- a/Source/core/svg/SVGForeignObjectElement.cpp
+++ b/Source/core/svg/SVGForeignObjectElement.cpp
@@ -19,7 +19,6 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGForeignObjectElement.h"
 
 #include "SVGNames.h"
@@ -29,7 +28,7 @@
 #include "core/rendering/svg/RenderSVGResource.h"
 #include "core/svg/SVGElementInstance.h"
 #include "core/svg/SVGLength.h"
-#include <wtf/Assertions.h>
+#include "wtf/Assertions.h"
 
 namespace WebCore {
 
@@ -125,7 +124,7 @@
 
 RenderObject* SVGForeignObjectElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGForeignObject(this);
+    return new RenderSVGForeignObject(this);
 }
 
 bool SVGForeignObjectElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/svg/SVGGElement.cpp b/Source/core/svg/SVGGElement.cpp
index 4eb8f30..b53f0bb 100644
--- a/Source/core/svg/SVGGElement.cpp
+++ b/Source/core/svg/SVGGElement.cpp
@@ -92,14 +92,14 @@
     // subtree may be hidden - we only want the resource renderers to exist so they can be
     // referenced from somewhere else.
     if (style->display() == NONE)
-        return new (document()->renderArena()) RenderSVGHiddenContainer(this);
+        return new RenderSVGHiddenContainer(this);
 
-    return new (document()->renderArena()) RenderSVGTransformableContainer(this);
+    return new RenderSVGTransformableContainer(this);
 }
 
 bool SVGGElement::rendererIsNeeded(const NodeRenderingContext&)
 {
-    // Unlike SVGStyledElement::rendererIsNeeded(), we still create renderers, even if
+    // Unlike SVGElement::rendererIsNeeded(), we still create renderers, even if
     // display is set to 'none' - which is special to SVG <g> container elements.
     return parentOrShadowHostElement() && parentOrShadowHostElement()->isSVGElement();
 }
diff --git a/Source/core/svg/SVGGlyphElement.cpp b/Source/core/svg/SVGGlyphElement.cpp
index 4a09d87..31bcc2d 100644
--- a/Source/core/svg/SVGGlyphElement.cpp
+++ b/Source/core/svg/SVGGlyphElement.cpp
@@ -32,7 +32,7 @@
 namespace WebCore {
 
 inline SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::glyphTag));
     ScriptWrappable::init(this);
@@ -55,20 +55,20 @@
     if (name == SVGNames::dAttr)
         invalidateGlyphCache();
     else
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
 }
 
 Node::InsertionNotificationRequest SVGGlyphElement::insertedInto(ContainerNode* rootParent)
 {
     invalidateGlyphCache();
-    return SVGStyledElement::insertedInto(rootParent);
+    return SVGElement::insertedInto(rootParent);
 }
 
 void SVGGlyphElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument())
         invalidateGlyphCache();
-    SVGStyledElement::removedFrom(rootParent);
+    SVGElement::removedFrom(rootParent);
 }
 
 static inline SVGGlyph::ArabicForm parseArabicForm(const AtomicString& value)
diff --git a/Source/core/svg/SVGGlyphElement.h b/Source/core/svg/SVGGlyphElement.h
index bd99c6b..9723787 100644
--- a/Source/core/svg/SVGGlyphElement.h
+++ b/Source/core/svg/SVGGlyphElement.h
@@ -24,13 +24,13 @@
 
 #if ENABLE(SVG_FONTS)
 #include "core/platform/graphics/SVGGlyph.h"
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
 class SVGFontData;
 
-class SVGGlyphElement FINAL : public SVGStyledElement {
+class SVGGlyphElement FINAL : public SVGElement {
 public:
     static PassRefPtr<SVGGlyphElement> create(const QualifiedName&, Document*);
 
diff --git a/Source/core/svg/SVGGlyphRefElement.cpp b/Source/core/svg/SVGGlyphRefElement.cpp
index a3cddab..4594e31 100644
--- a/Source/core/svg/SVGGlyphRefElement.cpp
+++ b/Source/core/svg/SVGGlyphRefElement.cpp
@@ -25,7 +25,7 @@
 #include "SVGNames.h"
 #include "XLinkNames.h"
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/text/AtomicString.h>
+#include "wtf/text/AtomicString.h"
 
 namespace WebCore {
 
@@ -34,11 +34,11 @@
 
 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGlyphRefElement)
     REGISTER_LOCAL_ANIMATED_PROPERTY(href)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGGlyphRefElement::SVGGlyphRefElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_x(0)
     , m_y(0)
     , m_dx(0)
@@ -82,7 +82,7 @@
     } else {
         if (SVGURIReference::parseAttribute(name, value))
             return;
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     }
 }
 
diff --git a/Source/core/svg/SVGGlyphRefElement.h b/Source/core/svg/SVGGlyphRefElement.h
index 6d94a14..078e04b 100644
--- a/Source/core/svg/SVGGlyphRefElement.h
+++ b/Source/core/svg/SVGGlyphRefElement.h
@@ -21,12 +21,12 @@
 #define SVGGlyphRefElement_h
 
 #if ENABLE(SVG_FONTS)
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGURIReference.h"
 
 namespace WebCore {
 
-class SVGGlyphRefElement FINAL : public SVGStyledElement,
+class SVGGlyphRefElement FINAL : public SVGElement,
                                  public SVGURIReference {
 public:
     static PassRefPtr<SVGGlyphRefElement> create(const QualifiedName&, Document*);
diff --git a/Source/core/svg/SVGGlyphRefElement.idl b/Source/core/svg/SVGGlyphRefElement.idl
index a9d07ca..e10bf7b 100644
--- a/Source/core/svg/SVGGlyphRefElement.idl
+++ b/Source/core/svg/SVGGlyphRefElement.idl
@@ -19,7 +19,7 @@
 
 [
     Conditional=SVG_FONTS
-] interface SVGGlyphRefElement : SVGStyledElement {
+] interface SVGGlyphRefElement : SVGElement {
     // FIXME: Use [Reflect] after https://bugs.webkit.org/show_bug.cgi?id=64843 is fixed.
     attribute DOMString glyphRef;
     [Reflect] attribute DOMString format;
diff --git a/Source/core/svg/SVGGradientElement.cpp b/Source/core/svg/SVGGradientElement.cpp
index 01cc9ed..5788147 100644
--- a/Source/core/svg/SVGGradientElement.cpp
+++ b/Source/core/svg/SVGGradientElement.cpp
@@ -50,11 +50,11 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform)
     REGISTER_LOCAL_ANIMATED_PROPERTY(href)
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_spreadMethod(SVGSpreadMethodPad)
     , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
 {
@@ -78,7 +78,7 @@
 void SVGGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (!isSupportedAttribute(name)) {
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
         return;
     }
 
@@ -115,7 +115,7 @@
 void SVGGradientElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -127,7 +127,7 @@
 
 void SVGGradientElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (changedByParser)
         return;
diff --git a/Source/core/svg/SVGGradientElement.h b/Source/core/svg/SVGGradientElement.h
index 4c23be9..404e586 100644
--- a/Source/core/svg/SVGGradientElement.h
+++ b/Source/core/svg/SVGGradientElement.h
@@ -26,8 +26,8 @@
 #include "core/svg/SVGAnimatedBoolean.h"
 #include "core/svg/SVGAnimatedEnumeration.h"
 #include "core/svg/SVGAnimatedTransformList.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGURIReference.h"
 #include "core/svg/SVGUnitTypes.h"
 
@@ -73,7 +73,7 @@
     }
 };
 
-class SVGGradientElement : public SVGStyledElement,
+class SVGGradientElement : public SVGElement,
                            public SVGURIReference,
                            public SVGExternalResourcesRequired {
 public:
diff --git a/Source/core/svg/SVGGradientElement.idl b/Source/core/svg/SVGGradientElement.idl
index cba4d69..cc2f00b 100644
--- a/Source/core/svg/SVGGradientElement.idl
+++ b/Source/core/svg/SVGGradientElement.idl
@@ -25,7 +25,7 @@
 
 [
     DoNotCheckConstants
-] interface SVGGradientElement : SVGStyledElement {
+] interface SVGGradientElement : SVGElement {
     // Spread Method Types
     const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
     const unsigned short SVG_SPREADMETHOD_PAD     = 1;
diff --git a/Source/core/svg/SVGGraphicsElement.cpp b/Source/core/svg/SVGGraphicsElement.cpp
index 1e56fd3..42180a9 100644
--- a/Source/core/svg/SVGGraphicsElement.cpp
+++ b/Source/core/svg/SVGGraphicsElement.cpp
@@ -36,12 +36,12 @@
 
 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGraphicsElement)
     REGISTER_LOCAL_ANIMATED_PROPERTY(transform)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
     REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
 END_REGISTER_ANIMATED_PROPERTIES
 
 SVGGraphicsElement::SVGGraphicsElement(const QualifiedName& tagName, Document* document, ConstructionType constructionType)
-    : SVGStyledElement(tagName, document, constructionType)
+    : SVGElement(tagName, document, constructionType)
 {
     registerAnimatedPropertiesForSVGGraphicsElement();
 }
@@ -103,7 +103,7 @@
 void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (!isSupportedAttribute(name)) {
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
         return;
     }
 
@@ -123,7 +123,7 @@
 void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -163,7 +163,7 @@
 RenderObject* SVGGraphicsElement::createRenderer(RenderStyle*)
 {
     // By default, any subclass is expected to do path-based drawing
-    return new (document()->renderArena()) RenderSVGPath(this);
+    return new RenderSVGPath(this);
 }
 
 void SVGGraphicsElement::toClipPath(Path& path)
diff --git a/Source/core/svg/SVGGraphicsElement.h b/Source/core/svg/SVGGraphicsElement.h
index 8114ae8..103a524 100644
--- a/Source/core/svg/SVGGraphicsElement.h
+++ b/Source/core/svg/SVGGraphicsElement.h
@@ -22,7 +22,7 @@
 #define SVGGraphicsElement_h
 
 #include "core/svg/SVGAnimatedTransformList.h"
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGTests.h"
 #include "core/svg/SVGTransformable.h"
 
@@ -31,7 +31,7 @@
 class AffineTransform;
 class Path;
 
-class SVGGraphicsElement : public SVGStyledElement, public SVGTransformable, public SVGTests {
+class SVGGraphicsElement : public SVGElement, public SVGTransformable, public SVGTests {
 public:
     virtual ~SVGGraphicsElement();
 
diff --git a/Source/core/svg/SVGGraphicsElement.idl b/Source/core/svg/SVGGraphicsElement.idl
index a0585ae..0af2440 100644
--- a/Source/core/svg/SVGGraphicsElement.idl
+++ b/Source/core/svg/SVGGraphicsElement.idl
@@ -28,7 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGGraphicsElement : SVGStyledElement {
+interface SVGGraphicsElement : SVGElement {
     readonly attribute SVGAnimatedTransformList transform;
 
     readonly attribute SVGElement nearestViewportElement;
diff --git a/Source/core/svg/SVGImageElement.cpp b/Source/core/svg/SVGImageElement.cpp
index 89b6b7f..c90901a 100644
--- a/Source/core/svg/SVGImageElement.cpp
+++ b/Source/core/svg/SVGImageElement.cpp
@@ -183,7 +183,7 @@
 
 RenderObject* SVGImageElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGImage(this);
+    return new RenderSVGImage(this);
 }
 
 bool SVGImageElement::haveLoadedRequiredResources()
diff --git a/Source/core/svg/SVGLangSpace.cpp b/Source/core/svg/SVGLangSpace.cpp
index a43e685..c6bfe93 100644
--- a/Source/core/svg/SVGLangSpace.cpp
+++ b/Source/core/svg/SVGLangSpace.cpp
@@ -19,11 +19,10 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGLangSpace.h"
 
 #include "XMLNames.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGLangSpace.h b/Source/core/svg/SVGLangSpace.h
index 5bb0f15..b10c97d 100644
--- a/Source/core/svg/SVGLangSpace.h
+++ b/Source/core/svg/SVGLangSpace.h
@@ -22,7 +22,7 @@
 #define SVGLangSpace_h
 
 #include "core/dom/QualifiedName.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGLengthList.cpp b/Source/core/svg/SVGLengthList.cpp
index 87bbfc3..f3bd2e1 100644
--- a/Source/core/svg/SVGLengthList.cpp
+++ b/Source/core/svg/SVGLengthList.cpp
@@ -19,11 +19,10 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGLengthList.h"
 
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGLengthList.h b/Source/core/svg/SVGLengthList.h
index 44bc7ca..12afeed 100644
--- a/Source/core/svg/SVGLengthList.h
+++ b/Source/core/svg/SVGLengthList.h
@@ -22,7 +22,7 @@
 #define SVGLengthList_h
 
 #include "core/svg/SVGLength.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGLinearGradientElement.cpp b/Source/core/svg/SVGLinearGradientElement.cpp
index 68237ed..cb55892 100644
--- a/Source/core/svg/SVGLinearGradientElement.cpp
+++ b/Source/core/svg/SVGLinearGradientElement.cpp
@@ -115,7 +115,7 @@
 
 RenderObject* SVGLinearGradientElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceLinearGradient(this);
+    return new RenderSVGResourceLinearGradient(this);
 }
 
 bool SVGLinearGradientElement::collectGradientAttributes(LinearGradientAttributes& attributes)
diff --git a/Source/core/svg/SVGLocatable.cpp b/Source/core/svg/SVGLocatable.cpp
index 3549580..d462fa2 100644
--- a/Source/core/svg/SVGLocatable.cpp
+++ b/Source/core/svg/SVGLocatable.cpp
@@ -87,8 +87,7 @@
         if (!currentElement->isSVGElement())
             break;
 
-        if (toSVGElement(currentElement)->isSVGStyledElement())
-            ctm = toSVGStyledElement(currentElement)->localCoordinateSpaceTransform(mode).multiply(ctm);
+        ctm = toSVGElement(currentElement)->localCoordinateSpaceTransform(mode).multiply(ctm);
 
         // For getCTM() computation, stop at the nearest viewport element
         if (currentElement == stopAtElement)
diff --git a/Source/core/svg/SVGMPathElement.h b/Source/core/svg/SVGMPathElement.h
index 813c7c1..bd412a8 100644
--- a/Source/core/svg/SVGMPathElement.h
+++ b/Source/core/svg/SVGMPathElement.h
@@ -20,6 +20,7 @@
 #ifndef SVGMPathElement_h
 #define SVGMPathElement_h
 
+#include "SVGNames.h"
 #include "core/svg/SVGAnimatedBoolean.h"
 #include "core/svg/SVGAnimatedString.h"
 #include "core/svg/SVGElement.h"
@@ -54,6 +55,7 @@
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
     void notifyParentOfPathChange(ContainerNode*);
 
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMPathElement)
@@ -62,6 +64,12 @@
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
+inline SVGMPathElement* toSVGMPathElement(Node* node)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::mpathTag));
+    return static_cast<SVGMPathElement*>(node);
+}
+
 } // namespace WebCore
 
 #endif // SVGMPathElement_h
diff --git a/Source/core/svg/SVGMarkerElement.cpp b/Source/core/svg/SVGMarkerElement.cpp
index d6fa00b..4d010c0 100644
--- a/Source/core/svg/SVGMarkerElement.cpp
+++ b/Source/core/svg/SVGMarkerElement.cpp
@@ -67,11 +67,11 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
     REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
     REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_refX(LengthModeWidth)
     , m_refY(LengthModeHeight)
     , m_markerWidth(LengthModeWidth, "3")
@@ -128,7 +128,7 @@
     SVGParsingError parseError = NoError;
 
     if (!isSupportedAttribute(name))
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     else if (name == SVGNames::markerUnitsAttr) {
         SVGMarkerUnitsType propertyValue = SVGPropertyTraits<SVGMarkerUnitsType>::fromString(value);
         if (propertyValue > 0)
@@ -159,7 +159,7 @@
 void SVGMarkerElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -177,7 +177,7 @@
 
 void SVGMarkerElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (changedByParser)
         return;
@@ -212,7 +212,7 @@
 
 RenderObject* SVGMarkerElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceMarker(this);
+    return new RenderSVGResourceMarker(this);
 }
 
 bool SVGMarkerElement::selfHasRelativeLengths() const
diff --git a/Source/core/svg/SVGMarkerElement.h b/Source/core/svg/SVGMarkerElement.h
index 62f6476..b389755 100644
--- a/Source/core/svg/SVGMarkerElement.h
+++ b/Source/core/svg/SVGMarkerElement.h
@@ -27,9 +27,9 @@
 #include "core/svg/SVGAnimatedLength.h"
 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
 #include "core/svg/SVGAnimatedRect.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
 #include "core/svg/SVGFitToViewBox.h"
-#include "core/svg/SVGStyledElement.h"
 
 namespace WebCore {
 
@@ -93,7 +93,7 @@
     }
 };
 
-class SVGMarkerElement FINAL : public SVGStyledElement,
+class SVGMarkerElement FINAL : public SVGElement,
                                public SVGExternalResourcesRequired,
                                public SVGFitToViewBox {
 public:
diff --git a/Source/core/svg/SVGMarkerElement.idl b/Source/core/svg/SVGMarkerElement.idl
index 5ebd240..0918d76 100644
--- a/Source/core/svg/SVGMarkerElement.idl
+++ b/Source/core/svg/SVGMarkerElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGMarkerElement : SVGStyledElement {
+interface SVGMarkerElement : SVGElement {
     // Marker Unit Types
     const unsigned short SVG_MARKERUNITS_UNKNOWN        = 0;
     const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
diff --git a/Source/core/svg/SVGMaskElement.cpp b/Source/core/svg/SVGMaskElement.cpp
index ab7fbbf..5fe2d9c 100644
--- a/Source/core/svg/SVGMaskElement.cpp
+++ b/Source/core/svg/SVGMaskElement.cpp
@@ -49,12 +49,12 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(width)
     REGISTER_LOCAL_ANIMATED_PROPERTY(height)
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
     REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
     , m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
     , m_x(LengthModeWidth, "-10%")
@@ -95,7 +95,7 @@
     SVGParsingError parseError = NoError;
 
     if (!isSupportedAttribute(name))
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     else if (name == SVGNames::maskUnitsAttr) {
         SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
         if (propertyValue > 0)
@@ -125,7 +125,7 @@
 void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -143,7 +143,7 @@
 
 void SVGMaskElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (changedByParser)
         return;
@@ -154,7 +154,7 @@
 
 RenderObject* SVGMaskElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceMasker(this);
+    return new RenderSVGResourceMasker(this);
 }
 
 bool SVGMaskElement::selfHasRelativeLengths() const
diff --git a/Source/core/svg/SVGMaskElement.h b/Source/core/svg/SVGMaskElement.h
index ec063e0..6d120bc 100644
--- a/Source/core/svg/SVGMaskElement.h
+++ b/Source/core/svg/SVGMaskElement.h
@@ -20,17 +20,18 @@
 #ifndef SVGMaskElement_h
 #define SVGMaskElement_h
 
+#include "SVGNames.h"
 #include "core/svg/SVGAnimatedBoolean.h"
 #include "core/svg/SVGAnimatedEnumeration.h"
 #include "core/svg/SVGAnimatedLength.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGTests.h"
 #include "core/svg/SVGUnitTypes.h"
 
 namespace WebCore {
 
-class SVGMaskElement FINAL : public SVGStyledElement,
+class SVGMaskElement FINAL : public SVGElement,
                              public SVGTests,
                              public SVGExternalResourcesRequired {
 public:
@@ -67,6 +68,12 @@
     virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLanguage(this); }
 };
 
+inline SVGMaskElement* toSVGMaskElement(Node* node)
+{
+    ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::maskTag));
+    return static_cast<SVGMaskElement*>(node);
+}
+
 }
 
 #endif
diff --git a/Source/core/svg/SVGMaskElement.idl b/Source/core/svg/SVGMaskElement.idl
index f24eb2e..22658d5 100644
--- a/Source/core/svg/SVGMaskElement.idl
+++ b/Source/core/svg/SVGMaskElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGMaskElement : SVGStyledElement {
+interface SVGMaskElement : SVGElement {
     readonly attribute SVGAnimatedEnumeration maskUnits;
     readonly attribute SVGAnimatedEnumeration maskContentUnits;
 
diff --git a/Source/core/svg/SVGMetadataElement.h b/Source/core/svg/SVGMetadataElement.h
index 240bdf7..736e3b3 100644
--- a/Source/core/svg/SVGMetadataElement.h
+++ b/Source/core/svg/SVGMetadataElement.h
@@ -31,6 +31,8 @@
 
 private:
     SVGMetadataElement(const QualifiedName&, Document*);
+
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 };
 
 } // namespace WebCore
diff --git a/Source/core/svg/SVGMissingGlyphElement.cpp b/Source/core/svg/SVGMissingGlyphElement.cpp
index f976d76..893ff75 100644
--- a/Source/core/svg/SVGMissingGlyphElement.cpp
+++ b/Source/core/svg/SVGMissingGlyphElement.cpp
@@ -26,7 +26,7 @@
 namespace WebCore {
 
 inline SVGMissingGlyphElement::SVGMissingGlyphElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::missing_glyphTag));
     ScriptWrappable::init(this);
diff --git a/Source/core/svg/SVGMissingGlyphElement.h b/Source/core/svg/SVGMissingGlyphElement.h
index 56c9f80..9dfaf3f 100644
--- a/Source/core/svg/SVGMissingGlyphElement.h
+++ b/Source/core/svg/SVGMissingGlyphElement.h
@@ -21,11 +21,11 @@
 #define SVGMissingGlyphElement_h
 
 #if ENABLE(SVG_FONTS)
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-class SVGMissingGlyphElement FINAL : public SVGStyledElement {
+class SVGMissingGlyphElement FINAL : public SVGElement {
 public:
     static PassRefPtr<SVGMissingGlyphElement> create(const QualifiedName&, Document*);
 
diff --git a/Source/core/svg/SVGMissingGlyphElement.idl b/Source/core/svg/SVGMissingGlyphElement.idl
index c2b68ad..c0a7974 100644
--- a/Source/core/svg/SVGMissingGlyphElement.idl
+++ b/Source/core/svg/SVGMissingGlyphElement.idl
@@ -25,6 +25,6 @@
 
 [
     Conditional=SVG_FONTS
-] interface SVGMissingGlyphElement : SVGStyledElement {
+] interface SVGMissingGlyphElement : SVGElement {
 };
 
diff --git a/Source/core/svg/SVGNumberList.cpp b/Source/core/svg/SVGNumberList.cpp
index c8eb878..94934d1 100644
--- a/Source/core/svg/SVGNumberList.cpp
+++ b/Source/core/svg/SVGNumberList.cpp
@@ -19,11 +19,10 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGNumberList.h"
 
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGNumberList.h b/Source/core/svg/SVGNumberList.h
index 85c197e..0b12d5d 100644
--- a/Source/core/svg/SVGNumberList.h
+++ b/Source/core/svg/SVGNumberList.h
@@ -23,7 +23,7 @@
 
 #include "core/svg/SVGNumber.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPaint.h b/Source/core/svg/SVGPaint.h
index 98ada60..e43eb01 100644
--- a/Source/core/svg/SVGPaint.h
+++ b/Source/core/svg/SVGPaint.h
@@ -24,7 +24,7 @@
 #define SVGPaint_h
 
 #include "core/svg/SVGColor.h"
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGParserUtilities.h b/Source/core/svg/SVGParserUtilities.h
index e67c9e1..656e8b7 100644
--- a/Source/core/svg/SVGParserUtilities.h
+++ b/Source/core/svg/SVGParserUtilities.h
@@ -23,7 +23,7 @@
 #define SVGParserUtilities_h
 
 #include "core/platform/text/ParserUtilities.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
 
 typedef pair<unsigned, unsigned> UnicodeRange;
 typedef Vector<UnicodeRange> UnicodeRanges;
diff --git a/Source/core/svg/SVGPathBlender.cpp b/Source/core/svg/SVGPathBlender.cpp
index 2e4151e..eba041b 100644
--- a/Source/core/svg/SVGPathBlender.cpp
+++ b/Source/core/svg/SVGPathBlender.cpp
@@ -18,13 +18,12 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGPathBlender.h"
 
 #include "core/platform/animation/AnimationUtilities.h"
 #include "core/svg/SVGPathSeg.h"
 #include "core/svg/SVGPathSource.h"
-#include <wtf/TemporaryChange.h>
+#include "wtf/TemporaryChange.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathByteStream.h b/Source/core/svg/SVGPathByteStream.h
index 6f7c9eb..184dad4 100644
--- a/Source/core/svg/SVGPathByteStream.h
+++ b/Source/core/svg/SVGPathByteStream.h
@@ -20,9 +20,9 @@
 #ifndef SVGPathByteStream_h
 #define SVGPathByteStream_h
 
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
+#include "wtf/Noncopyable.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathByteStreamBuilder.h b/Source/core/svg/SVGPathByteStreamBuilder.h
index 40636ba..06c26e6 100644
--- a/Source/core/svg/SVGPathByteStreamBuilder.h
+++ b/Source/core/svg/SVGPathByteStreamBuilder.h
@@ -23,8 +23,8 @@
 #include "core/platform/graphics/FloatPoint.h"
 #include "core/svg/SVGPathByteStream.h"
 #include "core/svg/SVGPathConsumer.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathByteStreamSource.h b/Source/core/svg/SVGPathByteStreamSource.h
index b61f267..ebdb90a 100644
--- a/Source/core/svg/SVGPathByteStreamSource.h
+++ b/Source/core/svg/SVGPathByteStreamSource.h
@@ -23,7 +23,7 @@
 #include "core/platform/graphics/FloatPoint.h"
 #include "core/svg/SVGPathByteStream.h"
 #include "core/svg/SVGPathSource.h"
-#include <wtf/PassOwnPtr.h>
+#include "wtf/PassOwnPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathConsumer.h b/Source/core/svg/SVGPathConsumer.h
index a109246..fbd9e56 100644
--- a/Source/core/svg/SVGPathConsumer.h
+++ b/Source/core/svg/SVGPathConsumer.h
@@ -25,8 +25,8 @@
 #define SVGPathConsumer_h
 
 #include "core/platform/graphics/FloatPoint.h"
-#include <wtf/FastAllocBase.h>
-#include <wtf/Noncopyable.h>
+#include "wtf/FastAllocBase.h"
+#include "wtf/Noncopyable.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathElement.cpp b/Source/core/svg/SVGPathElement.cpp
index a06d6c6..8d16bbf 100644
--- a/Source/core/svg/SVGPathElement.cpp
+++ b/Source/core/svg/SVGPathElement.cpp
@@ -284,7 +284,7 @@
         HashSet<SVGElement*>::iterator end = dependencies->end();
         for (HashSet<SVGElement*>::iterator it = dependencies->begin(); it != end; ++it) {
             if ((*it)->hasTagName(SVGNames::mpathTag))
-                static_cast<SVGMPathElement*>(*it)->targetPathChanged();
+                toSVGMPathElement(*it)->targetPathChanged();
         }
     }
 }
@@ -403,7 +403,7 @@
 RenderObject* SVGPathElement::createRenderer(RenderStyle*)
 {
     // By default, any subclass is expected to do path-based drawing
-    return new (document()->renderArena()) RenderSVGPath(this);
+    return new RenderSVGPath(this);
 }
 
 }
diff --git a/Source/core/svg/SVGPathParser.cpp b/Source/core/svg/SVGPathParser.cpp
index a802ea9..62c90c8 100644
--- a/Source/core/svg/SVGPathParser.cpp
+++ b/Source/core/svg/SVGPathParser.cpp
@@ -22,12 +22,11 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGPathParser.h"
 
 #include "core/platform/graphics/transforms/AffineTransform.h"
 #include "core/svg/SVGPathSource.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
 
 static const float gOneOverThree = 1 / 3.f;
 
diff --git a/Source/core/svg/SVGPathParser.h b/Source/core/svg/SVGPathParser.h
index 50ebce1..ec55c8b 100644
--- a/Source/core/svg/SVGPathParser.h
+++ b/Source/core/svg/SVGPathParser.h
@@ -26,8 +26,8 @@
 
 #include "core/svg/SVGPathConsumer.h"
 #include "core/svg/SVGPathSeg.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathSegList.h b/Source/core/svg/SVGPathSegList.h
index 105b354..cca091e 100644
--- a/Source/core/svg/SVGPathSegList.h
+++ b/Source/core/svg/SVGPathSegList.h
@@ -23,9 +23,8 @@
 #include "core/svg/SVGPathSeg.h"
 #include "core/svg/properties/SVGListProperty.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-
-#include <wtf/text/WTFString.h>
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathSegListSource.h b/Source/core/svg/SVGPathSegListSource.h
index a56363e..b0e0cdd 100644
--- a/Source/core/svg/SVGPathSegListSource.h
+++ b/Source/core/svg/SVGPathSegListSource.h
@@ -24,8 +24,8 @@
 #include "core/svg/SVGPathSeg.h"
 #include "core/svg/SVGPathSegList.h"
 #include "core/svg/SVGPathSource.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefPtr.h>
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathStringBuilder.cpp b/Source/core/svg/SVGPathStringBuilder.cpp
index 1a6a993..580454b 100644
--- a/Source/core/svg/SVGPathStringBuilder.cpp
+++ b/Source/core/svg/SVGPathStringBuilder.cpp
@@ -18,9 +18,9 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGPathStringBuilder.h"
-#include <wtf/text/WTFString.h>
+
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathStringBuilder.h b/Source/core/svg/SVGPathStringBuilder.h
index 1d914de..8e20442 100644
--- a/Source/core/svg/SVGPathStringBuilder.h
+++ b/Source/core/svg/SVGPathStringBuilder.h
@@ -22,7 +22,7 @@
 
 #include "core/platform/graphics/FloatPoint.h"
 #include "core/svg/SVGPathConsumer.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathStringSource.h b/Source/core/svg/SVGPathStringSource.h
index 80265c3..a423ad8 100644
--- a/Source/core/svg/SVGPathStringSource.h
+++ b/Source/core/svg/SVGPathStringSource.h
@@ -22,8 +22,8 @@
 #define SVGPathStringSource_h
 
 #include "core/svg/SVGPathSource.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPathUtilities.h b/Source/core/svg/SVGPathUtilities.h
index 5fa2d46..7c06c57 100644
--- a/Source/core/svg/SVGPathUtilities.h
+++ b/Source/core/svg/SVGPathUtilities.h
@@ -22,8 +22,8 @@
 
 #include "core/svg/SVGPathConsumer.h"
 #include "core/svg/SVGPoint.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPatternElement.cpp b/Source/core/svg/SVGPatternElement.cpp
index a43d5c5..9502020 100644
--- a/Source/core/svg/SVGPatternElement.cpp
+++ b/Source/core/svg/SVGPatternElement.cpp
@@ -58,12 +58,12 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
     REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
     REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
     REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_x(LengthModeWidth)
     , m_y(LengthModeHeight)
     , m_width(LengthModeWidth)
@@ -105,7 +105,7 @@
     SVGParsingError parseError = NoError;
 
     if (!isSupportedAttribute(name))
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
     else if (name == SVGNames::patternUnitsAttr) {
         SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
         if (propertyValue > 0)
@@ -143,7 +143,7 @@
 void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -161,7 +161,7 @@
 
 void SVGPatternElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
-    SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 
     if (changedByParser)
         return;
@@ -172,7 +172,7 @@
 
 RenderObject* SVGPatternElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourcePattern(this);
+    return new RenderSVGResourcePattern(this);
 }
 
 void SVGPatternElement::collectPatternAttributes(PatternAttributes& attributes) const
diff --git a/Source/core/svg/SVGPatternElement.h b/Source/core/svg/SVGPatternElement.h
index 0bd4193..ac3d502 100644
--- a/Source/core/svg/SVGPatternElement.h
+++ b/Source/core/svg/SVGPatternElement.h
@@ -28,9 +28,9 @@
 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
 #include "core/svg/SVGAnimatedRect.h"
 #include "core/svg/SVGAnimatedTransformList.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
 #include "core/svg/SVGFitToViewBox.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGTests.h"
 #include "core/svg/SVGURIReference.h"
 #include "core/svg/SVGUnitTypes.h"
@@ -39,7 +39,7 @@
 
 struct PatternAttributes;
 
-class SVGPatternElement FINAL : public SVGStyledElement,
+class SVGPatternElement FINAL : public SVGElement,
                                 public SVGURIReference,
                                 public SVGTests,
                                 public SVGExternalResourcesRequired,
diff --git a/Source/core/svg/SVGPatternElement.idl b/Source/core/svg/SVGPatternElement.idl
index 390fcb6..55aa2e9 100644
--- a/Source/core/svg/SVGPatternElement.idl
+++ b/Source/core/svg/SVGPatternElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGPatternElement : SVGStyledElement {
+interface SVGPatternElement : SVGElement {
     readonly attribute SVGAnimatedEnumeration   patternUnits;
     readonly attribute SVGAnimatedEnumeration   patternContentUnits;
     readonly attribute SVGAnimatedTransformList patternTransform;
diff --git a/Source/core/svg/SVGPointList.cpp b/Source/core/svg/SVGPointList.cpp
index af92a76..10013e6 100644
--- a/Source/core/svg/SVGPointList.cpp
+++ b/Source/core/svg/SVGPointList.cpp
@@ -19,12 +19,11 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGPointList.h"
 
 #include "core/platform/graphics/FloatPoint.h"
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/text/StringBuilder.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPointList.h b/Source/core/svg/SVGPointList.h
index 7b7ffd6..a745b10 100644
--- a/Source/core/svg/SVGPointList.h
+++ b/Source/core/svg/SVGPointList.h
@@ -23,7 +23,7 @@
 
 #include "core/svg/SVGPoint.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGPreserveAspectRatio.cpp b/Source/core/svg/SVGPreserveAspectRatio.cpp
index 5156336..546c83b 100644
--- a/Source/core/svg/SVGPreserveAspectRatio.cpp
+++ b/Source/core/svg/SVGPreserveAspectRatio.cpp
@@ -20,14 +20,13 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGPreserveAspectRatio.h"
 
 #include "core/dom/ExceptionCode.h"
 #include "core/platform/graphics/FloatRect.h"
 #include "core/platform/graphics/transforms/AffineTransform.h"
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGRadialGradientElement.cpp b/Source/core/svg/SVGRadialGradientElement.cpp
index dc14c64..1a2bfb8 100644
--- a/Source/core/svg/SVGRadialGradientElement.cpp
+++ b/Source/core/svg/SVGRadialGradientElement.cpp
@@ -126,7 +126,7 @@
 
 RenderObject* SVGRadialGradientElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGResourceRadialGradient(this);
+    return new RenderSVGResourceRadialGradient(this);
 }
 
 bool SVGRadialGradientElement::collectGradientAttributes(RadialGradientAttributes& attributes)
diff --git a/Source/core/svg/SVGRect.h b/Source/core/svg/SVGRect.h
index 7430757..a5c2212 100644
--- a/Source/core/svg/SVGRect.h
+++ b/Source/core/svg/SVGRect.h
@@ -22,7 +22,7 @@
 
 #include "core/platform/graphics/FloatRect.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGRectElement.cpp b/Source/core/svg/SVGRectElement.cpp
index 85b4a4f..6838a48 100644
--- a/Source/core/svg/SVGRectElement.cpp
+++ b/Source/core/svg/SVGRectElement.cpp
@@ -160,7 +160,7 @@
 
 RenderObject* SVGRectElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGRect(this);
+    return new RenderSVGRect(this);
 }
 
 }
diff --git a/Source/core/svg/SVGRenderingIntent.h b/Source/core/svg/SVGRenderingIntent.h
index 11ce4d3..850770d 100644
--- a/Source/core/svg/SVGRenderingIntent.h
+++ b/Source/core/svg/SVGRenderingIntent.h
@@ -20,8 +20,7 @@
 #ifndef SVGRenderingIntent_h
 #define SVGRenderingIntent_h
 
-
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index c4e17b1..ffaaef5 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -54,7 +54,7 @@
 #include "core/svg/SVGViewElement.h"
 #include "core/svg/SVGViewSpec.h"
 #include "core/svg/animation/SMILTimeContainer.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
@@ -479,9 +479,9 @@
 RenderObject* SVGSVGElement::createRenderer(RenderStyle*)
 {
     if (isOutermostSVGSVGElement())
-        return new (document()->renderArena()) RenderSVGRoot(this);
+        return new RenderSVGRoot(this);
 
-    return new (document()->renderArena()) RenderSVGViewportContainer(this);
+    return new RenderSVGViewportContainer(this);
 }
 
 Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* rootParent)
diff --git a/Source/core/svg/SVGScriptElement.h b/Source/core/svg/SVGScriptElement.h
index 667725c..b5529f0 100644
--- a/Source/core/svg/SVGScriptElement.h
+++ b/Source/core/svg/SVGScriptElement.h
@@ -75,6 +75,7 @@
     virtual void dispatchLoadEvent() { SVGExternalResourcesRequired::dispatchLoadEvent(this); }
 
     virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 
     // SVGExternalResourcesRequired
     virtual void setHaveFiredLoadEvent(bool) OVERRIDE;
diff --git a/Source/core/svg/SVGStopElement.cpp b/Source/core/svg/SVGStopElement.cpp
index 397ea20..23883c1 100644
--- a/Source/core/svg/SVGStopElement.cpp
+++ b/Source/core/svg/SVGStopElement.cpp
@@ -34,11 +34,11 @@
 
 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGStopElement)
     REGISTER_LOCAL_ANIMATED_PROPERTY(offset)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_offset(0)
 {
     ASSERT(hasTagName(SVGNames::stopTag));
@@ -62,7 +62,7 @@
 void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (!isSupportedAttribute(name)) {
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
         return;
     }
 
@@ -80,7 +80,7 @@
 void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -99,7 +99,7 @@
 
 RenderObject* SVGStopElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGGradientStop(this);
+    return new RenderSVGGradientStop(this);
 }
 
 bool SVGStopElement::rendererIsNeeded(const NodeRenderingContext&)
diff --git a/Source/core/svg/SVGStopElement.h b/Source/core/svg/SVGStopElement.h
index 7094a91..a19d928 100644
--- a/Source/core/svg/SVGStopElement.h
+++ b/Source/core/svg/SVGStopElement.h
@@ -22,11 +22,11 @@
 #define SVGStopElement_h
 
 #include "core/svg/SVGAnimatedNumber.h"
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-class SVGStopElement FINAL : public SVGStyledElement {
+class SVGStopElement FINAL : public SVGElement {
 public:
     static PassRefPtr<SVGStopElement> create(const QualifiedName&, Document*);
 
diff --git a/Source/core/svg/SVGStopElement.idl b/Source/core/svg/SVGStopElement.idl
index 63f6411..44da1f9 100644
--- a/Source/core/svg/SVGStopElement.idl
+++ b/Source/core/svg/SVGStopElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGStopElement : SVGStyledElement {
+interface SVGStopElement : SVGElement {
     readonly attribute SVGAnimatedNumber offset;
 };
 
diff --git a/Source/core/svg/SVGStringList.cpp b/Source/core/svg/SVGStringList.cpp
index 7b87a42..c8ff9df 100644
--- a/Source/core/svg/SVGStringList.cpp
+++ b/Source/core/svg/SVGStringList.cpp
@@ -19,12 +19,11 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGStringList.h"
 
 #include "core/svg/SVGElement.h"
 #include "core/svg/SVGParserUtilities.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGStringList.h b/Source/core/svg/SVGStringList.h
index 3f75417..53e398e 100644
--- a/Source/core/svg/SVGStringList.h
+++ b/Source/core/svg/SVGStringList.h
@@ -23,7 +23,7 @@
 
 #include "core/dom/QualifiedName.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGStyleElement.cpp b/Source/core/svg/SVGStyleElement.cpp
index 8da1dc8..1ae0149 100644
--- a/Source/core/svg/SVGStyleElement.cpp
+++ b/Source/core/svg/SVGStyleElement.cpp
@@ -21,12 +21,11 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGStyleElement.h"
 
 #include "SVGNames.h"
 #include "core/css/CSSStyleSheet.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGStyleElement.h b/Source/core/svg/SVGStyleElement.h
index 788110d..17f89d7 100644
--- a/Source/core/svg/SVGStyleElement.h
+++ b/Source/core/svg/SVGStyleElement.h
@@ -57,6 +57,7 @@
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual void finishParsingChildren();
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
 
     virtual bool isLoading() const { return StyleElement::isLoading(); }
     virtual bool sheetLoaded() { return StyleElement::sheetLoaded(document()); }
diff --git a/Source/core/svg/SVGStyledElement.cpp b/Source/core/svg/SVGStyledElement.cpp
deleted file mode 100644
index 03a7bdf..0000000
--- a/Source/core/svg/SVGStyledElement.cpp
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2007, 2008 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-
-#include "core/svg/SVGStyledElement.h"
-
-#include "HTMLNames.h"
-#include "SVGNames.h"
-#include "core/css/CSSParser.h"
-#include "core/dom/Attr.h"
-#include "core/dom/Document.h"
-#include "core/dom/EventNames.h"
-#include "core/dom/NodeTraversal.h"
-#include "core/dom/shadow/ShadowRoot.h"
-#include "core/rendering/RenderObject.h"
-#include "core/rendering/style/SVGRenderStyle.h"
-#include "core/rendering/svg/RenderSVGResource.h"
-#include "core/rendering/svg/RenderSVGResourceClipper.h"
-#include "core/rendering/svg/RenderSVGResourceFilter.h"
-#include "core/rendering/svg/RenderSVGResourceMasker.h"
-#include "core/rendering/svg/SVGRenderSupport.h"
-#include "core/svg/SVGElement.h"
-#include "core/svg/SVGElementInstance.h"
-#include "core/svg/SVGElementRareData.h"
-#include "core/svg/SVGSVGElement.h"
-#include "core/svg/SVGUseElement.h"
-#include <wtf/Assertions.h>
-#include <wtf/HashMap.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGStyledElement, HTMLNames::classAttr, ClassName, className)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGStyledElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(className)
-END_REGISTER_ANIMATED_PROPERTIES
-
-using namespace SVGNames;
-
-void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName)
-{
-    // FIXME: when CSS supports "transform-origin" the special case for transform_originAttr can be removed.
-    CSSPropertyID propertyId = cssPropertyID(attrName.localName());
-    if (!propertyId && attrName == transform_originAttr)
-        propertyId = CSSPropertyWebkitTransformOrigin; // cssPropertyID("-webkit-transform-origin")
-    ASSERT(propertyId > 0);
-    propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
-}
-
-SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* document, ConstructionType constructionType)
-    : SVGElement(tagName, document, constructionType)
-{
-    ScriptWrappable::init(this);
-    registerAnimatedPropertiesForSVGStyledElement();
-}
-
-String SVGStyledElement::title() const
-{
-    // According to spec, we should not return titles when hovering over root <svg> elements (those
-    // <title> elements are the title of the document, not a tooltip) so we instantly return.
-    if (isOutermostSVGSVGElement())
-        return String();
-
-    // Walk up the tree, to find out whether we're inside a <use> shadow tree, to find the right title.
-    if (isInShadowTree()) {
-        Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host();
-        // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do
-        // have should be a use. The assert and following test is here to catch future shadow DOM changes
-        // that do enable SVG in a shadow tree.
-        ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::useTag));
-        if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)) {
-            SVGUseElement* useElement = toSVGUseElement(shadowHostElement);
-
-            // If the <use> title is not empty we found the title to use.
-            String useTitle(useElement->title());
-            if (!useTitle.isEmpty())
-               return useTitle;
-        }
-    }
-
-    // If we aren't an instance in a <use> or the <use> title was not found, then find the first
-    // <title> child of this element.
-    Element* titleElement = ElementTraversal::firstWithin(this);
-    for (; titleElement; titleElement = ElementTraversal::nextSkippingChildren(titleElement, this)) {
-        if (titleElement->hasTagName(SVGNames::titleTag) && titleElement->isSVGElement())
-            break;
-    }
-
-    // If a title child was found, return the text contents.
-    if (titleElement)
-        return titleElement->innerText();
-
-    // Otherwise return a null/empty string.
-    return String();
-}
-
-bool SVGStyledElement::rendererIsNeeded(const NodeRenderingContext& context)
-{
-    // http://www.w3.org/TR/SVG/extend.html#PrivateData
-    // Prevent anything other than SVG renderers from appearing in our render tree
-    // Spec: SVG allows inclusion of elements from foreign namespaces anywhere
-    // with the SVG content. In general, the SVG user agent will include the unknown
-    // elements in the DOM but will otherwise ignore unknown elements.
-    if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement())
-        return Element::rendererIsNeeded(context);
-
-    return false;
-}
-
-CSSPropertyID SVGStyledElement::cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
-{
-    if (!attrName.namespaceURI().isNull())
-        return CSSPropertyInvalid;
-
-    static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0;
-    if (!propertyNameToIdMap) {
-        propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>;
-        // This is a list of all base CSS and SVG CSS properties which are exposed as SVG XML attributes
-        mapAttributeToCSSProperty(propertyNameToIdMap, alignment_baselineAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, baseline_shiftAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, buffered_renderingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, clipAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, clip_pathAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, clip_ruleAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::colorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolationAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, color_interpolation_filtersAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, color_profileAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, color_renderingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, cursorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, SVGNames::directionAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, displayAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, dominant_baselineAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, enable_backgroundAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, fillAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, fill_opacityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, fill_ruleAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, filterAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, flood_colorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, flood_opacityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, font_weightAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_horizontalAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, glyph_orientation_verticalAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, image_renderingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, kerningAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, letter_spacingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, lighting_colorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, marker_endAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, marker_midAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, marker_startAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, maskAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, mask_typeAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, opacityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, overflowAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, pointer_eventsAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, shape_renderingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stop_colorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stop_opacityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, strokeAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dasharrayAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_dashoffsetAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linecapAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_linejoinAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_miterlimitAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_opacityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, stroke_widthAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, text_anchorAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, text_decorationAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, text_renderingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, transform_originAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, unicode_bidiAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, vector_effectAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, visibilityAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, word_spacingAttr);
-        mapAttributeToCSSProperty(propertyNameToIdMap, writing_modeAttr);
-    }
-
-    return propertyNameToIdMap->get(attrName.localName().impl());
-}
-
-typedef HashMap<QualifiedName, AnimatedPropertyType> AttributeToPropertyTypeMap;
-static inline AttributeToPropertyTypeMap& cssPropertyToTypeMap()
-{
-    DEFINE_STATIC_LOCAL(AttributeToPropertyTypeMap, s_cssPropertyMap, ());
-
-    if (!s_cssPropertyMap.isEmpty())
-        return s_cssPropertyMap;
-
-    // Fill the map for the first use.
-    s_cssPropertyMap.set(alignment_baselineAttr, AnimatedString);
-    s_cssPropertyMap.set(baseline_shiftAttr, AnimatedString);
-    s_cssPropertyMap.set(buffered_renderingAttr, AnimatedString);
-    s_cssPropertyMap.set(clipAttr, AnimatedRect);
-    s_cssPropertyMap.set(clip_pathAttr, AnimatedString);
-    s_cssPropertyMap.set(clip_ruleAttr, AnimatedString);
-    s_cssPropertyMap.set(SVGNames::colorAttr, AnimatedColor);
-    s_cssPropertyMap.set(color_interpolationAttr, AnimatedString);
-    s_cssPropertyMap.set(color_interpolation_filtersAttr, AnimatedString);
-    s_cssPropertyMap.set(color_profileAttr, AnimatedString);
-    s_cssPropertyMap.set(color_renderingAttr, AnimatedString);
-    s_cssPropertyMap.set(cursorAttr, AnimatedString);
-    s_cssPropertyMap.set(displayAttr, AnimatedString);
-    s_cssPropertyMap.set(dominant_baselineAttr, AnimatedString);
-    s_cssPropertyMap.set(fillAttr, AnimatedColor);
-    s_cssPropertyMap.set(fill_opacityAttr, AnimatedNumber);
-    s_cssPropertyMap.set(fill_ruleAttr, AnimatedString);
-    s_cssPropertyMap.set(filterAttr, AnimatedString);
-    s_cssPropertyMap.set(flood_colorAttr, AnimatedColor);
-    s_cssPropertyMap.set(flood_opacityAttr, AnimatedNumber);
-    s_cssPropertyMap.set(font_familyAttr, AnimatedString);
-    s_cssPropertyMap.set(font_sizeAttr, AnimatedLength);
-    s_cssPropertyMap.set(font_stretchAttr, AnimatedString);
-    s_cssPropertyMap.set(font_styleAttr, AnimatedString);
-    s_cssPropertyMap.set(font_variantAttr, AnimatedString);
-    s_cssPropertyMap.set(font_weightAttr, AnimatedString);
-    s_cssPropertyMap.set(image_renderingAttr, AnimatedString);
-    s_cssPropertyMap.set(kerningAttr, AnimatedLength);
-    s_cssPropertyMap.set(letter_spacingAttr, AnimatedLength);
-    s_cssPropertyMap.set(lighting_colorAttr, AnimatedColor);
-    s_cssPropertyMap.set(marker_endAttr, AnimatedString);
-    s_cssPropertyMap.set(marker_midAttr, AnimatedString);
-    s_cssPropertyMap.set(marker_startAttr, AnimatedString);
-    s_cssPropertyMap.set(maskAttr, AnimatedString);
-    s_cssPropertyMap.set(mask_typeAttr, AnimatedString);
-    s_cssPropertyMap.set(opacityAttr, AnimatedNumber);
-    s_cssPropertyMap.set(overflowAttr, AnimatedString);
-    s_cssPropertyMap.set(pointer_eventsAttr, AnimatedString);
-    s_cssPropertyMap.set(shape_renderingAttr, AnimatedString);
-    s_cssPropertyMap.set(stop_colorAttr, AnimatedColor);
-    s_cssPropertyMap.set(stop_opacityAttr, AnimatedNumber);
-    s_cssPropertyMap.set(strokeAttr, AnimatedColor);
-    s_cssPropertyMap.set(stroke_dasharrayAttr, AnimatedLengthList);
-    s_cssPropertyMap.set(stroke_dashoffsetAttr, AnimatedLength);
-    s_cssPropertyMap.set(stroke_linecapAttr, AnimatedString);
-    s_cssPropertyMap.set(stroke_linejoinAttr, AnimatedString);
-    s_cssPropertyMap.set(stroke_miterlimitAttr, AnimatedNumber);
-    s_cssPropertyMap.set(stroke_opacityAttr, AnimatedNumber);
-    s_cssPropertyMap.set(stroke_widthAttr, AnimatedLength);
-    s_cssPropertyMap.set(text_anchorAttr, AnimatedString);
-    s_cssPropertyMap.set(text_decorationAttr, AnimatedString);
-    s_cssPropertyMap.set(text_renderingAttr, AnimatedString);
-    s_cssPropertyMap.set(vector_effectAttr, AnimatedString);
-    s_cssPropertyMap.set(visibilityAttr, AnimatedString);
-    s_cssPropertyMap.set(word_spacingAttr, AnimatedLength);
-    return s_cssPropertyMap;
-}
-
-void SVGStyledElement::animatedPropertyTypeForAttribute(const QualifiedName& attrName, Vector<AnimatedPropertyType>& propertyTypes)
-{
-    SVGElement::animatedPropertyTypeForAttribute(attrName, propertyTypes);
-    if (!propertyTypes.isEmpty())
-        return;
-
-    AttributeToPropertyTypeMap& cssPropertyTypeMap = cssPropertyToTypeMap();
-    if (cssPropertyTypeMap.contains(attrName))
-        propertyTypes.append(cssPropertyTypeMap.get(attrName));
-}
-
-bool SVGStyledElement::isAnimatableCSSProperty(const QualifiedName& attrName)
-{
-    return cssPropertyToTypeMap().contains(attrName);
-}
-
-bool SVGStyledElement::isPresentationAttribute(const QualifiedName& name) const
-{
-    if (SVGStyledElement::cssPropertyIdForSVGAttributeName(name) > 0)
-        return true;
-    return SVGElement::isPresentationAttribute(name);
-}
-
-void SVGStyledElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
-{
-    CSSPropertyID propertyID = SVGStyledElement::cssPropertyIdForSVGAttributeName(name);
-    if (propertyID > 0)
-        addPropertyToPresentationAttributeStyle(style, propertyID, value);
-}
-
-void SVGStyledElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
-{
-    // SVG animation has currently requires special storage of values so we set
-    // the className here.  svgAttributeChanged actually causes the resulting
-    // style updates (instead of Element::parseAttribute). We don't
-    // tell Element about the change to avoid parsing the class list twice
-    if (name == HTMLNames::classAttr) {
-        setClassNameBaseValue(value);
-        return;
-    }
-
-    // id is handled by Element which SVGElement inherits from
-    SVGElement::parseAttribute(name, value);
-}
-
-bool SVGStyledElement::isKnownAttribute(const QualifiedName& attrName)
-{
-    return isIdAttributeName(attrName);
-}
-
-void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
-{
-    CSSPropertyID propId = SVGStyledElement::cssPropertyIdForSVGAttributeName(attrName);
-    if (propId > 0) {
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
-        return;
-    }
-
-    if (attrName == HTMLNames::classAttr) {
-        classAttributeChanged(classNameCurrentValue());
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
-        return;
-    }
-
-    if (isIdAttributeName(attrName)) {
-        RenderObject* object = renderer();
-        // Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
-        if (object && object->isSVGResourceContainer())
-            object->toRenderSVGResourceContainer()->idChanged();
-        if (inDocument())
-            buildPendingResourcesIfNeeded();
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
-        return;
-    }
-}
-
-Node::InsertionNotificationRequest SVGStyledElement::insertedInto(ContainerNode* rootParent)
-{
-    SVGElement::insertedInto(rootParent);
-    updateRelativeLengthsInformation();
-    buildPendingResourcesIfNeeded();
-    return InsertionDone;
-}
-
-void SVGStyledElement::buildPendingResourcesIfNeeded()
-{
-    Document* document = this->document();
-    if (!needsPendingResourceHandling() || !document || !inDocument() || isInShadowTree())
-        return;
-
-    SVGDocumentExtensions* extensions = document->accessSVGExtensions();
-    String resourceId = getIdAttribute();
-    if (!extensions->hasPendingResource(resourceId))
-        return;
-
-    // Mark pending resources as pending for removal.
-    extensions->markPendingResourcesForRemoval(resourceId);
-
-    // Rebuild pending resources for each client of a pending resource that is being removed.
-    while (Element* clientElement = extensions->removeElementFromPendingResourcesForRemoval(resourceId)) {
-        ASSERT(clientElement->hasPendingResources());
-        if (clientElement->hasPendingResources()) {
-            clientElement->buildPendingResource();
-            extensions->clearHasPendingResourcesIfPossible(clientElement);
-        }
-    }
-}
-
-void SVGStyledElement::removedFrom(ContainerNode* rootParent)
-{
-    if (rootParent->inDocument())
-        updateRelativeLengthsInformation(false, this);
-    SVGElement::removedFrom(rootParent);
-    SVGElementInstance::invalidateAllInstancesOfElement(this);
-}
-
-void SVGStyledElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
-{
-    SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
-
-    // Invalidate all SVGElementInstances associated with us
-    if (!changedByParser)
-        SVGElementInstance::invalidateAllInstancesOfElement(this);
-}
-
-PassRefPtr<CSSValue> SVGStyledElement::getPresentationAttribute(const String& name)
-{
-    if (!hasAttributesWithoutUpdate())
-        return 0;
-
-    QualifiedName attributeName(nullAtom, name, nullAtom);
-    const Attribute* attr = getAttributeItem(attributeName);
-    if (!attr)
-        return 0;
-
-    RefPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(SVGAttributeMode);
-    CSSPropertyID propertyID = SVGStyledElement::cssPropertyIdForSVGAttributeName(attr->name());
-    style->setProperty(propertyID, attr->value());
-    RefPtr<CSSValue> cssValue = style->getPropertyCSSValue(propertyID);
-    return cssValue ? cssValue->cloneForCSSOM() : 0;
-}
-
-bool SVGStyledElement::instanceUpdatesBlocked() const
-{
-    return hasSVGRareData() && svgRareData()->instanceUpdatesBlocked();
-}
-
-void SVGStyledElement::setInstanceUpdatesBlocked(bool value)
-{
-    if (hasSVGRareData())
-        svgRareData()->setInstanceUpdatesBlocked(value);
-}
-
-AffineTransform SVGStyledElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const
-{
-    // To be overriden by SVGStyledLocatableElement/SVGGraphicsElement (or as special case SVGTextElement and SVGPatternElement)
-    return AffineTransform();
-}
-
-void SVGStyledElement::updateRelativeLengthsInformation(bool hasRelativeLengths, SVGStyledElement* element)
-{
-    // If we're not yet in a document, this function will be called again from insertedInto(). Do nothing now.
-    if (!inDocument())
-        return;
-
-    // An element wants to notify us that its own relative lengths state changed.
-    // Register it in the relative length map, and register us in the parent relative length map.
-    // Register the parent in the grandparents map, etc. Repeat procedure until the root of the SVG tree.
-
-    if (hasRelativeLengths)
-        m_elementsWithRelativeLengths.add(element);
-    else {
-        if (!m_elementsWithRelativeLengths.contains(element)) {
-            // We were never registered. Do nothing.
-            return;
-        }
-
-        m_elementsWithRelativeLengths.remove(element);
-    }
-
-    // Find first styled parent node, and notify it that we've changed our relative length state.
-    ContainerNode* node = parentNode();
-    while (node) {
-        if (!node->isSVGElement())
-            break;
-
-        SVGElement* element = toSVGElement(node);
-        if (!element->isSVGStyledElement()) {
-            node = node->parentNode();
-            continue;
-        }
-
-        // Register us in the parent element map.
-        toSVGStyledElement(element)->updateRelativeLengthsInformation(hasRelativeLengths, this);
-        break;
-    }
-}
-
-}
diff --git a/Source/core/svg/SVGStyledElement.h b/Source/core/svg/SVGStyledElement.h
deleted file mode 100644
index 863af84..0000000
--- a/Source/core/svg/SVGStyledElement.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef SVGStyledElement_h
-#define SVGStyledElement_h
-
-#include "CSSPropertyNames.h"
-#include "core/svg/SVGAnimatedString.h"
-#include "core/svg/SVGElement.h"
-#include "core/svg/SVGLocatable.h"
-#include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
-
-namespace WebCore {
-
-void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
-
-class CSSValue;
-class CSSStyleDeclaration;
-
-// FIXME(webkit.org/b/107386): SVGStyledElement should be merged into SVGElement as specified by SVG2.
-class SVGStyledElement : public SVGElement {
-public:
-    virtual String title() const;
-
-    bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
-
-    virtual bool supportsMarkers() const { return false; }
-
-    PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
-
-    bool isKnownAttribute(const QualifiedName&);
-
-    bool instanceUpdatesBlocked() const;
-    void setInstanceUpdatesBlocked(bool);
-
-    virtual void animatedPropertyTypeForAttribute(const QualifiedName&, Vector<AnimatedPropertyType>&);
-    static bool isAnimatableCSSProperty(const QualifiedName&);
-
-    virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
-
-    virtual bool needsPendingResourceHandling() const { return true; }
-
-protected:
-    SVGStyledElement(const QualifiedName&, Document*, ConstructionType = CreateSVGElement);
-    virtual bool rendererIsNeeded(const NodeRenderingContext&);
-
-    virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
-    virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
-    virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
-
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
-    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-
-    static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
-    void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
-    void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGStyledElement*);
-
-    virtual bool selfHasRelativeLengths() const { return false; }
-
-private:
-    virtual bool isSVGStyledElement() const OVERRIDE { return true; }
-
-    void buildPendingResourcesIfNeeded();
-
-    HashSet<SVGStyledElement*> m_elementsWithRelativeLengths;
-
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGStyledElement)
-        DECLARE_ANIMATED_STRING(ClassName, className)
-    END_DECLARE_ANIMATED_PROPERTIES
-};
-
-inline SVGStyledElement* toSVGStyledElement(Node* node)
-{
-    ASSERT_WITH_SECURITY_IMPLICATION(!node || (node->isStyledElement() && node->isSVGElement()));
-    return static_cast<SVGStyledElement*>(node);
-}
-
-} // namespace WebCore
-
-#endif // SVGStyledElement
diff --git a/Source/core/svg/SVGStyledElement.idl b/Source/core/svg/SVGStyledElement.idl
deleted file mode 100644
index 3b7ee61..0000000
--- a/Source/core/svg/SVGStyledElement.idl
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
- * Copyright (C) 2007 Rob Buis <rwlbuis@gmail.com>
- * Copyright (C) 2006 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    NoInterfaceObject
-] interface SVGStyledElement : SVGElement {
-    readonly attribute SVGAnimatedString className;
-    readonly attribute CSSStyleDeclaration style;
-
-    CSSValue getPresentationAttribute([Default=Undefined] optional DOMString name);
-};
-
diff --git a/Source/core/svg/SVGSwitchElement.cpp b/Source/core/svg/SVGSwitchElement.cpp
index 99931e9..c1ef2a6 100644
--- a/Source/core/svg/SVGSwitchElement.cpp
+++ b/Source/core/svg/SVGSwitchElement.cpp
@@ -72,7 +72,7 @@
 
 RenderObject* SVGSwitchElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGTransformableContainer(this);
+    return new RenderSVGTransformableContainer(this);
 }
 
 }
diff --git a/Source/core/svg/SVGSymbolElement.cpp b/Source/core/svg/SVGSymbolElement.cpp
index fb63821..acbb57f 100644
--- a/Source/core/svg/SVGSymbolElement.cpp
+++ b/Source/core/svg/SVGSymbolElement.cpp
@@ -38,11 +38,11 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
     REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
     REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::symbolTag));
     ScriptWrappable::init(this);
@@ -67,7 +67,7 @@
 void SVGSymbolElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (!isSupportedAttribute(name)) {
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
         return;
     }
 
@@ -82,7 +82,7 @@
 void SVGSymbolElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     if (!isSupportedAttribute(attrName)) {
-        SVGStyledElement::svgAttributeChanged(attrName);
+        SVGElement::svgAttributeChanged(attrName);
         return;
     }
 
@@ -100,7 +100,7 @@
 
 RenderObject* SVGSymbolElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGHiddenContainer(this);
+    return new RenderSVGHiddenContainer(this);
 }
 
 }
diff --git a/Source/core/svg/SVGSymbolElement.h b/Source/core/svg/SVGSymbolElement.h
index a7eea44..a5a1068 100644
--- a/Source/core/svg/SVGSymbolElement.h
+++ b/Source/core/svg/SVGSymbolElement.h
@@ -24,13 +24,13 @@
 #include "core/svg/SVGAnimatedBoolean.h"
 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
 #include "core/svg/SVGAnimatedRect.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
 #include "core/svg/SVGFitToViewBox.h"
-#include "core/svg/SVGStyledElement.h"
 
 namespace WebCore {
 
-class SVGSymbolElement FINAL : public SVGStyledElement,
+class SVGSymbolElement FINAL : public SVGElement,
                                public SVGExternalResourcesRequired,
                                public SVGFitToViewBox {
 public:
@@ -44,6 +44,7 @@
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&);
+
     virtual RenderObject* createRenderer(RenderStyle*);
 
     virtual bool selfHasRelativeLengths() const;
diff --git a/Source/core/svg/SVGSymbolElement.idl b/Source/core/svg/SVGSymbolElement.idl
index 4a69122..aeb7d80 100644
--- a/Source/core/svg/SVGSymbolElement.idl
+++ b/Source/core/svg/SVGSymbolElement.idl
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGSymbolElement : SVGStyledElement {
+interface SVGSymbolElement : SVGElement {
 };
 
 SVGSymbolElement implements SVGExternalResourcesRequired;
diff --git a/Source/core/svg/SVGTRefElement.cpp b/Source/core/svg/SVGTRefElement.cpp
index 4e69339..8dfa40f 100644
--- a/Source/core/svg/SVGTRefElement.cpp
+++ b/Source/core/svg/SVGTRefElement.cpp
@@ -215,7 +215,7 @@
 
 RenderObject* SVGTRefElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGInline(this);
+    return new RenderSVGInline(this);
 }
 
 bool SVGTRefElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
@@ -270,7 +270,7 @@
 
 Node::InsertionNotificationRequest SVGTRefElement::insertedInto(ContainerNode* rootParent)
 {
-    SVGStyledElement::insertedInto(rootParent);
+    SVGElement::insertedInto(rootParent);
     if (rootParent->inDocument())
         buildPendingResource();
     return InsertionDone;
@@ -278,7 +278,7 @@
 
 void SVGTRefElement::removedFrom(ContainerNode* rootParent)
 {
-    SVGStyledElement::removedFrom(rootParent);
+    SVGElement::removedFrom(rootParent);
     if (rootParent->inDocument())
         m_targetListener->detach();
 }
diff --git a/Source/core/svg/SVGTSpanElement.cpp b/Source/core/svg/SVGTSpanElement.cpp
index 89bb9ec..44f3490 100644
--- a/Source/core/svg/SVGTSpanElement.cpp
+++ b/Source/core/svg/SVGTSpanElement.cpp
@@ -42,7 +42,7 @@
 
 RenderObject* SVGTSpanElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGTSpan(this);
+    return new RenderSVGTSpan(this);
 }
 
 bool SVGTSpanElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/svg/SVGTests.h b/Source/core/svg/SVGTests.h
index 2b2d6a2..9350a15 100644
--- a/Source/core/svg/SVGTests.h
+++ b/Source/core/svg/SVGTests.h
@@ -23,6 +23,7 @@
 
 #include "core/svg/SVGStringList.h"
 #include "core/svg/properties/SVGAnimatedPropertyMacros.h"
+#include "wtf/HashSet.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGTextElement.cpp b/Source/core/svg/SVGTextElement.cpp
index ef3a4a3..fef8f16 100644
--- a/Source/core/svg/SVGTextElement.cpp
+++ b/Source/core/svg/SVGTextElement.cpp
@@ -69,7 +69,7 @@
 
 RenderObject* SVGTextElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGText(this);
+    return new RenderSVGText(this);
 }
 
 bool SVGTextElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/svg/SVGTextPathElement.cpp b/Source/core/svg/SVGTextPathElement.cpp
index e0f85cb..dbba619 100644
--- a/Source/core/svg/SVGTextPathElement.cpp
+++ b/Source/core/svg/SVGTextPathElement.cpp
@@ -130,7 +130,7 @@
 
 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGTextPath(this);
+    return new RenderSVGTextPath(this);
 }
 
 bool SVGTextPathElement::childShouldCreateRenderer(const NodeRenderingContext& childContext) const
diff --git a/Source/core/svg/SVGTitleElement.cpp b/Source/core/svg/SVGTitleElement.cpp
index 7d7333a..e9e8232 100644
--- a/Source/core/svg/SVGTitleElement.cpp
+++ b/Source/core/svg/SVGTitleElement.cpp
@@ -27,7 +27,7 @@
 namespace WebCore {
 
 inline SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::titleTag));
     ScriptWrappable::init(this);
@@ -40,7 +40,7 @@
 
 Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode* rootParent)
 {
-    SVGStyledElement::insertedInto(rootParent);
+    SVGElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
         return InsertionDone;
     if (firstChild())
diff --git a/Source/core/svg/SVGTitleElement.h b/Source/core/svg/SVGTitleElement.h
index 0edbc54..ab513b6 100644
--- a/Source/core/svg/SVGTitleElement.h
+++ b/Source/core/svg/SVGTitleElement.h
@@ -21,11 +21,11 @@
 #ifndef SVGTitleElement_h
 #define SVGTitleElement_h
 
-#include "core/svg/SVGStyledElement.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-class SVGTitleElement FINAL : public SVGStyledElement {
+class SVGTitleElement FINAL : public SVGElement {
 public:
     static PassRefPtr<SVGTitleElement> create(const QualifiedName&, Document*);
 
diff --git a/Source/core/svg/SVGTitleElement.idl b/Source/core/svg/SVGTitleElement.idl
index cd3adf9..4894221 100644
--- a/Source/core/svg/SVGTitleElement.idl
+++ b/Source/core/svg/SVGTitleElement.idl
@@ -23,6 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-interface SVGTitleElement : SVGStyledElement {
+interface SVGTitleElement : SVGElement {
 };
 
diff --git a/Source/core/svg/SVGTransform.cpp b/Source/core/svg/SVGTransform.cpp
index f12ec47..18324a8 100644
--- a/Source/core/svg/SVGTransform.cpp
+++ b/Source/core/svg/SVGTransform.cpp
@@ -19,15 +19,14 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGTransform.h"
 
 #include "core/platform/FloatConversion.h"
 #include "core/platform/graphics/FloatPoint.h"
 #include "core/platform/graphics/FloatSize.h"
-#include <wtf/MathExtras.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/MathExtras.h"
+#include "wtf/text/StringBuilder.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGTransformList.cpp b/Source/core/svg/SVGTransformList.cpp
index 1567a2c..3d3e58f 100644
--- a/Source/core/svg/SVGTransformList.cpp
+++ b/Source/core/svg/SVGTransformList.cpp
@@ -19,14 +19,13 @@
  */
 
 #include "config.h"
-
 #include "core/svg/SVGTransformList.h"
 
 #include "core/platform/graphics/transforms/AffineTransform.h"
 #include "core/svg/SVGSVGElement.h"
 #include "core/svg/SVGTransform.h"
 #include "core/svg/SVGTransformable.h"
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGTransformList.h b/Source/core/svg/SVGTransformList.h
index 0669871..4904a88 100644
--- a/Source/core/svg/SVGTransformList.h
+++ b/Source/core/svg/SVGTransformList.h
@@ -23,7 +23,7 @@
 
 #include "core/svg/SVGTransform.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGTransformable.h b/Source/core/svg/SVGTransformable.h
index 53fd361..f060545 100644
--- a/Source/core/svg/SVGTransformable.h
+++ b/Source/core/svg/SVGTransformable.h
@@ -23,7 +23,7 @@
 
 #include "core/svg/SVGLocatable.h"
 #include "core/svg/SVGTransform.h"
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/SVGUnitTypes.h b/Source/core/svg/SVGUnitTypes.h
index 2050a52..3920519 100644
--- a/Source/core/svg/SVGUnitTypes.h
+++ b/Source/core/svg/SVGUnitTypes.h
@@ -21,7 +21,7 @@
 #define SVGUnitTypes_h
 
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
 
 namespace WebCore {
 
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/svg/SVGUnknownElement.cpp
similarity index 70%
copy from Source/core/platform/graphics/chromium/ImageChromium.cpp
copy to Source/core/svg/SVGUnknownElement.cpp
index 0466042..ecc0d2f 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/svg/SVGUnknownElement.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -29,26 +29,13 @@
  */
 
 #include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
-
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
+#include "core/svg/SVGUnknownElement.h"
 
 namespace WebCore {
 
-// Other Image methods are implemented in ImageSkia.cpp
-
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
+SVGUnknownElement::SVGUnknownElement(const QualifiedName& tagName, Document* document)
+    : SVGElement(tagName, document)
 {
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
-
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
 }
 
 } // namespace WebCore
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/svg/SVGUnknownElement.h
similarity index 61%
copy from Source/core/platform/graphics/chromium/ImageChromium.cpp
copy to Source/core/svg/SVGUnknownElement.h
index 0466042..fe8d7e4 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/svg/SVGUnknownElement.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,27 +28,32 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
+#ifndef SVGUnknownElement_h
+#define SVGUnknownElement_h
 
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
+#include "core/svg/SVGElement.h"
 
 namespace WebCore {
 
-// Other Image methods are implemented in ImageSkia.cpp
+// This type is used for 2 kinds of elements:
+// - Unknown Elements in SVG namespace
+// - Registered custom tag elements in SVG namespace (http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements)
+//
+// The main purpose of this class at the moment is to override rendererIsNeeded() to return
+// false to make sure we don't attempt to render such elements.
+class SVGUnknownElement : public SVGElement {
+public:
+    static PassRefPtr<SVGUnknownElement> create(const QualifiedName& tagName, Document* document)
+    {
+        return adoptRef(new SVGUnknownElement(tagName, document));
+    }
 
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
-{
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
+private:
+    SVGUnknownElement(const QualifiedName&, Document*);
 
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
-}
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+};
 
 } // namespace WebCore
+
+#endif // SVGUnknownElement_h
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp
index 7ae5a10..6a1ec89 100644
--- a/Source/core/svg/SVGUseElement.cpp
+++ b/Source/core/svg/SVGUseElement.cpp
@@ -521,7 +521,7 @@
 
 RenderObject* SVGUseElement::createRenderer(RenderStyle*)
 {
-    return new (document()->renderArena()) RenderSVGTransformableContainer(this);
+    return new RenderSVGTransformableContainer(this);
 }
 
 static bool isDirectReference(const Node* node)
@@ -928,10 +928,10 @@
         return false;
 
     SVGElement* element = m_targetElementInstance->correspondingElement();
-    if (!element || !element->isSVGStyledElement())
+    if (!element)
         return false;
 
-    return toSVGStyledElement(element)->hasRelativeLengths();
+    return toSVGElement(element)->hasRelativeLengths();
 }
 
 void SVGUseElement::notifyFinished(Resource* resource)
diff --git a/Source/core/svg/SVGViewElement.cpp b/Source/core/svg/SVGViewElement.cpp
index cc4750f..1f29d8c 100644
--- a/Source/core/svg/SVGViewElement.cpp
+++ b/Source/core/svg/SVGViewElement.cpp
@@ -38,11 +38,11 @@
     REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
     REGISTER_LOCAL_ANIMATED_PROPERTY(viewBox)
     REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGStyledElement)
+    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement)
 END_REGISTER_ANIMATED_PROPERTIES
 
 inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* document)
-    : SVGStyledElement(tagName, document)
+    : SVGElement(tagName, document)
     , m_zoomAndPan(SVGZoomAndPanMagnify)
     , m_viewTarget(SVGNames::viewTargetAttr)
 {
@@ -71,7 +71,7 @@
 void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (!isSupportedAttribute(name)) {
-        SVGStyledElement::parseAttribute(name, value);
+        SVGElement::parseAttribute(name, value);
         return;
     }
 
diff --git a/Source/core/svg/SVGViewElement.h b/Source/core/svg/SVGViewElement.h
index 1bbf358..d2bf387 100644
--- a/Source/core/svg/SVGViewElement.h
+++ b/Source/core/svg/SVGViewElement.h
@@ -24,23 +24,23 @@
 #include "core/svg/SVGAnimatedBoolean.h"
 #include "core/svg/SVGAnimatedPreserveAspectRatio.h"
 #include "core/svg/SVGAnimatedRect.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGExternalResourcesRequired.h"
 #include "core/svg/SVGFitToViewBox.h"
 #include "core/svg/SVGStringList.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGZoomAndPan.h"
 
 namespace WebCore {
 
-class SVGViewElement FINAL : public SVGStyledElement,
+class SVGViewElement FINAL : public SVGElement,
                              public SVGExternalResourcesRequired,
                              public SVGFitToViewBox,
                              public SVGZoomAndPan {
 public:
     static PassRefPtr<SVGViewElement> create(const QualifiedName&, Document*);
 
-    using SVGStyledElement::ref;
-    using SVGStyledElement::deref;
+    using SVGElement::ref;
+    using SVGElement::deref;
 
     SVGStringList& viewTarget() { return m_viewTarget; }
     SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; }
diff --git a/Source/core/svg/SVGZoomAndPan.h b/Source/core/svg/SVGZoomAndPan.h
index 8bc89b8..32759f3 100644
--- a/Source/core/svg/SVGZoomAndPan.h
+++ b/Source/core/svg/SVGZoomAndPan.h
@@ -23,7 +23,7 @@
 
 #include "SVGNames.h"
 #include "core/dom/QualifiedName.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/animation/SMILTime.h b/Source/core/svg/animation/SMILTime.h
index 4ae410b..9ff88c9 100644
--- a/Source/core/svg/animation/SMILTime.h
+++ b/Source/core/svg/animation/SMILTime.h
@@ -27,7 +27,7 @@
 #define SMILTime_h
 
 #include <algorithm>
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp
index 2637f86..a91c96f 100644
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -29,7 +29,7 @@
 #include "core/dom/NodeTraversal.h"
 #include "core/svg/SVGSVGElement.h"
 #include "core/svg/animation/SVGSMILElement.h"
-#include <wtf/CurrentTime.h>
+#include "wtf/CurrentTime.h"
 
 using namespace std;
 
@@ -181,12 +181,12 @@
 
     double now = currentTime();
     m_beginTime = now - time.value();
-
+    m_resumeTime = 0;
     if (m_pauseTime) {
-        m_resumeTime = m_pauseTime = now;
+        m_pauseTime = now;
         m_accumulatedActiveTime = time.value();
     } else {
-        m_resumeTime = 0;
+        m_accumulatedActiveTime = 0;
     }
 
 #ifndef NDEBUG
diff --git a/Source/core/svg/animation/SMILTimeContainer.h b/Source/core/svg/animation/SMILTimeContainer.h
index d48868a..af3fb01 100644
--- a/Source/core/svg/animation/SMILTimeContainer.h
+++ b/Source/core/svg/animation/SMILTimeContainer.h
@@ -29,12 +29,12 @@
 #include "core/dom/QualifiedName.h"
 #include "core/platform/Timer.h"
 #include "core/svg/animation/SMILTime.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/HashMap.h"
+#include "wtf/HashSet.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/text/StringHash.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
index 7d22665..3074000 100644
--- a/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/Source/core/svg/animation/SVGSMILElement.cpp
@@ -36,9 +36,9 @@
 #include "core/svg/SVGSVGElement.h"
 #include "core/svg/SVGURIReference.h"
 #include "core/svg/animation/SMILTimeContainer.h"
-#include <wtf/MathExtras.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/Vector.h>
+#include "wtf/MathExtras.h"
+#include "wtf/StdLibExtras.h"
+#include "wtf/Vector.h"
 
 using namespace std;
 
@@ -1111,7 +1111,7 @@
 
     if (oldActiveState == Active && m_activeState != Active) {
         endedActiveInterval();
-        if (m_activeState != Frozen)
+        if (m_activeState != Frozen && this == resultElement)
             clearAnimatedType(m_targetElement);
     }
 
diff --git a/Source/core/svg/animation/SVGSMILElement.h b/Source/core/svg/animation/SVGSMILElement.h
index a374b27..5d8c403 100644
--- a/Source/core/svg/animation/SVGSMILElement.h
+++ b/Source/core/svg/animation/SVGSMILElement.h
@@ -28,8 +28,7 @@
 
 #include "core/svg/SVGElement.h"
 #include "core/svg/animation/SMILTime.h"
-
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
 
 namespace WebCore {
 
@@ -128,6 +127,8 @@
     void endedActiveInterval();
     virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement* resultElement) = 0;
 
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE { return false; }
+
     enum BeginOrEnd {
         Begin,
         End
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp
index 4abc9fa..3a3fc88 100644
--- a/Source/core/svg/graphics/SVGImage.cpp
+++ b/Source/core/svg/graphics/SVGImage.cpp
@@ -152,7 +152,7 @@
     if (!buffer) // failed to allocate image
         return 0;
 
-    draw(buffer->context(), rect(), rect(), CompositeSourceOver, BlendModeNormal);
+    drawForContainer(buffer->context(), size(), 1, rect(), rect(), CompositeSourceOver, BlendModeNormal);
 
     // FIXME: WK(Bug 113657): We should use DontCopyBackingStore here.
     return buffer->copyImage(CopyBackingStore)->nativeImageForCurrentFrame();
@@ -341,6 +341,7 @@
         m_page->settings()->setMediaEnabled(false);
         m_page->settings()->setScriptEnabled(false);
         m_page->settings()->setPluginsEnabled(false);
+        m_page->settings()->setAcceleratedCompositingEnabled(false);
 
         RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderClient);
         frame->setView(FrameView::create(frame.get()));
diff --git a/Source/core/svg/graphics/SVGImageCache.h b/Source/core/svg/graphics/SVGImageCache.h
index fc478eb..6a793a9 100644
--- a/Source/core/svg/graphics/SVGImageCache.h
+++ b/Source/core/svg/graphics/SVGImageCache.h
@@ -23,9 +23,9 @@
 #include "core/platform/graphics/FloatSize.h"
 #include "core/platform/graphics/Image.h"
 #include "core/platform/graphics/IntSize.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefPtr.h>
+#include "wtf/HashMap.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/graphics/filters/SVGFEImage.cpp b/Source/core/svg/graphics/filters/SVGFEImage.cpp
index c99c51d..c7d753e 100644
--- a/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -33,8 +33,8 @@
 #include "core/rendering/RenderObject.h"
 #include "core/rendering/RenderTreeAsText.h"
 #include "core/rendering/svg/SVGRenderingContext.h"
+#include "core/svg/SVGElement.h"
 #include "core/svg/SVGPreserveAspectRatio.h"
-#include "core/svg/SVGStyledElement.h"
 #include "core/svg/SVGURIReference.h"
 
 namespace WebCore {
@@ -120,7 +120,7 @@
 
     if (renderer) {
         SVGElement* contextNode = toSVGElement(renderer->node());
-        if (contextNode->isSVGStyledElement() && toSVGStyledElement(contextNode)->hasRelativeLengths()) {
+        if (contextNode->hasRelativeLengths()) {
             SVGLengthContext lengthContext(contextNode);
             float width = 0;
             float height = 0;
diff --git a/Source/core/svg/graphics/filters/SVGFilter.h b/Source/core/svg/graphics/filters/SVGFilter.h
index ea00ffc..d140541 100644
--- a/Source/core/svg/graphics/filters/SVGFilter.h
+++ b/Source/core/svg/graphics/filters/SVGFilter.h
@@ -26,10 +26,9 @@
 #include "core/platform/graphics/filters/Filter.h"
 #include "core/platform/graphics/filters/FilterEffect.h"
 #include "core/platform/graphics/transforms/AffineTransform.h"
-
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp b/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
index e27f4d7..084203f 100644
--- a/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
+++ b/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
@@ -18,14 +18,13 @@
  */
 
 #include "config.h"
-
 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
 
 #include "core/platform/graphics/filters/FilterEffect.h"
 #include "core/platform/graphics/filters/SourceAlpha.h"
 #include "core/platform/graphics/filters/SourceGraphic.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/graphics/filters/SVGFilterBuilder.h b/Source/core/svg/graphics/filters/SVGFilterBuilder.h
index c30fc57..f879aca 100644
--- a/Source/core/svg/graphics/filters/SVGFilterBuilder.h
+++ b/Source/core/svg/graphics/filters/SVGFilterBuilder.h
@@ -22,12 +22,11 @@
 #define SVGFilterBuilder_h
 
 #include "core/platform/graphics/filters/FilterEffect.h"
-
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/text/AtomicStringHash.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/HashMap.h"
+#include "wtf/HashSet.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/text/AtomicStringHash.h"
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/properties/SVGAnimatedProperty.h b/Source/core/svg/properties/SVGAnimatedProperty.h
index efdc5b2..37eba88 100644
--- a/Source/core/svg/properties/SVGAnimatedProperty.h
+++ b/Source/core/svg/properties/SVGAnimatedProperty.h
@@ -23,7 +23,7 @@
 
 #include "core/svg/properties/SVGAnimatedPropertyDescription.h"
 #include "core/svg/properties/SVGPropertyInfo.h"
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
index dc083da..e864b5c 100644
--- a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
@@ -26,7 +26,7 @@
 #include "core/svg/properties/SVGAnimatedProperty.h"
 #include "core/svg/properties/SVGAttributeToPropertyMap.h"
 #include "core/svg/properties/SVGPropertyTraits.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
 
 namespace WebCore {
 
@@ -163,7 +163,7 @@
 #define BEGIN_DECLARE_ANIMATED_PROPERTIES(OwnerType) \
 public: \
     static SVGAttributeToPropertyMap& attributeToPropertyMap(); \
-    virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const OVERRIDE; \
+    virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const; \
     typedef OwnerType UseOwnerType;
 
 #define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
diff --git a/Source/core/svg/properties/SVGProperty.h b/Source/core/svg/properties/SVGProperty.h
index d3080ad..3ccc289 100644
--- a/Source/core/svg/properties/SVGProperty.h
+++ b/Source/core/svg/properties/SVGProperty.h
@@ -20,7 +20,7 @@
 #ifndef SVGProperty_h
 #define SVGProperty_h
 
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/properties/SVGPropertyInfo.h b/Source/core/svg/properties/SVGPropertyInfo.h
index bd30d05..f77be4f 100644
--- a/Source/core/svg/properties/SVGPropertyInfo.h
+++ b/Source/core/svg/properties/SVGPropertyInfo.h
@@ -21,7 +21,7 @@
 #define SVGPropertyInfo_h
 
 #include "core/dom/QualifiedName.h"
-#include <wtf/PassRefPtr.h>
+#include "wtf/PassRefPtr.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/properties/SVGPropertyTraits.h b/Source/core/svg/properties/SVGPropertyTraits.h
index da757eb..a905f8a 100644
--- a/Source/core/svg/properties/SVGPropertyTraits.h
+++ b/Source/core/svg/properties/SVGPropertyTraits.h
@@ -21,7 +21,7 @@
 #ifndef SVGPropertyTraits_h
 #define SVGPropertyTraits_h
 
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
diff --git a/Source/core/svg/svgtags.in b/Source/core/svg/svgtags.in
index f65b38f..efa5f50 100644
--- a/Source/core/svg/svgtags.in
+++ b/Source/core/svg/svgtags.in
@@ -1,6 +1,7 @@
 namespace="SVG"
 namespaceURI="http://www.w3.org/2000/svg"
-fallbackInterfaceName="SVGElement"
+fallbackInterfaceName="SVGUnknownElement"
+fallbackJSInterfaceName="SVGElement"
 
 a
 #if ENABLE_SVG_FONTS
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/testing/GCObservation.cpp
similarity index 70%
rename from Source/core/platform/graphics/chromium/ImageChromium.cpp
rename to Source/core/testing/GCObservation.cpp
index 0466042..93176bd 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/testing/GCObservation.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -29,26 +29,28 @@
  */
 
 #include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
-
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
+#include "core/testing/GCObservation.h"
 
 namespace WebCore {
 
-// Other Image methods are implemented in ImageSkia.cpp
-
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
+static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Value>*, GCObservation* observation)
 {
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
+    observation->setWasCollected();
+}
 
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
+void GCObservation::setWasCollected()
+{
+    ASSERT(!wasCollected());
+    m_observed.clear();
+    m_collected = true;
+}
+
+GCObservation::GCObservation(v8::Handle<v8::Value> observedValue)
+    : m_observed(observedValue)
+    , m_collected(false)
+{
+    m_observed.makeWeak(this, makeWeakCallback);
 }
 
 } // namespace WebCore
+
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/testing/GCObservation.h
similarity index 62%
copy from Source/core/platform/graphics/chromium/ImageChromium.cpp
copy to Source/core/testing/GCObservation.h
index 0466042..469656a 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/testing/GCObservation.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,27 +28,35 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
+#ifndef GCObservation_h
+#define GCObservation_h
 
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
+#include "bindings/v8/ScopedPersistent.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include <v8.h>
 
 namespace WebCore {
 
-// Other Image methods are implemented in ImageSkia.cpp
+class GCObservation : public RefCounted<GCObservation> {
+public:
+    static PassRefPtr<GCObservation> create(v8::Handle<v8::Value> observedValue) { return adoptRef(new GCObservation(observedValue)); }
+    ~GCObservation() { }
 
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
-{
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
+    // Caution: It is only feasible to determine whether an object was
+    // "near death"; it may have been kept alive through a weak
+    // handle. After reaching near-death, having been collected is the
+    // common case.
+    bool wasCollected() const { return m_collected; }
+    void setWasCollected();
 
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
+private:
+    explicit GCObservation(v8::Handle<v8::Value>);
+
+    ScopedPersistent<v8::Value> m_observed;
+    bool m_collected;
+};
+
 }
 
-} // namespace WebCore
+#endif // GCObservation_h
diff --git a/Source/core/platform/graphics/chromium/ImageChromium.cpp b/Source/core/testing/GCObservation.idl
similarity index 67%
copy from Source/core/platform/graphics/chromium/ImageChromium.cpp
copy to Source/core/testing/GCObservation.idl
index 0466042..6c2d8e8 100644
--- a/Source/core/platform/graphics/chromium/ImageChromium.cpp
+++ b/Source/core/testing/GCObservation.idl
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008-2010, Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,27 +28,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "core/platform/SharedBuffer.h"
-#include "core/platform/graphics/BitmapImage.h"
-#include "core/platform/graphics/Image.h"
+interface GCObservation {
+    // Technically, this is true if the object was "near death"; the
+    // object may have been kept alive through a weak handle. Having
+    // been collected is the common case, though.
+    readonly attribute boolean wasCollected;
+};
 
-#include "public/platform/Platform.h"
-#include "public/platform/WebData.h"
-
-namespace WebCore {
-
-// Other Image methods are implemented in ImageSkia.cpp
-
-PassRefPtr<Image> Image::loadPlatformResource(const char *name)
-{
-    const WebKit::WebData& resource = WebKit::Platform::current()->loadResource(name);
-    if (resource.isEmpty())
-        return Image::nullImage();
-
-    RefPtr<Image> image = BitmapImage::create();
-    image->setData(resource, true);
-    return image.release();
-}
-
-} // namespace WebCore
diff --git a/Source/core/testing/InspectorFrontendClientLocal.h b/Source/core/testing/InspectorFrontendClientLocal.h
index 1d0d644..ef35eba 100644
--- a/Source/core/testing/InspectorFrontendClientLocal.h
+++ b/Source/core/testing/InspectorFrontendClientLocal.h
@@ -73,6 +73,10 @@
     virtual void requestFileSystems() { }
     virtual void addFileSystem() { }
     virtual void removeFileSystem(const String&) { }
+    virtual void indexPath(int requestId, const String& fileSystemPath) { }
+    virtual void stopIndexing(int requestId) { }
+    virtual void searchInPath(int requestId, const String& fileSystemPath, const String& query) { }
+
     virtual bool isUnderTest() { return true; }
 
 private:
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 3d5d0f7..e618f8d 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -39,6 +39,7 @@
 #include "RuntimeEnabledFeatures.h"
 #include "TypeConversions.h"
 #include "bindings/v8/SerializedScriptValue.h"
+#include "bindings/v8/V8ThrowException.h"
 #include "core/css/StyleSheetContents.h"
 #include "core/css/resolver/StyleResolver.h"
 #include "core/css/resolver/ViewportStyleResolver.h"
@@ -50,7 +51,7 @@
 #include "core/dom/DocumentMarkerController.h"
 #include "core/dom/Element.h"
 #include "core/dom/ExceptionCode.h"
-#include "core/dom/FullscreenController.h"
+#include "core/dom/FullscreenElementStack.h"
 #include "core/dom/NodeRenderingContext.h"
 #include "core/dom/PseudoElement.h"
 #include "core/dom/Range.h"
@@ -92,6 +93,7 @@
 #include "core/page/Frame.h"
 #include "core/page/FrameView.h"
 #include "core/page/Page.h"
+#include "core/page/PagePopupController.h"
 #include "core/page/PrintContext.h"
 #include "core/page/Settings.h"
 #include "core/page/animation/AnimationController.h"
@@ -99,26 +101,26 @@
 #include "core/platform/ColorChooser.h"
 #include "core/platform/Cursor.h"
 #include "core/platform/Language.h"
+#include "core/platform/chromium/TraceEvent.h"
+#include "core/platform/graphics/GraphicsLayer.h"
 #include "core/platform/graphics/IntRect.h"
+#include "core/platform/graphics/filters/FilterOperation.h"
+#include "core/platform/graphics/filters/FilterOperations.h"
 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
+#include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
+#include "core/rendering/RenderLayerBacking.h"
 #include "core/rendering/RenderMenuList.h"
 #include "core/rendering/RenderObject.h"
 #include "core/rendering/RenderTreeAsText.h"
 #include "core/rendering/RenderView.h"
+#include "core/testing/GCObservation.h"
 #include "core/workers/WorkerThread.h"
+#include "modules/speech/DOMWindowSpeechSynthesis.h"
+#include "modules/speech/SpeechSynthesis.h"
 #include "weborigin/SchemeRegistry.h"
 #include "wtf/dtoa.h"
 #include "wtf/text/StringBuffer.h"
-
-#include "core/page/PagePopupController.h"
-#include "core/platform/graphics/GraphicsLayer.h"
-#include "core/platform/graphics/filters/FilterOperation.h"
-#include "core/platform/graphics/filters/FilterOperations.h"
-#include "core/rendering/RenderLayerBacking.h"
-
-#include "core/platform/mock/PlatformSpeechSynthesizerMock.h"
-#include "modules/speech/DOMWindowSpeechSynthesis.h"
-#include "modules/speech/SpeechSynthesis.h"
+#include <v8.h>
 
 namespace WebCore {
 
@@ -262,6 +264,18 @@
     return String(buf);
 }
 
+PassRefPtr<GCObservation> Internals::observeGC(ScriptValue scriptValue)
+{
+    v8::Handle<v8::Value> observedValue = scriptValue.v8Value();
+    ASSERT(!observedValue.IsEmpty());
+    if (observedValue->IsNull() || observedValue->IsUndefined()) {
+        V8ThrowException::throwTypeError("value to observe is null or undefined", v8::Isolate::GetCurrent());
+        return 0;
+    }
+
+    return GCObservation::create(observedValue);
+}
+
 bool Internals::isPreloaded(const String& url)
 {
     Document* document = contextDocument();
@@ -1307,6 +1321,10 @@
 
 void Internals::touchEventTargetRectsChanged(const LayerHitTestRects& rects)
 {
+    // When profiling content_shell, it can be handy to exclude this time (since it's only
+    // present for testing / debugging).
+    TRACE_EVENT0("input", "Internals::touchEventTargetRectsChanged");
+
     m_touchEventTargetRectUpdateCount++;
 
     // Since it's not safe to hang onto the pointers in a LayerHitTestRects, we immediately
@@ -1820,28 +1838,28 @@
 {
     if (!document)
         return;
-    FullscreenController::from(document)->webkitWillEnterFullScreenForElement(element);
+    FullscreenElementStack::from(document)->webkitWillEnterFullScreenForElement(element);
 }
 
 void Internals::webkitDidEnterFullScreenForElement(Document* document, Element* element)
 {
     if (!document)
         return;
-    FullscreenController::from(document)->webkitDidEnterFullScreenForElement(element);
+    FullscreenElementStack::from(document)->webkitDidEnterFullScreenForElement(element);
 }
 
 void Internals::webkitWillExitFullScreenForElement(Document* document, Element* element)
 {
     if (!document)
         return;
-    FullscreenController::from(document)->webkitWillExitFullScreenForElement(element);
+    FullscreenElementStack::from(document)->webkitWillExitFullScreenForElement(element);
 }
 
 void Internals::webkitDidExitFullScreenForElement(Document* document, Element* element)
 {
     if (!document)
         return;
-    FullscreenController::from(document)->webkitDidExitFullScreenForElement(element);
+    FullscreenElementStack::from(document)->webkitDidExitFullScreenForElement(element);
 }
 
 void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme)
diff --git a/Source/core/testing/Internals.h b/Source/core/testing/Internals.h
index 6617ef1..3b602a0 100644
--- a/Source/core/testing/Internals.h
+++ b/Source/core/testing/Internals.h
@@ -27,6 +27,7 @@
 #ifndef Internals_h
 #define Internals_h
 
+#include "bindings/v8/ScriptValue.h"
 #include "core/css/CSSComputedStyleDeclaration.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/dom/ExceptionCodePlaceholder.h"
@@ -48,6 +49,7 @@
 class DocumentMarker;
 class Element;
 class Frame;
+class GCObservation;
 class InspectorFrontendChannelDummy;
 class InternalRuntimeFlags;
 class InternalProfilers;
@@ -78,6 +80,8 @@
 
     String address(Node*);
 
+    PassRefPtr<GCObservation> observeGC(ScriptValue);
+
     bool isPreloaded(const String& url);
     bool isLoadingFromMemoryCache(const String& url);
 
diff --git a/Source/core/testing/Internals.idl b/Source/core/testing/Internals.idl
index cabcf1f..14f1d59 100644
--- a/Source/core/testing/Internals.idl
+++ b/Source/core/testing/Internals.idl
@@ -29,6 +29,8 @@
 ] interface Internals {
     DOMString address(Node node);
 
+    GCObservation observeGC(any observed);
+
     [RaisesException] DOMString elementRenderTreeAsText(Element element);
     boolean isPreloaded(DOMString url);
     boolean isLoadingFromMemoryCache(DOMString url);
diff --git a/Source/core/tests/ArenaTestHelpers.h b/Source/core/tests/ArenaTestHelpers.h
new file mode 100644
index 0000000..0e60ca5
--- /dev/null
+++ b/Source/core/tests/ArenaTestHelpers.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ArenaTestHelpers_h
+#define ArenaTestHelpers_h
+
+#include "core/platform/PODArena.h"
+#include "wtf/NotFound.h"
+#include "wtf/Vector.h"
+
+#include <gtest/gtest.h>
+
+namespace WebCore {
+namespace ArenaTestHelpers {
+
+// An allocator for the PODArena which tracks the regions which have
+// been allocated.
+class TrackedAllocator : public PODArena::FastMallocAllocator {
+public:
+    static PassRefPtr<TrackedAllocator> create()
+    {
+        return adoptRef(new TrackedAllocator);
+    }
+
+    virtual void* allocate(size_t size)
+    {
+        void* result = PODArena::FastMallocAllocator::allocate(size);
+        m_allocatedRegions.append(result);
+        return result;
+    }
+
+    virtual void free(void* ptr)
+    {
+        size_t slot = m_allocatedRegions.find(ptr);
+        ASSERT_NE(slot, notFound);
+        m_allocatedRegions.remove(slot);
+        PODArena::FastMallocAllocator::free(ptr);
+    }
+
+    bool isEmpty() const
+    {
+        return !numRegions();
+    }
+
+    int numRegions() const
+    {
+        return m_allocatedRegions.size();
+    }
+
+private:
+    TrackedAllocator() { }
+    Vector<void*> m_allocatedRegions;
+};
+
+} // namespace ArenaTestHelpers
+} // namespace WebCore
+
+#endif // ArenaTestHelpers_h
diff --git a/Source/core/tests/PODArenaTest.cpp b/Source/core/tests/PODArenaTest.cpp
new file mode 100644
index 0000000..48da6ce
--- /dev/null
+++ b/Source/core/tests/PODArenaTest.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/PODArena.h"
+
+#include "ArenaTestHelpers.h"
+#include "wtf/FastMalloc.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
+
+#include <algorithm>
+#include <gtest/gtest.h>
+
+namespace WebCore {
+
+using ArenaTestHelpers::TrackedAllocator;
+
+namespace {
+
+// A couple of simple structs to allocate.
+struct TestClass1 {
+    TestClass1()
+        : x(0), y(0), z(0), w(1) { }
+
+    float x, y, z, w;
+};
+
+struct TestClass2 {
+    TestClass2()
+        : a(1), b(2), c(3), d(4) { }
+
+    float a, b, c, d;
+};
+
+} // anonymous namespace
+
+class PODArenaTest : public testing::Test {
+};
+
+// Make sure the arena can successfully allocate from more than one
+// region.
+TEST_F(PODArenaTest, CanAllocateFromMoreThanOneRegion)
+{
+    RefPtr<TrackedAllocator> allocator = TrackedAllocator::create();
+    RefPtr<PODArena> arena = PODArena::create(allocator);
+    int numIterations = 10 * PODArena::DefaultChunkSize / sizeof(TestClass1);
+    for (int i = 0; i < numIterations; ++i)
+        arena->allocateObject<TestClass1>();
+    EXPECT_GT(allocator->numRegions(), 1);
+}
+
+// Make sure the arena frees all allocated regions during destruction.
+TEST_F(PODArenaTest, FreesAllAllocatedRegions)
+{
+    RefPtr<TrackedAllocator> allocator = TrackedAllocator::create();
+    {
+        RefPtr<PODArena> arena = PODArena::create(allocator);
+        for (int i = 0; i < 3; i++)
+            arena->allocateObject<TestClass1>();
+        EXPECT_GT(allocator->numRegions(), 0);
+    }
+    EXPECT_TRUE(allocator->isEmpty());
+}
+
+// Make sure the arena runs constructors of the objects allocated within.
+TEST_F(PODArenaTest, RunsConstructors)
+{
+    RefPtr<PODArena> arena = PODArena::create();
+    for (int i = 0; i < 10000; i++) {
+        TestClass1* tc1 = arena->allocateObject<TestClass1>();
+        EXPECT_EQ(0, tc1->x);
+        EXPECT_EQ(0, tc1->y);
+        EXPECT_EQ(0, tc1->z);
+        EXPECT_EQ(1, tc1->w);
+        TestClass2* tc2 = arena->allocateObject<TestClass2>();
+        EXPECT_EQ(1, tc2->a);
+        EXPECT_EQ(2, tc2->b);
+        EXPECT_EQ(3, tc2->c);
+        EXPECT_EQ(4, tc2->d);
+    }
+}
+
+} // namespace WebCore
diff --git a/Source/core/tests/PODFreeListArenaTest.cpp b/Source/core/tests/PODFreeListArenaTest.cpp
new file mode 100644
index 0000000..26febe5
--- /dev/null
+++ b/Source/core/tests/PODFreeListArenaTest.cpp
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "core/platform/PODFreeListArena.h"
+
+#include "ArenaTestHelpers.h"
+#include "wtf/FastMalloc.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
+
+#include <gtest/gtest.h>
+
+namespace WebCore {
+
+using ArenaTestHelpers::TrackedAllocator;
+
+namespace {
+
+// A couple of simple structs to allocate.
+struct TestClass1 {
+    TestClass1()
+        : x(0), y(0), z(0), w(1) { }
+
+    float x, y, z, w;
+};
+
+struct TestClass2 {
+    TestClass2()
+        : padding(0)
+    {
+        static int TestIds = 0;
+        id = TestIds++;
+    }
+    int id;
+    int padding;
+};
+
+} // anonymous namespace
+
+class PODFreeListArenaTest : public testing::Test {
+protected:
+    int getFreeListSize(const PassRefPtr<PODFreeListArena<TestClass1> > arena) const
+    {
+        return arena->getFreeListSizeForTesting();
+    }
+};
+
+// Make sure the arena can successfully allocate from more than one
+// region.
+TEST_F(PODFreeListArenaTest, CanAllocateFromMoreThanOneRegion)
+{
+    RefPtr<TrackedAllocator> allocator = TrackedAllocator::create();
+    RefPtr<PODFreeListArena<TestClass1> > arena = PODFreeListArena<TestClass1>::create(allocator);
+    int numIterations = 10 * PODArena::DefaultChunkSize / sizeof(TestClass1);
+    for (int i = 0; i < numIterations; ++i)
+        arena->allocateObject();
+    EXPECT_GT(allocator->numRegions(), 1);
+}
+
+// Make sure the arena frees all allocated regions during destruction.
+TEST_F(PODFreeListArenaTest, FreesAllAllocatedRegions)
+{
+    RefPtr<TrackedAllocator> allocator = TrackedAllocator::create();
+    {
+        RefPtr<PODFreeListArena<TestClass1> > arena = PODFreeListArena<TestClass1>::create(allocator);
+        for (int i = 0; i < 3; i++)
+            arena->allocateObject();
+        EXPECT_GT(allocator->numRegions(), 0);
+    }
+    EXPECT_TRUE(allocator->isEmpty());
+}
+
+// Make sure the arena runs constructors of the objects allocated within.
+TEST_F(PODFreeListArenaTest, RunsConstructors)
+{
+    RefPtr<PODFreeListArena<TestClass1> > arena = PODFreeListArena<TestClass1>::create();
+    for (int i = 0; i < 10000; i++) {
+        TestClass1* tc1 = arena->allocateObject();
+        EXPECT_EQ(0, tc1->x);
+        EXPECT_EQ(0, tc1->y);
+        EXPECT_EQ(0, tc1->z);
+        EXPECT_EQ(1, tc1->w);
+    }
+}
+
+// Make sure freeObject puts the object in the free list.
+TEST_F(PODFreeListArenaTest, AddsFreedObjectsToFreedList)
+{
+    std::vector<TestClass1*> objects;
+    RefPtr<PODFreeListArena<TestClass1> > arena = PODFreeListArena<TestClass1>::create();
+    for (int i = 0; i < 100; i++) {
+        objects.push_back(arena->allocateObject());
+    }
+    for (std::vector<TestClass1*>::iterator it = objects.begin(); it != objects.end(); ++it) {
+        arena->freeObject(*it);
+    }
+    EXPECT_EQ(100, getFreeListSize(arena));
+}
+
+// Make sure allocations use previously freed memory.
+TEST_F(PODFreeListArenaTest, ReusesPreviouslyFreedObjects)
+{
+    std::set<TestClass2*> objects;
+    RefPtr<PODFreeListArena<TestClass2> > arena = PODFreeListArena<TestClass2>::create();
+    for (int i = 0; i < 100; i++) {
+        objects.insert(arena->allocateObject());
+    }
+    for (std::set<TestClass2*>::iterator it = objects.begin(); it != objects.end(); ++it) {
+        arena->freeObject(*it);
+    }
+    for (int i = 0; i < 100; i++) {
+        TestClass2* cur = arena->allocateObject();
+        EXPECT_TRUE(objects.find(cur) != objects.end());
+        EXPECT_TRUE(cur->id >= 100 && cur->id < 200);
+        objects.erase(cur);
+    }
+}
+
+} // namespace WebCore
diff --git a/Source/core/tests/PODIntervalTreeTest.cpp b/Source/core/tests/PODIntervalTreeTest.cpp
new file mode 100644
index 0000000..367c321
--- /dev/null
+++ b/Source/core/tests/PODIntervalTreeTest.cpp
@@ -0,0 +1,356 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Tests for the interval tree class.
+
+#include "config.h"
+#include "core/platform/PODIntervalTree.h"
+
+#include "TreeTestHelpers.h"
+#include "core/platform/Logging.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
+
+#include <gtest/gtest.h>
+
+namespace WebCore {
+
+using TreeTestHelpers::generateSeed;
+using TreeTestHelpers::initRandom;
+using TreeTestHelpers::nextRandom;
+
+#ifndef NDEBUG
+template<>
+struct ValueToString<float> {
+    static String string(const float& value) { return String::number(value); }
+};
+
+template<>
+struct ValueToString<void*> {
+    static String string(void* const& value)
+    {
+        return String::format("0x%p", value);
+    }
+};
+#endif
+
+TEST(PODIntervalTreeTest, TestInsertion)
+{
+    PODIntervalTree<float> tree;
+    tree.add(PODInterval<float>(2, 4));
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+TEST(PODIntervalTreeTest, TestInsertionAndQuery)
+{
+    PODIntervalTree<float> tree;
+    tree.add(PODInterval<float>(2, 4));
+    ASSERT_TRUE(tree.checkInvariants());
+    Vector<PODInterval<float> > result = tree.allOverlaps(PODInterval<float>(1, 3));
+    EXPECT_EQ(1U, result.size());
+    EXPECT_EQ(2, result[0].low());
+    EXPECT_EQ(4, result[0].high());
+}
+
+TEST(PODIntervalTreeTest, TestQueryAgainstZeroSizeInterval)
+{
+    PODIntervalTree<float> tree;
+    tree.add(PODInterval<float>(1, 2.5));
+    tree.add(PODInterval<float>(3.5, 5));
+    tree.add(PODInterval<float>(2, 4));
+    ASSERT_TRUE(tree.checkInvariants());
+    Vector<PODInterval<float> > result = tree.allOverlaps(PODInterval<float>(3, 3));
+    EXPECT_EQ(1U, result.size());
+    EXPECT_EQ(2, result[0].low());
+    EXPECT_EQ(4, result[0].high());
+}
+
+#ifndef NDEBUG
+template<>
+struct ValueToString<int*> {
+    static String string(int* const& value)
+    {
+        return String::format("0x%p", value);
+    }
+};
+#endif
+
+TEST(PODIntervalTreeTest, TestDuplicateElementInsertion)
+{
+    PODIntervalTree<float, int*> tree;
+    int tmp1 = 1;
+    int tmp2 = 2;
+    typedef PODIntervalTree<float, int*>::IntervalType IntervalType;
+    IntervalType interval1(1, 3, &tmp1);
+    IntervalType interval2(1, 3, &tmp2);
+    tree.add(interval1);
+    tree.add(interval2);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(interval1));
+    EXPECT_TRUE(tree.contains(interval2));
+    EXPECT_TRUE(tree.remove(interval1));
+    EXPECT_TRUE(tree.contains(interval2));
+    EXPECT_FALSE(tree.contains(interval1));
+    EXPECT_TRUE(tree.remove(interval2));
+    EXPECT_EQ(0, tree.size());
+}
+
+namespace {
+
+struct UserData1 {
+public:
+    UserData1()
+        : a(0), b(1) { }
+
+    float a;
+    int b;
+};
+
+} // anonymous namespace
+
+#ifndef NDEBUG
+template<>
+struct ValueToString<UserData1> {
+    static String string(const UserData1& value)
+    {
+        return String("[UserData1 a=") + String::number(value.a) + " b=" + String::number(value.b) + "]";
+    }
+};
+#endif
+
+TEST(PODIntervalTreeTest, TestInsertionOfComplexUserData)
+{
+    PODIntervalTree<float, UserData1> tree;
+    UserData1 data1;
+    data1.a = 5;
+    data1.b = 6;
+    tree.add(tree.createInterval(2, 4, data1));
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+TEST(PODIntervalTreeTest, TestQueryingOfComplexUserData)
+{
+    PODIntervalTree<float, UserData1> tree;
+    UserData1 data1;
+    data1.a = 5;
+    data1.b = 6;
+    tree.add(tree.createInterval(2, 4, data1));
+    ASSERT_TRUE(tree.checkInvariants());
+    Vector<PODInterval<float, UserData1> > overlaps = tree.allOverlaps(tree.createInterval(3, 5, data1));
+    EXPECT_EQ(1U, overlaps.size());
+    EXPECT_EQ(5, overlaps[0].data().a);
+    EXPECT_EQ(6, overlaps[0].data().b);
+}
+
+namespace {
+
+class EndpointType1 {
+public:
+    explicit EndpointType1(int value)
+        : m_value(value) { }
+
+    int value() const { return m_value; }
+
+    bool operator<(const EndpointType1& other) const { return m_value < other.m_value; }
+    bool operator==(const EndpointType1& other) const { return m_value == other.m_value; }
+
+private:
+    int m_value;
+    // These operators should not be called by the interval tree.
+    bool operator>(const EndpointType1& other);
+    bool operator<=(const EndpointType1& other);
+    bool operator>=(const EndpointType1& other);
+    bool operator!=(const EndpointType1& other);
+};
+
+} // anonymous namespace
+
+#ifndef NDEBUG
+template<>
+struct ValueToString<EndpointType1> {
+    static String string(const EndpointType1& value)
+    {
+        return String("[EndpointType1 value=") + String::number(value.value()) + "]";
+    }
+};
+#endif
+
+TEST(PODIntervalTreeTest, TestTreeDoesNotRequireMostOperators)
+{
+    PODIntervalTree<EndpointType1> tree;
+    tree.add(tree.createInterval(EndpointType1(1), EndpointType1(2)));
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+// Uncomment to debug a failure of the insertion and deletion test. Won't work
+// in release builds.
+// #define DEBUG_INSERTION_AND_DELETION_TEST
+
+#ifndef NDEBUG
+template<>
+struct ValueToString<int> {
+    static String string(const int& value) { return String::number(value); }
+};
+#endif
+
+namespace {
+
+void InsertionAndDeletionTest(int32_t seed, int treeSize)
+{
+    initRandom(seed);
+    int maximumValue = treeSize;
+    // Build the tree
+    PODIntervalTree<int> tree;
+    Vector<PODInterval<int> > addedElements;
+    Vector<PODInterval<int> > removedElements;
+    for (int i = 0; i < treeSize; i++) {
+        int left = nextRandom(maximumValue);
+        int length = nextRandom(maximumValue);
+        PODInterval<int> interval(left, left + length);
+        tree.add(interval);
+#ifdef DEBUG_INSERTION_AND_DELETION_TEST
+        LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(interval).ascii().data());
+#endif
+        addedElements.append(interval);
+    }
+    // Churn the tree's contents.
+    // First remove half of the elements in random order.
+    for (int i = 0; i < treeSize / 2; i++) {
+        int index = nextRandom(addedElements.size());
+#ifdef DEBUG_INSERTION_AND_DELETION_TEST
+        LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data());
+#endif
+        ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed;
+        tree.remove(addedElements[index]);
+        removedElements.append(addedElements[index]);
+        addedElements.remove(index);
+        ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed;
+    }
+    // Now randomly add or remove elements.
+    for (int i = 0; i < 2 * treeSize; i++) {
+        bool add = false;
+        if (!addedElements.size())
+            add = true;
+        else if (!removedElements.size())
+            add = false;
+        else
+            add = (nextRandom(2) == 1);
+        if (add) {
+            int index = nextRandom(removedElements.size());
+#ifdef DEBUG_INSERTION_AND_DELETION_TEST
+            LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(removedElements[index]).ascii().data());
+#endif
+            tree.add(removedElements[index]);
+            addedElements.append(removedElements[index]);
+            removedElements.remove(index);
+        } else {
+            int index = nextRandom(addedElements.size());
+#ifdef DEBUG_INSERTION_AND_DELETION_TEST
+            LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data());
+#endif
+            ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed;
+            ASSERT_TRUE(tree.remove(addedElements[index])) << "Test failed for seed " << seed;
+            removedElements.append(addedElements[index]);
+            addedElements.remove(index);
+        }
+        ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed;
+    }
+}
+
+} // anonymous namespace
+
+TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest1)
+{
+    InsertionAndDeletionTest(13972, 100);
+}
+
+TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest2)
+{
+    InsertionAndDeletionTest(1283382113, 10);
+}
+
+TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest3)
+{
+    // This is the sequence of insertions and deletions that triggered
+    // the failure in RandomDeletionAndInsertionRegressionTest2.
+    PODIntervalTree<int> tree;
+    tree.add(tree.createInterval(0, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(4, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(8, 9));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(1, 4));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(3, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(4, 12));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(0, 2));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(0, 2));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(9, 13));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(0, 1));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(0, 2));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(9, 13));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(0, 2));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(0, 1));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(4, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(4, 12));
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest4)
+{
+    // Even further reduced test case for RandomDeletionAndInsertionRegressionTest3.
+    PODIntervalTree<int> tree;
+    tree.add(tree.createInterval(0, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(8, 9));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(1, 4));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(3, 5));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(tree.createInterval(4, 12));
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(tree.createInterval(4, 12));
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+TEST(PODIntervalTreeTest, TestRandomDeletionAndInsertion)
+{
+    InsertionAndDeletionTest(generateSeed(), 1000);
+}
+
+} // namespace WebCore
diff --git a/Source/core/tests/PODRedBlackTreeTest.cpp b/Source/core/tests/PODRedBlackTreeTest.cpp
new file mode 100644
index 0000000..5d26617
--- /dev/null
+++ b/Source/core/tests/PODRedBlackTreeTest.cpp
@@ -0,0 +1,214 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Tests for the red-black tree class.
+
+#include "config.h"
+#include "core/platform/PODRedBlackTree.h"
+
+#include "ArenaTestHelpers.h"
+#include "TreeTestHelpers.h"
+#include "wtf/Vector.h"
+
+#include <gtest/gtest.h>
+
+namespace WebCore {
+
+using ArenaTestHelpers::TrackedAllocator;
+using TreeTestHelpers::generateSeed;
+using TreeTestHelpers::initRandom;
+using TreeTestHelpers::nextRandom;
+
+TEST(PODRedBlackTreeTest, TestTreeAllocatesFromArena)
+{
+    RefPtr<TrackedAllocator> allocator = TrackedAllocator::create();
+    {
+        typedef PODFreeListArena<PODRedBlackTree<int>::Node> PODIntegerArena;
+        RefPtr<PODIntegerArena> arena = PODIntegerArena::create(allocator);
+        PODRedBlackTree<int> tree(arena);
+        int numAdditions = 2 * PODArena::DefaultChunkSize / sizeof(int);
+        for (int i = 0; i < numAdditions; ++i)
+            tree.add(i);
+        EXPECT_GT(allocator->numRegions(), 1);
+    }
+    EXPECT_EQ(allocator->numRegions(), 0);
+}
+
+TEST(PODRedBlackTreeTest, TestSingleElementInsertion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(5));
+}
+
+TEST(PODRedBlackTreeTest, TestMultipleElementInsertion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(4);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(4));
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(3));
+    tree.add(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(5));
+    EXPECT_TRUE(tree.contains(4));
+    EXPECT_TRUE(tree.contains(3));
+}
+
+TEST(PODRedBlackTreeTest, TestDuplicateElementInsertion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_EQ(3, tree.size());
+    EXPECT_TRUE(tree.contains(3));
+}
+
+TEST(PODRedBlackTreeTest, TestSingleElementInsertionAndDeletion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(5));
+    tree.remove(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_FALSE(tree.contains(5));
+}
+
+TEST(PODRedBlackTreeTest, TestMultipleElementInsertionAndDeletion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(4);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(4));
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(3));
+    tree.add(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(5));
+    EXPECT_TRUE(tree.contains(4));
+    EXPECT_TRUE(tree.contains(3));
+    tree.remove(4);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(3));
+    EXPECT_FALSE(tree.contains(4));
+    EXPECT_TRUE(tree.contains(5));
+    tree.remove(5);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_TRUE(tree.contains(3));
+    EXPECT_FALSE(tree.contains(4));
+    EXPECT_FALSE(tree.contains(5));
+    EXPECT_EQ(1, tree.size());
+}
+
+TEST(PODRedBlackTreeTest, TestDuplicateElementInsertionAndDeletion)
+{
+    PODRedBlackTree<int> tree;
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_EQ(3, tree.size());
+    EXPECT_TRUE(tree.contains(3));
+    tree.remove(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.remove(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_EQ(1, tree.size());
+    EXPECT_TRUE(tree.contains(3));
+    tree.remove(3);
+    ASSERT_TRUE(tree.checkInvariants());
+    EXPECT_EQ(0, tree.size());
+    EXPECT_FALSE(tree.contains(3));
+}
+
+TEST(PODRedBlackTreeTest, FailingInsertionRegressionTest1)
+{
+    // These numbers came from a previously-failing randomized test run.
+    PODRedBlackTree<int> tree;
+    tree.add(5113);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(4517);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(3373);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(9307);
+    ASSERT_TRUE(tree.checkInvariants());
+    tree.add(7077);
+    ASSERT_TRUE(tree.checkInvariants());
+}
+
+namespace {
+void InsertionAndDeletionTest(const int32_t seed, const int treeSize)
+{
+    initRandom(seed);
+    const int maximumValue = treeSize;
+    // Build the tree.
+    PODRedBlackTree<int> tree;
+    Vector<int> values;
+    for (int i = 0; i < treeSize; i++) {
+        int value = nextRandom(maximumValue);
+        tree.add(value);
+        ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed;
+        values.append(value);
+    }
+    // Churn the tree's contents.
+    for (int i = 0; i < treeSize; i++) {
+        // Pick a random value to remove.
+        int index = nextRandom(treeSize);
+        int value = values[index];
+        // Remove this value.
+        tree.remove(value);
+        ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed;
+        // Replace it with a new one.
+        value = nextRandom(maximumValue);
+        values[index] = value;
+        tree.add(value);
+        ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed;
+    }
+}
+} // anonymous namespace
+
+TEST(PODRedBlackTreeTest, RandomDeletionAndInsertionRegressionTest1)
+{
+    InsertionAndDeletionTest(12311, 100);
+}
+
+TEST(PODRedBlackTreeTest, TestRandomDeletionAndInsertion)
+{
+    InsertionAndDeletionTest(generateSeed(), 100);
+}
+
+} // namespace WebCore
diff --git a/Source/core/tests/TreeTestHelpers.cpp b/Source/core/tests/TreeTestHelpers.cpp
new file mode 100644
index 0000000..c7f404c
--- /dev/null
+++ b/Source/core/tests/TreeTestHelpers.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "TreeTestHelpers.h"
+
+#include "wtf/CurrentTime.h"
+
+#include <cstdlib>
+
+namespace WebCore {
+namespace TreeTestHelpers {
+
+int32_t generateSeed()
+{
+    // A seed of 1 has the special behavior of resetting the random
+    // number generator. Assume that if we call this routine that we
+    // don't want this behavior.
+    int32_t seed;
+    do {
+        seed = static_cast<int32_t>(currentTime());
+    } while (seed <= 1);
+    return seed;
+}
+
+void initRandom(const int32_t seed)
+{
+    srand(seed);
+}
+
+int32_t nextRandom(const int32_t maximumValue)
+{
+    // rand_r is not available on Windows
+    return rand() % maximumValue;
+}
+
+} // namespace TreeTestHelpers
+} // namespace WebCore
diff --git a/Source/core/tests/TreeTestHelpers.h b/Source/core/tests/TreeTestHelpers.h
new file mode 100644
index 0000000..af07b2a
--- /dev/null
+++ b/Source/core/tests/TreeTestHelpers.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Simple pseudorandom number generator helper functions, used by the
+// red-black and interval tree tests.
+//
+// These are **not** thread safe!
+
+#ifndef TreeTestHelpers_h
+#define TreeTestHelpers_h
+
+#include <stdint.h>
+
+namespace WebCore {
+namespace TreeTestHelpers {
+
+// Generates a seed value to be passed to initRandom().
+int32_t generateSeed();
+
+// Initializes the pseudo-random number generator with a specific seed.
+void initRandom(const int32_t seed);
+
+// Produces the next pseudo-random number in the sequence, in the
+// range from [0..maximumValue). Negative numbers are not allowed and will
+// produce undefined results.
+int32_t nextRandom(const int32_t maximumValue);
+
+} // namespace TreeTestHelpers
+} // namespace WebCore
+
+#endif // TreeTestHelpers_h
diff --git a/Source/core/webcore_derived.target.darwin-arm.mk b/Source/core/webcore_derived.target.darwin-arm.mk
index a248759..31e8d4b 100644
--- a/Source/core/webcore_derived.target.darwin-arm.mk
+++ b/Source/core/webcore_derived.target.darwin-arm.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -443,8 +446,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -610,8 +613,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_derived.target.darwin-mips.mk b/Source/core/webcore_derived.target.darwin-mips.mk
index 189502b..c759cbc 100644
--- a/Source/core/webcore_derived.target.darwin-mips.mk
+++ b/Source/core/webcore_derived.target.darwin-mips.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -443,8 +446,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -610,8 +613,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_derived.target.darwin-x86.mk b/Source/core/webcore_derived.target.darwin-x86.mk
index 5c658e1..d408565 100644
--- a/Source/core/webcore_derived.target.darwin-x86.mk
+++ b/Source/core/webcore_derived.target.darwin-x86.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -445,8 +448,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -615,8 +618,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_derived.target.linux-arm.mk b/Source/core/webcore_derived.target.linux-arm.mk
index a248759..31e8d4b 100644
--- a/Source/core/webcore_derived.target.linux-arm.mk
+++ b/Source/core/webcore_derived.target.linux-arm.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -443,8 +446,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -610,8 +613,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_derived.target.linux-mips.mk b/Source/core/webcore_derived.target.linux-mips.mk
index 189502b..c759cbc 100644
--- a/Source/core/webcore_derived.target.linux-mips.mk
+++ b/Source/core/webcore_derived.target.linux-mips.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -443,8 +446,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -610,8 +613,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_derived.target.linux-x86.mk b/Source/core/webcore_derived.target.linux-x86.mk
index 5c658e1..d408565 100644
--- a/Source/core/webcore_derived.target.linux-x86.mk
+++ b/Source/core/webcore_derived.target.linux-x86.mk
@@ -32,107 +32,107 @@
 # Make sure our deps and generated files are built first.
 LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) $(GYP_GENERATED_OUTPUTS)
 
-$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources01.cpp
+$(gyp_intermediate_dir)/V8DerivedSources01.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources01.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources02.cpp
+$(gyp_intermediate_dir)/V8DerivedSources02.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources02.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources03.cpp
+$(gyp_intermediate_dir)/V8DerivedSources03.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources03.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources04.cpp
+$(gyp_intermediate_dir)/V8DerivedSources04.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources04.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources05.cpp
+$(gyp_intermediate_dir)/V8DerivedSources05.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources05.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources06.cpp
+$(gyp_intermediate_dir)/V8DerivedSources06.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources06.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources07.cpp
+$(gyp_intermediate_dir)/V8DerivedSources07.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources07.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources08.cpp
+$(gyp_intermediate_dir)/V8DerivedSources08.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources08.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources09.cpp
+$(gyp_intermediate_dir)/V8DerivedSources09.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources09.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources10.cpp
+$(gyp_intermediate_dir)/V8DerivedSources10.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources10.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources11.cpp
+$(gyp_intermediate_dir)/V8DerivedSources11.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources11.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources12.cpp
+$(gyp_intermediate_dir)/V8DerivedSources12.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources12.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources13.cpp
+$(gyp_intermediate_dir)/V8DerivedSources13.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources13.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources14.cpp
+$(gyp_intermediate_dir)/V8DerivedSources14.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources14.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources15.cpp
+$(gyp_intermediate_dir)/V8DerivedSources15.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources15.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources16.cpp
+$(gyp_intermediate_dir)/V8DerivedSources16.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources16.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources17.cpp
+$(gyp_intermediate_dir)/V8DerivedSources17.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources17.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources18.cpp
+$(gyp_intermediate_dir)/V8DerivedSources18.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources18.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/webkit/bindings/V8DerivedSources19.cpp
+$(gyp_intermediate_dir)/V8DerivedSources19.cpp: $(gyp_shared_intermediate_dir)/blink/bindings/V8DerivedSources19.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorData.cpp
+$(gyp_intermediate_dir)/ColorData.cpp: $(gyp_shared_intermediate_dir)/blink/ColorData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSPropertyNames.cpp
+$(gyp_intermediate_dir)/CSSPropertyNames.cpp: $(gyp_shared_intermediate_dir)/blink/CSSPropertyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSValueKeywords.cpp
+$(gyp_intermediate_dir)/CSSValueKeywords.cpp: $(gyp_shared_intermediate_dir)/blink/CSSValueKeywords.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLElementFactory.cpp
+$(gyp_intermediate_dir)/HTMLElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLNames.cpp
+$(gyp_intermediate_dir)/HTMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FetchInitiatorTypeNames.cpp
+$(gyp_intermediate_dir)/FetchInitiatorTypeNames.cpp: $(gyp_shared_intermediate_dir)/blink/FetchInitiatorTypeNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/CalendarPicker.cpp
+$(gyp_intermediate_dir)/CalendarPicker.cpp: $(gyp_shared_intermediate_dir)/blink/CalendarPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/webkit/ColorSuggestionPicker.cpp
+$(gyp_intermediate_dir)/ColorSuggestionPicker.cpp: $(gyp_shared_intermediate_dir)/blink/ColorSuggestionPicker.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/webkit/Event.cpp
+$(gyp_intermediate_dir)/Event.cpp: $(gyp_shared_intermediate_dir)/blink/Event.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/webkit/PickerCommon.cpp
+$(gyp_intermediate_dir)/PickerCommon.cpp: $(gyp_shared_intermediate_dir)/blink/PickerCommon.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/webkit/UserAgentStyleSheetsData.cpp
+$(gyp_intermediate_dir)/UserAgentStyleSheetsData.cpp: $(gyp_shared_intermediate_dir)/blink/UserAgentStyleSheetsData.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8HTMLElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8HTMLElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8HTMLElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XLinkNames.cpp
+$(gyp_intermediate_dir)/XLinkNames.cpp: $(gyp_shared_intermediate_dir)/blink/XLinkNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNSNames.cpp
+$(gyp_intermediate_dir)/XMLNSNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNSNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/XMLNames.cpp
+$(gyp_intermediate_dir)/XMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/XMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGNames.cpp
+$(gyp_intermediate_dir)/SVGNames.cpp: $(gyp_shared_intermediate_dir)/blink/SVGNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/webkit/MathMLNames.cpp
+$(gyp_intermediate_dir)/MathMLNames.cpp: $(gyp_shared_intermediate_dir)/blink/MathMLNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/webkit/FontFamilyNames.cpp
+$(gyp_intermediate_dir)/FontFamilyNames.cpp: $(gyp_shared_intermediate_dir)/blink/FontFamilyNames.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/webkit/HTMLEntityTable.cpp
+$(gyp_intermediate_dir)/HTMLEntityTable.cpp: $(gyp_shared_intermediate_dir)/blink/HTMLEntityTable.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/webkit/RuntimeEnabledFeatures.cpp
+$(gyp_intermediate_dir)/RuntimeEnabledFeatures.cpp: $(gyp_shared_intermediate_dir)/blink/RuntimeEnabledFeatures.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSParser.cpp
+$(gyp_intermediate_dir)/CSSParser.cpp: $(gyp_shared_intermediate_dir)/blink/CSSParser.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/CSSGrammar.cpp
+$(gyp_intermediate_dir)/CSSGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/CSSGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/webkit/XPathGrammar.cpp
+$(gyp_intermediate_dir)/XPathGrammar.cpp: $(gyp_shared_intermediate_dir)/blink/XPathGrammar.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorFrontend.cpp
+$(gyp_intermediate_dir)/InspectorFrontend.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorFrontend.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorBackendDispatcher.cpp
+$(gyp_intermediate_dir)/InspectorBackendDispatcher.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorBackendDispatcher.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorTypeBuilder.cpp
+$(gyp_intermediate_dir)/InspectorTypeBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorTypeBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/webkit/InspectorInstrumentationImpl.cpp
+$(gyp_intermediate_dir)/InspectorInstrumentationImpl.cpp: $(gyp_shared_intermediate_dir)/blink/InspectorInstrumentationImpl.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/SVGElementFactory.cpp
+$(gyp_intermediate_dir)/SVGElementFactory.cpp: $(gyp_shared_intermediate_dir)/blink/SVGElementFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/webkit/V8SVGElementWrapperFactory.cpp
+$(gyp_intermediate_dir)/V8SVGElementWrapperFactory.cpp: $(gyp_shared_intermediate_dir)/blink/V8SVGElementWrapperFactory.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/webkit/StylePropertyShorthand.cpp
+$(gyp_intermediate_dir)/StylePropertyShorthand.cpp: $(gyp_shared_intermediate_dir)/blink/StylePropertyShorthand.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilder.cpp
+$(gyp_intermediate_dir)/StyleBuilder.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilder.cpp
 	mkdir -p $(@D); cp $< $@
-$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/webkit/StyleBuilderFunctions.cpp
+$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp: $(gyp_shared_intermediate_dir)/blink/StyleBuilderFunctions.cpp
 	mkdir -p $(@D); cp $< $@
 LOCAL_GENERATED_SOURCES := \
 	$(gyp_intermediate_dir)/V8DerivedSources01.cpp \
@@ -188,8 +188,8 @@
 	$(gyp_intermediate_dir)/StyleBuilderFunctions.cpp
 
 GYP_COPIED_SOURCE_ORIGIN_DIRS := \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
-	$(gyp_shared_intermediate_dir)/webkit
+	$(gyp_shared_intermediate_dir)/blink/bindings \
+	$(gyp_shared_intermediate_dir)/blink
 
 LOCAL_SRC_FILES := \
 	third_party/WebKit/Source/bindings/v8/ActiveDOMCallback.cpp \
@@ -285,6 +285,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8EntrySyncCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8EventTargetCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8ErrorEventCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FileReaderCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8FormDataCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8GeolocationCustom.cpp \
@@ -314,6 +315,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8MessagePortCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8MutationObserverCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8NodeIteratorCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp \
@@ -331,6 +333,7 @@
 	third_party/WebKit/Source/bindings/v8/custom/V8StyleSheetCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp \
+	third_party/WebKit/Source/bindings/v8/custom/V8TreeWalkerCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WebKitPointCustom.cpp \
 	third_party/WebKit/Source/bindings/v8/custom/V8WindowCustom.cpp \
@@ -445,8 +448,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
@@ -615,8 +618,8 @@
 	$(gyp_shared_intermediate_dir)/shim_headers/ashmem/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icuuc/target \
 	$(gyp_shared_intermediate_dir)/shim_headers/icui18n/target \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
 	$(LOCAL_PATH)/third_party/WebKit/Source/bindings/v8/custom \
diff --git a/Source/core/webcore_dom.target.darwin-arm.mk b/Source/core/webcore_dom.target.darwin-arm.mk
index 2f35a08..4db4741 100644
--- a/Source/core/webcore_dom.target.darwin-arm.mk
+++ b/Source/core/webcore_dom.target.darwin-arm.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -293,8 +293,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -451,8 +451,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_dom.target.darwin-mips.mk b/Source/core/webcore_dom.target.darwin-mips.mk
index 31a2edd..ccbac80 100644
--- a/Source/core/webcore_dom.target.darwin-mips.mk
+++ b/Source/core/webcore_dom.target.darwin-mips.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -293,8 +293,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -451,8 +451,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_dom.target.darwin-x86.mk b/Source/core/webcore_dom.target.darwin-x86.mk
index 1eda919..5645c60 100644
--- a/Source/core/webcore_dom.target.darwin-x86.mk
+++ b/Source/core/webcore_dom.target.darwin-x86.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -295,8 +295,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -456,8 +456,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_dom.target.linux-arm.mk b/Source/core/webcore_dom.target.linux-arm.mk
index 2f35a08..4db4741 100644
--- a/Source/core/webcore_dom.target.linux-arm.mk
+++ b/Source/core/webcore_dom.target.linux-arm.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -293,8 +293,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -451,8 +451,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_dom.target.linux-mips.mk b/Source/core/webcore_dom.target.linux-mips.mk
index 31a2edd..ccbac80 100644
--- a/Source/core/webcore_dom.target.linux-mips.mk
+++ b/Source/core/webcore_dom.target.linux-mips.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -293,8 +293,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -451,8 +451,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_dom.target.linux-x86.mk b/Source/core/webcore_dom.target.linux-x86.mk
index 1eda919..5645c60 100644
--- a/Source/core/webcore_dom.target.linux-x86.mk
+++ b/Source/core/webcore_dom.target.linux-x86.mk
@@ -94,7 +94,7 @@
 	third_party/WebKit/Source/core/dom/EventTarget.cpp \
 	third_party/WebKit/Source/core/dom/ExceptionCodePlaceholder.cpp \
 	third_party/WebKit/Source/core/dom/FocusEvent.cpp \
-	third_party/WebKit/Source/core/dom/FullscreenController.cpp \
+	third_party/WebKit/Source/core/dom/FullscreenElementStack.cpp \
 	third_party/WebKit/Source/core/dom/GenericEventQueue.cpp \
 	third_party/WebKit/Source/core/dom/GestureEvent.cpp \
 	third_party/WebKit/Source/core/dom/IconURL.cpp \
@@ -295,8 +295,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -456,8 +456,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.darwin-arm.mk b/Source/core/webcore_html.target.darwin-arm.mk
index b3c41d1..66ee58b 100644
--- a/Source/core/webcore_html.target.darwin-arm.mk
+++ b/Source/core/webcore_html.target.darwin-arm.mk
@@ -393,8 +393,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -551,8 +551,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.darwin-mips.mk b/Source/core/webcore_html.target.darwin-mips.mk
index 315df96..2c44b8a 100644
--- a/Source/core/webcore_html.target.darwin-mips.mk
+++ b/Source/core/webcore_html.target.darwin-mips.mk
@@ -393,8 +393,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -551,8 +551,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.darwin-x86.mk b/Source/core/webcore_html.target.darwin-x86.mk
index 703b502..5f8355b 100644
--- a/Source/core/webcore_html.target.darwin-x86.mk
+++ b/Source/core/webcore_html.target.darwin-x86.mk
@@ -395,8 +395,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -556,8 +556,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.linux-arm.mk b/Source/core/webcore_html.target.linux-arm.mk
index b3c41d1..66ee58b 100644
--- a/Source/core/webcore_html.target.linux-arm.mk
+++ b/Source/core/webcore_html.target.linux-arm.mk
@@ -393,8 +393,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -551,8 +551,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.linux-mips.mk b/Source/core/webcore_html.target.linux-mips.mk
index 315df96..2c44b8a 100644
--- a/Source/core/webcore_html.target.linux-mips.mk
+++ b/Source/core/webcore_html.target.linux-mips.mk
@@ -393,8 +393,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -551,8 +551,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_html.target.linux-x86.mk b/Source/core/webcore_html.target.linux-x86.mk
index 703b502..5f8355b 100644
--- a/Source/core/webcore_html.target.linux-x86.mk
+++ b/Source/core/webcore_html.target.linux-x86.mk
@@ -395,8 +395,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -556,8 +556,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.darwin-arm.mk b/Source/core/webcore_platform.target.darwin-arm.mk
index a8c2fdc..7493bde 100644
--- a/Source/core/webcore_platform.target.darwin-arm.mk
+++ b/Source/core/webcore_platform.target.darwin-arm.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -446,8 +443,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -605,8 +602,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.darwin-mips.mk b/Source/core/webcore_platform.target.darwin-mips.mk
index 7719aa0..ace53db 100644
--- a/Source/core/webcore_platform.target.darwin-mips.mk
+++ b/Source/core/webcore_platform.target.darwin-mips.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -446,8 +443,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -605,8 +602,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.darwin-x86.mk b/Source/core/webcore_platform.target.darwin-x86.mk
index dd7be0b..9377569 100644
--- a/Source/core/webcore_platform.target.darwin-x86.mk
+++ b/Source/core/webcore_platform.target.darwin-x86.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -448,8 +445,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -610,8 +607,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.linux-arm.mk b/Source/core/webcore_platform.target.linux-arm.mk
index a8c2fdc..7493bde 100644
--- a/Source/core/webcore_platform.target.linux-arm.mk
+++ b/Source/core/webcore_platform.target.linux-arm.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -446,8 +443,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -605,8 +602,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.linux-mips.mk b/Source/core/webcore_platform.target.linux-mips.mk
index 7719aa0..ace53db 100644
--- a/Source/core/webcore_platform.target.linux-mips.mk
+++ b/Source/core/webcore_platform.target.linux-mips.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -446,8 +443,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -605,8 +602,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform.target.linux-x86.mk b/Source/core/webcore_platform.target.linux-x86.mk
index dd7be0b..9377569 100644
--- a/Source/core/webcore_platform.target.linux-x86.mk
+++ b/Source/core/webcore_platform.target.linux-x86.mk
@@ -24,7 +24,6 @@
 GYP_COPIED_SOURCE_ORIGIN_DIRS :=
 
 LOCAL_SRC_FILES := \
-	third_party/WebKit/Source/core/platform/Arena.cpp \
 	third_party/WebKit/Source/core/platform/CalculationValue.cpp \
 	third_party/WebKit/Source/core/platform/Clock.cpp \
 	third_party/WebKit/Source/core/platform/ContentType.cpp \
@@ -160,6 +159,7 @@
 	third_party/WebKit/Source/core/platform/graphics/FontFamily.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFeatureSettings.cpp \
 	third_party/WebKit/Source/core/platform/graphics/FontFastPath.cpp \
+	third_party/WebKit/Source/core/platform/graphics/FrameData.cpp \
 	third_party/WebKit/Source/core/platform/graphics/LayoutBoxExtent.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratorGeneratedImage.cpp \
 	third_party/WebKit/Source/core/platform/graphics/GeneratedImage.cpp \
@@ -196,7 +196,6 @@
 	third_party/WebKit/Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/DiscardablePixelRef.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/FontCacheAndroid.cpp \
-	third_party/WebKit/Source/core/platform/graphics/chromium/ImageChromium.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageDecodingStore.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/ImageFrameGenerator.cpp \
 	third_party/WebKit/Source/core/platform/graphics/chromium/LazyDecodingPixelRef.cpp \
@@ -254,10 +253,9 @@
 	third_party/WebKit/Source/core/platform/graphics/harfbuzz/HarfBuzzShaper.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeSanitizer.cpp \
 	third_party/WebKit/Source/core/platform/graphics/opentype/OpenTypeVerticalData.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformData.cpp \
+	third_party/WebKit/Source/core/platform/graphics/skia/FontCustomPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/FontPlatformDataSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/GlyphPageTreeNodeSkia.cpp \
-	third_party/WebKit/Source/core/platform/graphics/skia/ImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/NativeImageSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/OpaqueRegionSkia.cpp \
 	third_party/WebKit/Source/core/platform/graphics/skia/SimpleFontDataSkia.cpp \
@@ -322,7 +320,6 @@
 	third_party/WebKit/Source/core/platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp \
 	third_party/WebKit/Source/core/platform/text/BidiContext.cpp \
 	third_party/WebKit/Source/core/platform/text/DateTimeFormat.cpp \
-	third_party/WebKit/Source/core/platform/text/Hyphenation.cpp \
 	third_party/WebKit/Source/core/platform/text/LineEnding.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleICU.cpp \
 	third_party/WebKit/Source/core/platform/text/LocaleToScriptMappingDefault.cpp \
@@ -448,8 +445,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -610,8 +607,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.darwin-arm.mk b/Source/core/webcore_platform_geometry.target.darwin-arm.mk
index 2b4667f..db08d99 100644
--- a/Source/core/webcore_platform_geometry.target.darwin-arm.mk
+++ b/Source/core/webcore_platform_geometry.target.darwin-arm.mk
@@ -143,8 +143,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -301,8 +301,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.darwin-mips.mk b/Source/core/webcore_platform_geometry.target.darwin-mips.mk
index a409d4d..6c3d0b4 100644
--- a/Source/core/webcore_platform_geometry.target.darwin-mips.mk
+++ b/Source/core/webcore_platform_geometry.target.darwin-mips.mk
@@ -143,8 +143,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -301,8 +301,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.darwin-x86.mk b/Source/core/webcore_platform_geometry.target.darwin-x86.mk
index 3bb6f75..52e8a64 100644
--- a/Source/core/webcore_platform_geometry.target.darwin-x86.mk
+++ b/Source/core/webcore_platform_geometry.target.darwin-x86.mk
@@ -145,8 +145,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -306,8 +306,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.linux-arm.mk b/Source/core/webcore_platform_geometry.target.linux-arm.mk
index 2b4667f..db08d99 100644
--- a/Source/core/webcore_platform_geometry.target.linux-arm.mk
+++ b/Source/core/webcore_platform_geometry.target.linux-arm.mk
@@ -143,8 +143,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -301,8 +301,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.linux-mips.mk b/Source/core/webcore_platform_geometry.target.linux-mips.mk
index a409d4d..6c3d0b4 100644
--- a/Source/core/webcore_platform_geometry.target.linux-mips.mk
+++ b/Source/core/webcore_platform_geometry.target.linux-mips.mk
@@ -143,8 +143,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -301,8 +301,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_platform_geometry.target.linux-x86.mk b/Source/core/webcore_platform_geometry.target.linux-x86.mk
index 3bb6f75..52e8a64 100644
--- a/Source/core/webcore_platform_geometry.target.linux-x86.mk
+++ b/Source/core/webcore_platform_geometry.target.linux-x86.mk
@@ -145,8 +145,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -306,8 +306,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.darwin-arm.mk b/Source/core/webcore_remaining.target.darwin-arm.mk
index c7cebac..1154c85 100644
--- a/Source/core/webcore_remaining.target.darwin-arm.mk
+++ b/Source/core/webcore_remaining.target.darwin-arm.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -607,8 +610,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -766,8 +769,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.darwin-mips.mk b/Source/core/webcore_remaining.target.darwin-mips.mk
index d5389af..1bd0541 100644
--- a/Source/core/webcore_remaining.target.darwin-mips.mk
+++ b/Source/core/webcore_remaining.target.darwin-mips.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -607,8 +610,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -766,8 +769,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.darwin-x86.mk b/Source/core/webcore_remaining.target.darwin-x86.mk
index e0d47eb..8349c38 100644
--- a/Source/core/webcore_remaining.target.darwin-x86.mk
+++ b/Source/core/webcore_remaining.target.darwin-x86.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -609,8 +612,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -771,8 +774,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.linux-arm.mk b/Source/core/webcore_remaining.target.linux-arm.mk
index c7cebac..1154c85 100644
--- a/Source/core/webcore_remaining.target.linux-arm.mk
+++ b/Source/core/webcore_remaining.target.linux-arm.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -607,8 +610,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -766,8 +769,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.linux-mips.mk b/Source/core/webcore_remaining.target.linux-mips.mk
index d5389af..1bd0541 100644
--- a/Source/core/webcore_remaining.target.linux-mips.mk
+++ b/Source/core/webcore_remaining.target.linux-mips.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -607,8 +610,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -766,8 +769,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_remaining.target.linux-x86.mk b/Source/core/webcore_remaining.target.linux-x86.mk
index e0d47eb..8349c38 100644
--- a/Source/core/webcore_remaining.target.linux-x86.mk
+++ b/Source/core/webcore_remaining.target.linux-x86.mk
@@ -59,6 +59,8 @@
 	third_party/WebKit/Source/core/animation/KeyframeAnimationEffect.cpp \
 	third_party/WebKit/Source/core/animation/Player.cpp \
 	third_party/WebKit/Source/core/animation/TimedItem.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp \
+	third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp \
 	third_party/WebKit/Source/core/css/BasicShapeFunctions.cpp \
 	third_party/WebKit/Source/core/css/CSSArrayFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSAspectRatioValue.cpp \
@@ -82,6 +84,7 @@
 	third_party/WebKit/Source/core/css/CSSFontSelector.cpp \
 	third_party/WebKit/Source/core/css/CSSFunctionValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGradientValue.cpp \
+	third_party/WebKit/Source/core/css/CSSGridTemplateValue.cpp \
 	third_party/WebKit/Source/core/css/CSSGroupingRule.cpp \
 	third_party/WebKit/Source/core/css/CSSHostRule.cpp \
 	third_party/WebKit/Source/core/css/CSSImageGeneratorValue.cpp \
@@ -336,7 +339,6 @@
 	third_party/WebKit/Source/core/loader/ResourceLoadNotifier.cpp \
 	third_party/WebKit/Source/core/loader/ResourceLoader.cpp \
 	third_party/WebKit/Source/core/loader/SinkDocument.cpp \
-	third_party/WebKit/Source/core/loader/SubframeLoader.cpp \
 	third_party/WebKit/Source/core/loader/SubstituteData.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoder.cpp \
 	third_party/WebKit/Source/core/loader/TextResourceDecoderBuilder.cpp \
@@ -368,6 +370,7 @@
 	third_party/WebKit/Source/core/page/Chrome.cpp \
 	third_party/WebKit/Source/core/page/Console.cpp \
 	third_party/WebKit/Source/core/page/ContentSecurityPolicy.cpp \
+	third_party/WebKit/Source/core/page/ContentSecurityPolicyResponseHeaders.cpp \
 	third_party/WebKit/Source/core/page/ContextMenuController.cpp \
 	third_party/WebKit/Source/core/page/CreateWindow.cpp \
 	third_party/WebKit/Source/core/page/DeviceController.cpp \
@@ -391,7 +394,7 @@
 	third_party/WebKit/Source/core/page/FrameView.cpp \
 	third_party/WebKit/Source/core/page/History.cpp \
 	third_party/WebKit/Source/core/page/ImageBitmap.cpp \
-	third_party/WebKit/Source/core/page/ImageBitmapCallback.cpp \
+	third_party/WebKit/Source/core/page/ImageBitmapFactories.cpp \
 	third_party/WebKit/Source/core/page/Location.cpp \
 	third_party/WebKit/Source/core/page/MemoryInfo.cpp \
 	third_party/WebKit/Source/core/page/MouseEventWithHitTestResults.cpp \
@@ -609,8 +612,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -771,8 +774,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.darwin-arm.mk b/Source/core/webcore_rendering.target.darwin-arm.mk
index d5b9ce8..39aadad 100644
--- a/Source/core/webcore_rendering.target.darwin-arm.mk
+++ b/Source/core/webcore_rendering.target.darwin-arm.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -283,8 +282,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -441,8 +440,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.darwin-mips.mk b/Source/core/webcore_rendering.target.darwin-mips.mk
index d9c9959..cf0c5e9 100644
--- a/Source/core/webcore_rendering.target.darwin-mips.mk
+++ b/Source/core/webcore_rendering.target.darwin-mips.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -283,8 +282,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -441,8 +440,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.darwin-x86.mk b/Source/core/webcore_rendering.target.darwin-x86.mk
index 23e9d28..96c2c28 100644
--- a/Source/core/webcore_rendering.target.darwin-x86.mk
+++ b/Source/core/webcore_rendering.target.darwin-x86.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -286,8 +285,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -448,8 +447,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.linux-arm.mk b/Source/core/webcore_rendering.target.linux-arm.mk
index d5b9ce8..39aadad 100644
--- a/Source/core/webcore_rendering.target.linux-arm.mk
+++ b/Source/core/webcore_rendering.target.linux-arm.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -283,8 +282,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -441,8 +440,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.linux-mips.mk b/Source/core/webcore_rendering.target.linux-mips.mk
index d9c9959..cf0c5e9 100644
--- a/Source/core/webcore_rendering.target.linux-mips.mk
+++ b/Source/core/webcore_rendering.target.linux-mips.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -283,8 +282,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -441,8 +440,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_rendering.target.linux-x86.mk b/Source/core/webcore_rendering.target.linux-x86.mk
index 23e9d28..96c2c28 100644
--- a/Source/core/webcore_rendering.target.linux-x86.mk
+++ b/Source/core/webcore_rendering.target.linux-x86.mk
@@ -45,7 +45,6 @@
 	third_party/WebKit/Source/core/rendering/Pagination.cpp \
 	third_party/WebKit/Source/core/rendering/PointerEventsHitRules.cpp \
 	third_party/WebKit/Source/core/rendering/RenderApplet.cpp \
-	third_party/WebKit/Source/core/rendering/RenderArena.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBR.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlock.cpp \
 	third_party/WebKit/Source/core/rendering/RenderBlockLineLayout.cpp \
@@ -286,8 +285,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -448,8 +447,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.darwin-arm.mk b/Source/core/webcore_svg.target.darwin-arm.mk
index 8fdd681..9608503 100644
--- a/Source/core/webcore_svg.target.darwin-arm.mk
+++ b/Source/core/webcore_svg.target.darwin-arm.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -352,8 +352,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -510,8 +510,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.darwin-mips.mk b/Source/core/webcore_svg.target.darwin-mips.mk
index 9059234..f4a0890 100644
--- a/Source/core/webcore_svg.target.darwin-mips.mk
+++ b/Source/core/webcore_svg.target.darwin-mips.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -352,8 +352,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -510,8 +510,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.darwin-x86.mk b/Source/core/webcore_svg.target.darwin-x86.mk
index 8a49989..669653b 100644
--- a/Source/core/webcore_svg.target.darwin-x86.mk
+++ b/Source/core/webcore_svg.target.darwin-x86.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -354,8 +354,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -515,8 +515,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.linux-arm.mk b/Source/core/webcore_svg.target.linux-arm.mk
index 8fdd681..9608503 100644
--- a/Source/core/webcore_svg.target.linux-arm.mk
+++ b/Source/core/webcore_svg.target.linux-arm.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -352,8 +352,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -510,8 +510,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.linux-mips.mk b/Source/core/webcore_svg.target.linux-mips.mk
index 9059234..f4a0890 100644
--- a/Source/core/webcore_svg.target.linux-mips.mk
+++ b/Source/core/webcore_svg.target.linux-mips.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -352,8 +352,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -510,8 +510,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/webcore_svg.target.linux-x86.mk b/Source/core/webcore_svg.target.linux-x86.mk
index 8a49989..669653b 100644
--- a/Source/core/webcore_svg.target.linux-x86.mk
+++ b/Source/core/webcore_svg.target.linux-x86.mk
@@ -210,7 +210,6 @@
 	third_party/WebKit/Source/core/svg/SVGStopElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGStringList.cpp \
 	third_party/WebKit/Source/core/svg/SVGStyleElement.cpp \
-	third_party/WebKit/Source/core/svg/SVGStyledElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSwitchElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGSymbolElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGTRefElement.cpp \
@@ -226,6 +225,7 @@
 	third_party/WebKit/Source/core/svg/SVGTransformList.cpp \
 	third_party/WebKit/Source/core/svg/SVGTransformable.cpp \
 	third_party/WebKit/Source/core/svg/SVGURIReference.cpp \
+	third_party/WebKit/Source/core/svg/SVGUnknownElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGUseElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGVKernElement.cpp \
 	third_party/WebKit/Source/core/svg/SVGViewElement.cpp \
@@ -354,8 +354,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
@@ -515,8 +515,8 @@
 	$(LOCAL_PATH) \
 	$(LOCAL_PATH)/third_party/WebKit \
 	$(LOCAL_PATH)/third_party/WebKit/Source \
-	$(gyp_shared_intermediate_dir)/webkit \
-	$(gyp_shared_intermediate_dir)/webkit/bindings \
+	$(gyp_shared_intermediate_dir)/blink \
+	$(gyp_shared_intermediate_dir)/blink/bindings \
 	$(LOCAL_PATH)/third_party/angle_dx11/include/GLSLANG \
 	$(PWD)/external/icu4c/common \
 	$(PWD)/external/icu4c/i18n \
diff --git a/Source/core/workers/WorkerMessagingProxy.cpp b/Source/core/workers/WorkerMessagingProxy.cpp
index d165ee2..a940419 100644
--- a/Source/core/workers/WorkerMessagingProxy.cpp
+++ b/Source/core/workers/WorkerMessagingProxy.cpp
@@ -138,9 +138,10 @@
         // We don't bother checking the askedToTerminate() flag here, because exceptions should *always* be reported even if the thread is terminated.
         // This is intentionally different than the behavior in MessageWorkerTask, because terminated workers no longer deliver messages (section 4.6 of the WebWorker spec), but they do report exceptions.
 
-        bool errorHandled = !workerObject->dispatchEvent(ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber, m_columnNumber));
+        RefPtr<ErrorEvent> event = ErrorEvent::create(m_errorMessage, m_sourceURL, m_lineNumber, m_columnNumber);
+        bool errorHandled = !workerObject->dispatchEvent(event);
         if (!errorHandled)
-            context->reportException(m_errorMessage, m_lineNumber, m_columnNumber, m_sourceURL, 0);
+            context->reportException(event, 0);
     }
 
     String m_errorMessage;
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index b67473e..2c97108 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -554,6 +554,11 @@
     send(String(), ec);
 }
 
+bool XMLHttpRequest::areMethodAndURLValidForSend()
+{
+    return m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily();
+}
+
 void XMLHttpRequest::send(Document* document, ExceptionCode& ec)
 {
     ASSERT(document);
@@ -561,7 +566,7 @@
     if (!initSend(ec))
         return;
 
-    if (m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
+    if (areMethodAndURLValidForSend()) {
         String contentType = getRequestHeader("Content-Type");
         if (contentType.isEmpty()) {
             // FIXME: this should include the charset used for encoding.
@@ -586,7 +591,7 @@
     if (!initSend(ec))
         return;
 
-    if (!body.isNull() && m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
+    if (!body.isNull() && areMethodAndURLValidForSend()) {
         String contentType = getRequestHeader("Content-Type");
         if (contentType.isEmpty()) {
             setRequestHeaderInternal("Content-Type", "application/xml");
@@ -608,7 +613,7 @@
     if (!initSend(ec))
         return;
 
-    if (m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
+    if (areMethodAndURLValidForSend()) {
         const String& contentType = getRequestHeader("Content-Type");
         if (contentType.isEmpty()) {
             const String& blobType = body->type();
@@ -636,7 +641,7 @@
     if (!initSend(ec))
         return;
 
-    if (m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
+    if (areMethodAndURLValidForSend()) {
         m_requestEntityBody = FormData::createMultiPart(*(static_cast<FormDataList*>(body)), body->encoding(), document());
 
         String contentType = getRequestHeader("Content-Type");
@@ -671,7 +676,7 @@
     if (!initSend(ec))
         return;
 
-    if (m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
+    if (areMethodAndURLValidForSend()) {
         m_requestEntityBody = FormData::create(data, length);
         if (m_upload)
             m_requestEntityBody->setAlwaysStream(true);
@@ -857,24 +862,24 @@
 void XMLHttpRequest::networkError()
 {
     genericError();
-    m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent));
     if (!m_uploadComplete) {
         m_uploadComplete = true;
         if (m_upload && m_uploadEventsAllowed)
             m_upload->dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent));
     }
+    m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().errorEvent));
     internalAbort();
 }
 
 void XMLHttpRequest::abortError()
 {
     genericError();
-    m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent));
     if (!m_uploadComplete) {
         m_uploadComplete = true;
         if (m_upload && m_uploadEventsAllowed)
             m_upload->dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent));
     }
+    m_progressEventThrottle.dispatchEventAndLoadEnd(XMLHttpRequestProgressEvent::create(eventNames().abortEvent));
 }
 
 void XMLHttpRequest::dropProtectionSoon()
diff --git a/Source/core/xml/XMLHttpRequest.h b/Source/core/xml/XMLHttpRequest.h
index c95fa35..8f3bc2a 100644
--- a/Source/core/xml/XMLHttpRequest.h
+++ b/Source/core/xml/XMLHttpRequest.h
@@ -161,6 +161,8 @@
     String responseMIMEType() const;
     bool responseIsXML() const;
 
+    bool areMethodAndURLValidForSend();
+
     bool initSend(ExceptionCode&);
     void sendBytesData(const void*, size_t, ExceptionCode&);
 
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index fb98d8f..34cd188 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1087,6 +1087,9 @@
 
     if (m_parserPaused) {
         m_pendingCallbacks.append(adoptPtr(new PendingErrorCallback(type, reinterpret_cast<const xmlChar*>(formattedMessage), lineNumber(), columnNumber())));
+#if HAVE(VASPRINTF)
+        free(formattedMessage);
+#endif
         return;
     }