summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/JavaScriptCore/wtf/Platform.h1
-rw-r--r--Source/WebCore/css/AndroidCSSPropertyNames.in11
-rw-r--r--Source/WebCore/css/CSSComputedStyleDeclaration.cpp35
-rw-r--r--Source/WebCore/css/CSSMutableStyleDeclaration.cpp14
-rw-r--r--Source/WebCore/css/CSSParser.cpp30
-rw-r--r--Source/WebCore/css/CSSStyleSelector.cpp132
-rw-r--r--Source/WebCore/platform/graphics/Color.h7
-rw-r--r--Source/WebCore/platform/graphics/android/android_graphics.cpp45
-rw-r--r--Source/WebCore/rendering/style/RenderStyle.h39
-rw-r--r--Source/WebCore/rendering/style/StyleRareInheritedData.cpp34
-rw-r--r--Source/WebCore/rendering/style/StyleRareInheritedData.h11
-rw-r--r--Source/WebKit/Android.mk1
-rw-r--r--Source/WebKit/android/nav/CacheBuilder.cpp56
-rw-r--r--Source/WebKit/android/nav/CachedColor.cpp58
-rw-r--r--Source/WebKit/android/nav/CachedColor.h87
-rw-r--r--Source/WebKit/android/nav/CachedFrame.cpp5
-rw-r--r--Source/WebKit/android/nav/CachedFrame.h6
17 files changed, 25 insertions, 547 deletions
diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h
index 6e270eb..f313861 100644
--- a/Source/JavaScriptCore/wtf/Platform.h
+++ b/Source/JavaScriptCore/wtf/Platform.h
@@ -758,7 +758,6 @@
#define ANDROID_ALLOW_TURNING_OFF_CARET
#define ANDROID_META_SUPPORT
#define ANDROID_MULTIPLE_WINDOWS
-#define ANDROID_CSS_RING
#define ANDROID_CSS_TAP_HIGHLIGHT_COLOR
#define ANDROID_BLOCK_NETWORK_IMAGE
// Changes needed to support native plugins (npapi.h). If the change is generic,
diff --git a/Source/WebCore/css/AndroidCSSPropertyNames.in b/Source/WebCore/css/AndroidCSSPropertyNames.in
index ef67d6b..be751da 100644
--- a/Source/WebCore/css/AndroidCSSPropertyNames.in
+++ b/Source/WebCore/css/AndroidCSSPropertyNames.in
@@ -21,14 +21,5 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
--webkit-ring
--webkit-ring-fill-color
--webkit-ring-inner-width
--webkit-ring-outer-width
--webkit-ring-outset
--webkit-ring-pressed-inner-color
--webkit-ring-pressed-outer-color
--webkit-ring-radius
--webkit-ring-selected-inner-color
--webkit-ring-selected-outer-color
+
-webkit-tap-highlight-color
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
index 4c0571d..4922109 100644
--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -291,18 +291,6 @@ static const int computedProperties[] = {
CSSPropertyWebkitSvgShadow,
CSSPropertyVectorEffect
#endif
-#ifdef ANDROID_CSS_RING
- ,
- CSSPropertyWebkitRingFillColor,
- CSSPropertyWebkitRingInnerWidth,
- CSSPropertyWebkitRingOuterWidth,
- CSSPropertyWebkitRingOutset,
- CSSPropertyWebkitRingPressedInnerColor,
- CSSPropertyWebkitRingPressedOuterColor,
- CSSPropertyWebkitRingRadius,
- CSSPropertyWebkitRingSelectedInnerColor,
- CSSPropertyWebkitRingSelectedOuterColor
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
,
CSSPropertyWebkitTapHighlightColor
@@ -1818,29 +1806,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
case CSSPropertyWebkitTransformOriginZ:
case CSSPropertyWebkitTransition:
break;
-#ifdef ANDROID_CSS_RING
- case CSSPropertyWebkitRing:
- // shorthand property currently not supported see bug 13658
- break;
- case CSSPropertyWebkitRingFillColor:
- return primitiveValueCache->createColorValue(style->ringFillColor().rgb());
- case CSSPropertyWebkitRingInnerWidth:
- return primitiveValueCache->createValue(style->ringInnerWidth());
- case CSSPropertyWebkitRingOuterWidth:
- return primitiveValueCache->createValue(style->ringOuterWidth());
- case CSSPropertyWebkitRingOutset:
- return primitiveValueCache->createValue(style->ringOutset());
- case CSSPropertyWebkitRingPressedInnerColor:
- return primitiveValueCache->createColorValue(style->ringPressedInnerColor().rgb());
- case CSSPropertyWebkitRingPressedOuterColor:
- return primitiveValueCache->createColorValue(style->ringPressedOuterColor().rgb());
- case CSSPropertyWebkitRingRadius:
- return primitiveValueCache->createValue(style->ringRadius());
- case CSSPropertyWebkitRingSelectedInnerColor:
- return primitiveValueCache->createColorValue(style->ringSelectedInnerColor().rgb());
- case CSSPropertyWebkitRingSelectedOuterColor:
- return primitiveValueCache->createColorValue(style->ringSelectedOuterColor().rgb());
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
case CSSPropertyWebkitTapHighlightColor:
return primitiveValueCache->createColorValue(style->tapHighlightColor().rgb());
diff --git a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp
index ba3332d..ece418a 100644
--- a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp
+++ b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp
@@ -261,20 +261,6 @@ String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const
return value->cssText();
}
#endif
-#ifdef ANDROID_CSS_RING
- case CSSPropertyWebkitRing: {
- const int properties[9] = { CSSPropertyWebkitRingFillColor,
- CSSPropertyWebkitRingInnerWidth,
- CSSPropertyWebkitRingOuterWidth,
- CSSPropertyWebkitRingOutset,
- CSSPropertyWebkitRingPressedInnerColor,
- CSSPropertyWebkitRingPressedOuterColor,
- CSSPropertyWebkitRingRadius,
- CSSPropertyWebkitRingSelectedInnerColor,
- CSSPropertyWebkitRingSelectedOuterColor };
- return getLayeredShorthandValue(properties, 9);
- }
-#endif
}
return String();
}
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp
index 78b6b24..b78a6d0 100644
--- a/Source/WebCore/css/CSSParser.cpp
+++ b/Source/WebCore/css/CSSParser.cpp
@@ -2008,36 +2008,6 @@ bool CSSParser::parseValue(int propId, bool important)
return parseLineBoxContain(important);
break;
-#ifdef ANDROID_CSS_RING
- case CSSPropertyWebkitRing:
- {
- const int properties[9] = { CSSPropertyWebkitRingFillColor,
- CSSPropertyWebkitRingInnerWidth,
- CSSPropertyWebkitRingOuterWidth,
- CSSPropertyWebkitRingOutset,
- CSSPropertyWebkitRingPressedInnerColor,
- CSSPropertyWebkitRingPressedOuterColor,
- CSSPropertyWebkitRingRadius,
- CSSPropertyWebkitRingSelectedInnerColor,
- CSSPropertyWebkitRingSelectedOuterColor };
- return parseShorthand(propId, properties, 9, important);
- }
- case CSSPropertyWebkitRingFillColor:
- case CSSPropertyWebkitRingPressedInnerColor:
- case CSSPropertyWebkitRingPressedOuterColor:
- case CSSPropertyWebkitRingSelectedInnerColor:
- case CSSPropertyWebkitRingSelectedOuterColor:
- parsedValue = parseColor();
- if (parsedValue)
- m_valueList->next();
- break;
- case CSSPropertyWebkitRingInnerWidth:
- case CSSPropertyWebkitRingOuterWidth:
- case CSSPropertyWebkitRingOutset:
- case CSSPropertyWebkitRingRadius:
- validPrimitive = validUnit(value, FLength | FNonNeg, m_strict);
- break;
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
case CSSPropertyWebkitTapHighlightColor:
parsedValue = parseColor();
diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp
index b79f2dc..0b6fd35 100644
--- a/Source/WebCore/css/CSSStyleSelector.cpp
+++ b/Source/WebCore/css/CSSStyleSelector.cpp
@@ -6054,138 +6054,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
ASSERT_NOT_REACHED();
return;
-#ifdef ANDROID_CSS_RING
- case CSSPropertyWebkitRing:
- if (valueType != CSSValue::CSS_INHERIT || !m_parentNode) return;
- m_style->setRingFillColor(m_parentStyle->ringFillColor());
- m_style->setRingInnerWidth(m_parentStyle->ringInnerWidth());
- m_style->setRingOuterWidth(m_parentStyle->ringOuterWidth());
- m_style->setRingOutset(m_parentStyle->ringOutset());
- m_style->setRingPressedInnerColor(m_parentStyle->ringPressedInnerColor());
- m_style->setRingPressedOuterColor(m_parentStyle->ringPressedOuterColor());
- m_style->setRingRadius(m_parentStyle->ringRadius());
- m_style->setRingSelectedInnerColor(m_parentStyle->ringSelectedInnerColor());
- m_style->setRingSelectedOuterColor(m_parentStyle->ringSelectedOuterColor());
- return;
- case CSSPropertyWebkitRingFillColor: {
- HANDLE_INHERIT_AND_INITIAL(ringFillColor, RingFillColor);
- if (!primitiveValue)
- break;
- Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
- m_style->setRingFillColor(col);
- return;
- }
- case CSSPropertyWebkitRingInnerWidth: {
- HANDLE_INHERIT_AND_INITIAL(ringInnerWidth, RingInnerWidth)
- if (!primitiveValue)
- break;
- Length l;
- int type = primitiveValue->primitiveType();
- if (CSSPrimitiveValue::isUnitTypeLength(type)) {
- // width can be specified with fractional px
- // scale by 16 here (and unscale in android_graphics) to keep
- // 4 bits of fraction
- RefPtr<CSSPrimitiveValue> scaledValue = CSSPrimitiveValue::create(
- primitiveValue->getFloatValue() * 16,
- (CSSPrimitiveValue::UnitTypes) type);
- l = Length(scaledValue->computeLengthIntForLength(style(),
- m_rootElementStyle, zoomFactor), Fixed);
- scaledValue.release();
- } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
- l = Length(primitiveValue->getDoubleValue(), Percent);
- else
- return;
- m_style->setRingInnerWidth(l);
- return;
- }
- case CSSPropertyWebkitRingOuterWidth: {
- HANDLE_INHERIT_AND_INITIAL(ringOuterWidth, RingOuterWidth)
- if (!primitiveValue)
- break;
- Length l;
- int type = primitiveValue->primitiveType();
- if (CSSPrimitiveValue::isUnitTypeLength(type)) {
- // width can be specified with fractional px
- // scale by 16 here (and unscale in android_graphics) to keep
- // 4 bits of fraction
- RefPtr<CSSPrimitiveValue> scaledValue = CSSPrimitiveValue::create(
- primitiveValue->getFloatValue() * 16,
- (CSSPrimitiveValue::UnitTypes) type);
- l = Length(scaledValue->computeLengthIntForLength(style(),
- m_rootElementStyle, zoomFactor), Fixed);
- scaledValue.release();
- } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
- l = Length(primitiveValue->getDoubleValue(), Percent);
- else
- return;
- m_style->setRingOuterWidth(l);
- return;
- }
- case CSSPropertyWebkitRingOutset: {
- HANDLE_INHERIT_AND_INITIAL(ringOutset, RingOutset)
- if (!primitiveValue)
- break;
- Length l;
- int type = primitiveValue->primitiveType();
- if (CSSPrimitiveValue::isUnitTypeLength(type))
- l = Length(primitiveValue->computeLengthIntForLength(style(),
- m_rootElementStyle, zoomFactor), Fixed);
- else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
- l = Length(primitiveValue->getDoubleValue(), Percent);
- else
- return;
- m_style->setRingOutset(l);
- return;
- }
- case CSSPropertyWebkitRingPressedInnerColor: {
- HANDLE_INHERIT_AND_INITIAL(ringPressedInnerColor, RingPressedInnerColor);
- if (!primitiveValue)
- break;
- Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
- m_style->setRingPressedInnerColor(col);
- return;
- }
- case CSSPropertyWebkitRingPressedOuterColor: {
- HANDLE_INHERIT_AND_INITIAL(ringPressedOuterColor, RingPressedOuterColor);
- if (!primitiveValue)
- break;
- Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
- m_style->setRingPressedOuterColor(col);
- return;
- }
- case CSSPropertyWebkitRingRadius: {
- HANDLE_INHERIT_AND_INITIAL(ringRadius, RingRadius)
- if (!primitiveValue)
- break;
- Length l;
- int type = primitiveValue->primitiveType();
- if (CSSPrimitiveValue::isUnitTypeLength(type))
- l = Length(primitiveValue->computeLengthIntForLength(style(),
- m_rootElementStyle, zoomFactor), Fixed);
- else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
- l = Length(primitiveValue->getDoubleValue(), Percent);
- else
- return;
- m_style->setRingRadius(l);
- return;
- }
- case CSSPropertyWebkitRingSelectedInnerColor: {
- HANDLE_INHERIT_AND_INITIAL(ringSelectedInnerColor, RingSelectedInnerColor);
- if (!primitiveValue)
- break;
- Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
- m_style->setRingSelectedInnerColor(col);
- return;
- }
- case CSSPropertyWebkitRingSelectedOuterColor: {
- HANDLE_INHERIT_AND_INITIAL(ringSelectedOuterColor, RingSelectedOuterColor);
- if (!primitiveValue)
- break;
- Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite();
- m_style->setRingSelectedOuterColor(col);
- return;
- }
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
case CSSPropertyWebkitTapHighlightColor: {
HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor);
diff --git a/Source/WebCore/platform/graphics/Color.h b/Source/WebCore/platform/graphics/Color.h
index 02ec005..bbf0c67 100644
--- a/Source/WebCore/platform/graphics/Color.h
+++ b/Source/WebCore/platform/graphics/Color.h
@@ -162,13 +162,6 @@ public:
static const RGBA32 lightGray = 0xFFC0C0C0;
static const RGBA32 transparent = 0x00000000;
-#ifdef ANDROID_CSS_RING
- static const RGBA32 ringFill = 0x666699FF;
- static const RGBA32 ringPressedInner = 0x006699FF;
- static const RGBA32 ringPressedOuter = 0x336699FF;
- static const RGBA32 ringSelectedInner = 0xAA6699FF;
- static const RGBA32 ringSelectedOuter = 0x336699FF;
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
static const RGBA32 tap = 0x4D1A1A1A;
#endif
diff --git a/Source/WebCore/platform/graphics/android/android_graphics.cpp b/Source/WebCore/platform/graphics/android/android_graphics.cpp
index 57f1b41..39b4ee0 100644
--- a/Source/WebCore/platform/graphics/android/android_graphics.cpp
+++ b/Source/WebCore/platform/graphics/android/android_graphics.cpp
@@ -25,7 +25,6 @@
#include "CachedPrefix.h"
#include "android_graphics.h"
-#include "CachedColor.h"
#include "CachedRoot.h"
#include "IntRect.h"
#include "LayerAndroid.h"
@@ -37,6 +36,18 @@
namespace android {
+#define RING_OUTSET 3
+#define RING_RADIUS 1
+#define RING_INNER_WIDTH 16
+#define RING_OUTER_WIDTH 16
+
+static const RGBA32 ringFill = 0x666699FF;
+static const RGBA32 ringPressedInner = 0x006699FF;
+static const RGBA32 ringPressedOuter = 0x336699FF;
+static const RGBA32 ringSelectedInner = 0xAA6699FF;
+static const RGBA32 ringSelectedOuter = 0x336699FF;
+
+
CursorRing::CursorRing(WebViewCore* core)
: m_viewImpl(core)
, m_layerId(-1)
@@ -63,7 +74,6 @@ void CursorRing::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval)
m_bounds.x(), m_bounds.y(), m_bounds.width(), m_bounds.height());
return;
}
- const CachedColor& colors = m_frame->color(m_node);
unsigned rectCount = m_rings.size();
SkRegion rgn;
SkPath path;
@@ -73,7 +83,7 @@ void CursorRing::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval)
SkIRect ir;
r.round(&ir);
- ir.inset(-colors.outset(), -colors.outset());
+ ir.inset(-RING_OUTSET, -RING_OUTSET);
rgn.op(ir, SkRegion::kUnion_Op);
}
rgn.getBoundaryPath(&path);
@@ -81,30 +91,30 @@ void CursorRing::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval)
SkPaint paint;
paint.setAntiAlias(true);
paint.setPathEffect(new SkCornerPathEffect(
- SkIntToScalar(colors.radius())))->unref();
+ SkIntToScalar(RING_RADIUS)))->unref();
SkColor outer;
SkColor inner;
if (m_isPressed) {
SkColor pressed;
- pressed = colors.fillColor();
+ pressed = ringFill;
paint.setColor(pressed);
canvas->drawPath(path, paint);
- outer = colors.pressedOuterColor();
- inner = colors.pressedInnerColor();
+ outer = ringPressedInner;
+ inner = ringPressedOuter;
} else {
- outer = colors.selectedOuterColor();
- inner = colors.selectedInnerColor();
+ outer = ringSelectedOuter;
+ inner = ringSelectedInner;
}
paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(colors.outerWidth() * WIDTH_SCALE);
+ paint.setStrokeWidth(RING_OUTER_WIDTH * WIDTH_SCALE);
paint.setColor(outer);
canvas->drawPath(path, paint);
- paint.setStrokeWidth(colors.innerWidth() * WIDTH_SCALE);
+ paint.setStrokeWidth(RING_INNER_WIDTH * WIDTH_SCALE);
paint.setColor(inner);
canvas->drawPath(path, paint);
SkRect localBounds, globalBounds;
localBounds = path.getBounds();
- float width = std::max(colors.innerWidth(), colors.outerWidth());
+ float width = std::max(RING_INNER_WIDTH, RING_OUTER_WIDTH);
width *= WIDTH_SCALE;
localBounds.inset(-width, -width);
const SkMatrix& matrix = canvas->getTotalMatrix();
@@ -155,9 +165,8 @@ bool CursorRing::setup()
m_rings.append(m_bounds);
}
m_absBounds = m_node->bounds(m_frame);
- const CachedColor& colors = m_frame->color(m_node);
- m_bounds.inflate(SkScalarCeil(colors.outerWidth()));
- m_absBounds.inflate(SkScalarCeil(colors.outerWidth()));
+ m_bounds.inflate(SkScalarCeil(RING_OUTER_WIDTH));
+ m_absBounds.inflate(SkScalarCeil(RING_OUTER_WIDTH));
if (!m_node->hasCursorRing() || (m_node->isPlugin() && m_node->isFocus()))
return false;
#if DEBUG_NAV_UI
@@ -168,12 +177,6 @@ bool CursorRing::setup()
m_isPressed ? "true" : "false",
m_rings.size(), ring.x(), ring.y(), ring.width(), ring.height(),
m_node->isPlugin() ? "true" : "false");
- DBG_NAV_LOGD("[%d] inner=%d outer=%d outset=%d radius=%d"
- " fill=0x%08x pin=0x%08x pout=0x%08x sin=0x%08x sout=0x%08x",
- m_node->colorIndex(), colors.innerWidth(), colors.outerWidth(),
- colors.outset(), colors.radius(), colors.fillColor(),
- colors.pressedInnerColor(), colors.pressedOuterColor(),
- colors.selectedInnerColor(), colors.selectedInnerColor());
#endif
return true;
}
diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h
index fad5a7b..ea01064 100644
--- a/Source/WebCore/rendering/style/RenderStyle.h
+++ b/Source/WebCore/rendering/style/RenderStyle.h
@@ -786,19 +786,6 @@ public:
ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); }
-#ifdef ANDROID_CSS_RING
- // called when building nav cache to determine if the ring data is unchanged
- const void* ringData() const { return reinterpret_cast<const void*>(rareInheritedData.get()); }
- Color ringFillColor() const { return rareInheritedData->ringFillColor; }
- Length ringInnerWidth() const { return rareInheritedData->ringInnerWidth; }
- Length ringOuterWidth() const { return rareInheritedData->ringOuterWidth; }
- Length ringOutset() const { return rareInheritedData->ringOutset; }
- Color ringPressedInnerColor() const { return rareInheritedData->ringPressedInnerColor; }
- Color ringPressedOuterColor() const { return rareInheritedData->ringPressedOuterColor; }
- Length ringRadius() const { return rareInheritedData->ringRadius; }
- Color ringSelectedInnerColor() const { return rareInheritedData->ringSelectedInnerColor; }
- Color ringSelectedOuterColor() const { return rareInheritedData->ringSelectedOuterColor; }
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
Color tapHighlightColor() const { return rareInheritedData->tapHighlightColor; }
#endif
@@ -1142,21 +1129,6 @@ public:
void setTextSizeAdjust(bool b) { SET_VAR(rareInheritedData, textSizeAdjust, b); }
void setTextSecurity(ETextSecurity aTextSecurity) { SET_VAR(rareInheritedData, textSecurity, aTextSecurity); }
-#ifdef ANDROID_CSS_RING
- void setRingFillColor(const Color& v) { SET_VAR(rareInheritedData, ringFillColor, v); }
- void setRingInnerWidth(Length v) { SET_VAR(rareInheritedData, ringInnerWidth, v); }
- void setRingOuterWidth(Length v) { SET_VAR(rareInheritedData, ringOuterWidth, v); }
- void setRingOutset(Length v) { SET_VAR(rareInheritedData, ringOutset, v); }
- void setRingPressedInnerColor(const Color& v) {
- SET_VAR(rareInheritedData, ringPressedInnerColor, v); }
- void setRingPressedOuterColor(const Color& v) {
- SET_VAR(rareInheritedData, ringPressedOuterColor, v); }
- void setRingRadius(Length v) { SET_VAR(rareInheritedData, ringRadius, v); }
- void setRingSelectedInnerColor(const Color& v) {
- SET_VAR(rareInheritedData, ringSelectedInnerColor, v); }
- void setRingSelectedOuterColor(const Color& v) {
- SET_VAR(rareInheritedData, ringSelectedOuterColor, v); }
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
void setTapHighlightColor(const Color& v) { SET_VAR(rareInheritedData, tapHighlightColor, v); }
#endif
@@ -1359,17 +1331,6 @@ public:
static const Vector<StyleDashboardRegion>& noneDashboardRegions();
#endif
-#ifdef ANDROID_CSS_RING
- static Color initialRingFillColor() { return Color::ringFill; }
- static Length initialRingInnerWidth() { return Length(16, Fixed); } // 1.0
- static Length initialRingOuterWidth() { return Length(40, Fixed); } // 2.5
- static Length initialRingOutset() { return Length(3, Fixed); }
- static Color initialRingSelectedInnerColor() { return Color::ringSelectedInner; }
- static Color initialRingSelectedOuterColor() { return Color::ringSelectedOuter; }
- static Color initialRingPressedInnerColor() { return Color::ringPressedInner; }
- static Color initialRingPressedOuterColor() { return Color::ringPressedOuter; }
- static Length initialRingRadius() { return Length(1, Fixed); }
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
static Color initialTapHighlightColor() { return Color::tap; }
#endif
diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
index 2253d1c..a7acc4a 100644
--- a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
+++ b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
@@ -32,17 +32,6 @@ namespace WebCore {
StyleRareInheritedData::StyleRareInheritedData()
: textStrokeWidth(RenderStyle::initialTextStrokeWidth())
-#ifdef ANDROID_CSS_RING
- , ringFillColor(RenderStyle::initialRingFillColor())
- , ringInnerWidth(RenderStyle::initialRingInnerWidth())
- , ringOuterWidth(RenderStyle::initialRingOuterWidth())
- , ringOutset(RenderStyle::initialRingOutset())
- , ringPressedInnerColor(RenderStyle::initialRingPressedInnerColor())
- , ringPressedOuterColor(RenderStyle::initialRingPressedOuterColor())
- , ringRadius(RenderStyle::initialRingRadius())
- , ringSelectedInnerColor(RenderStyle::initialRingSelectedInnerColor())
- , ringSelectedOuterColor(RenderStyle::initialRingSelectedOuterColor())
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
, tapHighlightColor(RenderStyle::initialTapHighlightColor())
#endif
@@ -77,18 +66,6 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
, textStrokeColor(o.textStrokeColor)
, textStrokeWidth(o.textStrokeWidth)
, textFillColor(o.textFillColor)
- , textEmphasisColor(o.textEmphasisColor)
-#ifdef ANDROID_CSS_RING
- , ringFillColor(o.ringFillColor)
- , ringInnerWidth(o.ringInnerWidth)
- , ringOuterWidth(o.ringOuterWidth)
- , ringOutset(o.ringOutset)
- , ringPressedInnerColor(o.ringPressedInnerColor)
- , ringPressedOuterColor(o.ringPressedOuterColor)
- , ringRadius(o.ringRadius)
- , ringSelectedInnerColor(o.ringSelectedInnerColor)
- , ringSelectedOuterColor(o.ringSelectedOuterColor)
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
, tapHighlightColor(o.tapHighlightColor)
#endif
@@ -157,17 +134,6 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
&& nbspMode == o.nbspMode
&& khtmlLineBreak == o.khtmlLineBreak
&& textSizeAdjust == o.textSizeAdjust
-#ifdef ANDROID_CSS_RING
- && ringFillColor == o.ringFillColor
- && ringInnerWidth == o.ringInnerWidth
- && ringOuterWidth == o.ringOuterWidth
- && ringOutset == o.ringOutset
- && ringPressedInnerColor == o.ringPressedInnerColor
- && ringPressedOuterColor == o.ringPressedOuterColor
- && ringRadius == o.ringRadius
- && ringSelectedInnerColor == o.ringSelectedInnerColor
- && ringSelectedOuterColor == o.ringSelectedOuterColor
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
&& tapHighlightColor == o.tapHighlightColor
#endif
diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.h b/Source/WebCore/rendering/style/StyleRareInheritedData.h
index 39cfe3c..16fcc5f 100644
--- a/Source/WebCore/rendering/style/StyleRareInheritedData.h
+++ b/Source/WebCore/rendering/style/StyleRareInheritedData.h
@@ -58,17 +58,6 @@ public:
Color textFillColor;
Color textEmphasisColor;
-#ifdef ANDROID_CSS_RING
- Color ringFillColor;
- Length ringInnerWidth;
- Length ringOuterWidth;
- Length ringOutset;
- Color ringPressedInnerColor;
- Color ringPressedOuterColor;
- Length ringRadius;
- Color ringSelectedInnerColor;
- Color ringSelectedOuterColor;
-#endif
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
Color tapHighlightColor;
#endif
diff --git a/Source/WebKit/Android.mk b/Source/WebKit/Android.mk
index c715609..f581111 100644
--- a/Source/WebKit/Android.mk
+++ b/Source/WebKit/Android.mk
@@ -85,7 +85,6 @@ LOCAL_SRC_FILES += \
android/jni/ViewStateSerializer.cpp \
\
android/nav/CacheBuilder.cpp \
- android/nav/CachedColor.cpp \
android/nav/CachedFrame.cpp \
android/nav/CachedHistory.cpp \
android/nav/CachedInput.cpp \
diff --git a/Source/WebKit/android/nav/CacheBuilder.cpp b/Source/WebKit/android/nav/CacheBuilder.cpp
index e943101..798960e 100644
--- a/Source/WebKit/android/nav/CacheBuilder.cpp
+++ b/Source/WebKit/android/nav/CacheBuilder.cpp
@@ -938,35 +938,6 @@ static void AddLayer(CachedFrame* frame, size_t index, const IntPoint& location,
}
#endif
-static int FindColorIndex(WTF::Vector<CachedColor>& colorTracker,
- const CachedColor& cachedColor)
-{
- CachedColor* work = colorTracker.begin() - 1;
- CachedColor* end = colorTracker.end();
- while (++work < end) {
- if (*work == cachedColor)
- return work - colorTracker.begin();
- }
- int result = colorTracker.size();
- colorTracker.grow(result + 1);
- CachedColor& newColor = colorTracker.last();
- newColor = cachedColor;
- return result;
-}
-
-static void InitColor(CachedColor* color)
-{
- color->setFillColor(RenderStyle::initialRingFillColor());
- color->setInnerWidth(RenderStyle::initialRingInnerWidth());
- color->setOuterWidth(RenderStyle::initialRingOuterWidth());
- color->setOutset(RenderStyle::initialRingOutset());
- color->setPressedInnerColor(RenderStyle::initialRingPressedInnerColor());
- color->setPressedOuterColor(RenderStyle::initialRingPressedOuterColor());
- color->setRadius(RenderStyle::initialRingRadius());
- color->setSelectedInnerColor(RenderStyle::initialRingSelectedInnerColor());
- color->setSelectedOuterColor(RenderStyle::initialRingSelectedOuterColor());
-}
-
// when new focus is found, push it's parent on a stack
// as long as more focii are found with the same (grand) parent, note it
// (which only requires retrieving the last parent on the stack)
@@ -994,8 +965,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
bzero(clipTracker.data(), sizeof(ClipColumnTracker));
WTF::Vector<TabIndexTracker> tabIndexTracker(1); // sentinel
bzero(tabIndexTracker.data(), sizeof(TabIndexTracker));
- WTF::Vector<CachedColor> colorTracker(1);
- InitColor(colorTracker.data());
#if DUMP_NAV_CACHE
char* frameNamePtr = cachedFrame->mDebug.mFrameName;
Builder(frame)->mDebug.frameName(frameNamePtr, frameNamePtr +
@@ -1011,7 +980,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
#if DUMP_NAV_CACHE
cachedParentNode.mDebug.mNodeIndex = nodeIndex;
#endif
- cachedFrame->add(colorTracker[0]);
cachedFrame->add(cachedParentNode);
Node* node = parent;
int cacheIndex = 1;
@@ -1131,7 +1099,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
TextDirection direction = LTR;
String exported;
CachedNodeType type = NORMAL_CACHEDNODETYPE;
- CachedColor cachedColor;
CachedInput cachedInput;
IntRect bounds;
IntRect absBounds;
@@ -1328,28 +1295,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
cachedNode.setBounds(bounds);
cachedNode.mCursorRing.append(bounds);
keepTextNode:
- if (nodeRenderer) { // area tags' node->renderer() == 0
- RenderStyle* style = nodeRenderer->style();
- const void* styleDataPtr = style->ringData();
- // to save time, see if we're pointing to the same style data as before
- if (lastStyleDataPtr != styleDataPtr) {
- lastStyleDataPtr = styleDataPtr;
- cachedColor.setFillColor(style->ringFillColor());
- cachedColor.setInnerWidth(style->ringInnerWidth());
- cachedColor.setOuterWidth(style->ringOuterWidth());
- cachedColor.setOutset(style->ringOutset());
- cachedColor.setPressedInnerColor(style->ringPressedInnerColor());
- cachedColor.setPressedOuterColor(style->ringPressedOuterColor());
- cachedColor.setRadius(style->ringRadius());
- cachedColor.setSelectedInnerColor(style->ringSelectedInnerColor());
- cachedColor.setSelectedOuterColor(style->ringSelectedOuterColor());
- int oldSize = colorTracker.size();
- colorIndex = FindColorIndex(colorTracker, cachedColor);
- if (colorIndex == oldSize)
- cachedFrame->add(cachedColor);
- }
- } else
- colorIndex = 0;
IntRect clip = hasClip ? bounds : absBounds;
size_t clipIndex = clipTracker.size();
if (clipTracker.last().mNode == node)
@@ -1395,7 +1340,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
else if (cachedNode.clip(clip) == false)
continue; // skip this node if outside of the clip
}
- cachedNode.setColorIndex(colorIndex);
cachedNode.setExport(exported);
cachedNode.setHasCursorRing(hasCursorRing);
cachedNode.setHasMouseOver(hasMouseOver);
diff --git a/Source/WebKit/android/nav/CachedColor.cpp b/Source/WebKit/android/nav/CachedColor.cpp
deleted file mode 100644
index c610022..0000000
--- a/Source/WebKit/android/nav/CachedColor.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2010, The Android Open Source Project
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 "CachedPrefix.h"
-#include "CachedColor.h"
-
-namespace android {
-
-#if DUMP_NAV_CACHE
-
-#define DEBUG_PRINT_COLOR(field) \
- DUMP_NAV_LOGD("// SkColor " #field "=0x%08x;\n", b->field)
-
-CachedColor* CachedColor::Debug::base() const {
- CachedColor* nav = (CachedColor*) ((char*) this - OFFSETOF(CachedColor, mDebug));
- return nav;
-}
-
-void CachedColor::Debug::print() const
-{
- CachedColor* b = base();
- DEBUG_PRINT_COLOR(mFillColor);
- DUMP_NAV_LOGD("// int mInnerWidth=%d;\n", b->mInnerWidth);
- DUMP_NAV_LOGD("// int mOuterWidth=%d;\n", b->mOuterWidth);
- DUMP_NAV_LOGD("// int mOutset=%d;\n", b->mOutset);
- DEBUG_PRINT_COLOR(mPressedInnerColor);
- DEBUG_PRINT_COLOR(mPressedOuterColor);
- DUMP_NAV_LOGD("// int mRadius=%d;\n", b->mRadius);
- DEBUG_PRINT_COLOR(mSelectedInnerColor);
- DEBUG_PRINT_COLOR(mSelectedOuterColor);
-}
-
-#endif
-
-}
-
diff --git a/Source/WebKit/android/nav/CachedColor.h b/Source/WebKit/android/nav/CachedColor.h
deleted file mode 100644
index 2ba9b18..0000000
--- a/Source/WebKit/android/nav/CachedColor.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2010, The Android Open Source Project
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedColor_h
-#define CachedColor_h
-
-#include "CachedDebug.h"
-#include "Color.h"
-#include "Length.h"
-#include "SkColor.h"
-
-using namespace WebCore;
-
-namespace android {
-
-class CachedColor {
-public:
- CachedColor() {
- // Initiaized to 0 in its array, so nothing to do in the
- // constructor
- }
- bool operator==(const CachedColor& o) const {
- return memcmp(&o, this, sizeof(this)) == 0; }
- SkColor fillColor() const { return mFillColor; }
- void init();
- int innerWidth() const { return mInnerWidth; }
- int outerWidth() const { return mOuterWidth; }
- int outset() const { return mOutset; }
- SkColor pressedInnerColor() const { return mPressedInnerColor; }
- SkColor pressedOuterColor() const { return mPressedOuterColor; }
- int radius() const { return mRadius; }
- SkColor selectedInnerColor() const { return mSelectedInnerColor; }
- SkColor selectedOuterColor() const { return mSelectedOuterColor; }
- void setFillColor(const Color& c) { mFillColor = c.rgb(); }
- void setInnerWidth(Length l) { mInnerWidth = l.value(); }
- void setOuterWidth(Length l) { mOuterWidth = l.value(); }
- void setOutset(Length l) { mOutset = l.value(); }
- void setPressedInnerColor(const Color& c) { mPressedInnerColor = c.rgb(); }
- void setPressedOuterColor(const Color& c) { mPressedOuterColor = c.rgb(); }
- void setRadius(Length l) { mRadius = l.value(); }
- void setSelectedInnerColor(const Color& c) { mSelectedInnerColor = c.rgb(); }
- void setSelectedOuterColor(const Color& c) { mSelectedOuterColor = c.rgb(); }
-private:
- SkColor mFillColor;
- int mInnerWidth;
- int mOuterWidth;
- int mOutset;
- SkColor mPressedInnerColor;
- SkColor mPressedOuterColor;
- int mRadius;
- SkColor mSelectedInnerColor;
- SkColor mSelectedOuterColor;
-#if DUMP_NAV_CACHE
-public:
- class Debug {
-public:
- CachedColor* base() const;
- void print() const;
- } mDebug;
-#endif
-};
-
-}
-
-#endif
diff --git a/Source/WebKit/android/nav/CachedFrame.cpp b/Source/WebKit/android/nav/CachedFrame.cpp
index c51944e..cdfd8b2 100644
--- a/Source/WebKit/android/nav/CachedFrame.cpp
+++ b/Source/WebKit/android/nav/CachedFrame.cpp
@@ -1469,11 +1469,6 @@ void CachedFrame::Debug::print() const
}
DUMP_NAV_LOGD("// }; // end of layers\n");
#endif // USE(ACCELERATED_COMPOSITING)
- DUMP_NAV_LOGD("// CachedColor mCachedColors={ // count=%d\n", b->mCachedColors.size());
- for (CachedColor* color = b->mCachedColors.begin();
- color != b->mCachedColors.end(); color++) {
- color->mDebug.print();
- }
DUMP_NAV_LOGD("// }; // end of colors\n");
DUMP_NAV_LOGD("// CachedFrame mCachedFrames={ // count=%d\n", b->mCachedFrames.size());
for (CachedFrame* child = b->mCachedFrames.begin();
diff --git a/Source/WebKit/android/nav/CachedFrame.h b/Source/WebKit/android/nav/CachedFrame.h
index da86521..40efafe 100644
--- a/Source/WebKit/android/nav/CachedFrame.h
+++ b/Source/WebKit/android/nav/CachedFrame.h
@@ -28,7 +28,6 @@
#ifndef AndroidCachedFrame_h
#define AndroidCachedFrame_h
-#include "CachedColor.h"
#include "CachedInput.h"
#include "CachedLayer.h"
#include "CachedNode.h"
@@ -73,7 +72,6 @@ public:
CURSOR_SET = 0
};
CachedFrame() {}
- void add(CachedColor& color) { mCachedColors.append(color); }
void add(CachedInput& input) { mCachedTextInputs.append(input); }
#if USE(ACCELERATED_COMPOSITING)
void add(CachedLayer& layer) { mCachedLayers.append(layer); }
@@ -87,9 +85,6 @@ public:
bool checkVisited(const CachedNode* , CachedFrame::Direction ) const;
size_t childCount() { return mCachedFrames.size(); }
void clearCursor();
- const CachedColor& color(const CachedNode* node) const {
- return mCachedColors[node->colorIndex()];
- }
const CachedNode* currentCursor() const { return currentCursor(NULL); }
const CachedNode* currentCursor(const CachedFrame** ) const;
const CachedNode* currentFocus() const { return currentFocus(NULL); }
@@ -235,7 +230,6 @@ private: // since computing these is complicated, protect them so that the
WebCore::IntRect mContents;
WebCore::IntRect mLocalViewBounds;
WebCore::IntRect mViewBounds;
- WTF::Vector<CachedColor> mCachedColors;
WTF::Vector<CachedNode> mCachedNodes;
WTF::Vector<CachedFrame> mCachedFrames;
WTF::Vector<CachedInput> mCachedTextInputs;