summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-07-30 16:01:44 -0400
committerCary Clark <cary@android.com>2010-07-30 16:01:44 -0400
commitd75bcc669055079552dc46eada1f5a003cd5d1fe (patch)
treed01b1a7a534c06e6a387213630252da01fc0df2f /WebKit
parent0ed6485271097ecf1b4cf4e790f9cfdbb57d921c (diff)
downloadexternal_webkit-d75bcc669055079552dc46eada1f5a003cd5d1fe.zip
external_webkit-d75bcc669055079552dc46eada1f5a003cd5d1fe.tar.gz
external_webkit-d75bcc669055079552dc46eada1f5a003cd5d1fe.tar.bz2
Revert "Add CSS cursor ring definitions"
This reverts commit 0ed6485271097ecf1b4cf4e790f9cfdbb57d921c.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/Android.mk1
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp55
-rw-r--r--WebKit/android/nav/CachedColor.cpp58
-rw-r--r--WebKit/android/nav/CachedColor.h87
-rw-r--r--WebKit/android/nav/CachedFrame.cpp6
-rw-r--r--WebKit/android/nav/CachedFrame.h6
-rw-r--r--WebKit/android/nav/CachedNode.cpp1
-rw-r--r--WebKit/android/nav/CachedNode.h3
8 files changed, 0 insertions, 217 deletions
diff --git a/WebKit/Android.mk b/WebKit/Android.mk
index 9cff88b..ce72d65 100644
--- a/WebKit/Android.mk
+++ b/WebKit/Android.mk
@@ -68,7 +68,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
android/jni/WebViewCore.cpp \
\
android/nav/CacheBuilder.cpp \
- android/nav/CachedColor.cpp \
android/nav/CachedFrame.cpp \
android/nav/CachedHistory.cpp \
android/nav/CachedInput.cpp \
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 44397bf..5fddc48 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -928,35 +928,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)
@@ -984,8 +955,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 +
@@ -1001,12 +970,9 @@ 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;
- int colorIndex = 0; // assume no special css ring colors
- const void* lastStyleDataPtr = 0;
int textInputIndex = 0;
Node* focused = doc->focusedNode();
if (focused)
@@ -1138,7 +1104,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;
@@ -1329,25 +1294,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
globalOffsetX, globalOffsetY, &cachedNode.mCursorRing) == false)
continue;
keepTextNode:
- 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);
- }
IntRect clip = hasClip ? bounds : absBounds;
size_t clipIndex = clipTracker.size();
if (clipTracker.last().mNode == node)
@@ -1388,7 +1334,6 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
}
#endif
cachedNode.setNavableRects();
- cachedNode.setColorIndex(colorIndex);
cachedNode.setExport(exported);
cachedNode.setHasCursorRing(hasCursorRing);
cachedNode.setHasMouseOver(hasMouseOver);
diff --git a/WebKit/android/nav/CachedColor.cpp b/WebKit/android/nav/CachedColor.cpp
deleted file mode 100644
index c610022..0000000
--- a/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/WebKit/android/nav/CachedColor.h b/WebKit/android/nav/CachedColor.h
deleted file mode 100644
index 4b39810..0000000
--- a/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/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp
index 1187ed7..ff13508 100644
--- a/WebKit/android/nav/CachedFrame.cpp
+++ b/WebKit/android/nav/CachedFrame.cpp
@@ -1401,12 +1401,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();
child != b->mCachedFrames.end(); child++)
diff --git a/WebKit/android/nav/CachedFrame.h b/WebKit/android/nav/CachedFrame.h
index 257ced8..9334707 100644
--- a/WebKit/android/nav/CachedFrame.h
+++ b/WebKit/android/nav/CachedFrame.h
@@ -26,7 +26,6 @@
#ifndef CachedFrame_H
#define CachedFrame_H
-#include "CachedColor.h"
#include "CachedInput.h"
#include "CachedLayer.h"
#include "CachedNode.h"
@@ -71,7 +70,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); }
@@ -86,9 +84,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); }
@@ -229,7 +224,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;
diff --git a/WebKit/android/nav/CachedNode.cpp b/WebKit/android/nav/CachedNode.cpp
index d6f8891..8fc5f5b 100644
--- a/WebKit/android/nav/CachedNode.cpp
+++ b/WebKit/android/nav/CachedNode.cpp
@@ -404,7 +404,6 @@ void CachedNode::Debug::print() const
DUMP_NAV_LOGD("// int mNavableRects=%d;\n", b->mNavableRects);
DUMP_NAV_LOGD("// int mParentIndex=%d;\n", b->mParentIndex);
DUMP_NAV_LOGD("// int mTabIndex=%d;\n", b->mTabIndex);
- DUMP_NAV_LOGD("// int mColorIndex=%d;\n", b->mColorIndex);
DUMP_NAV_LOGD("// Condition mCondition=%s;\n", condition(b->mCondition));
DUMP_NAV_LOGD("// Type mType=%s;\n", type(b->mType));
DEBUG_PRINT_BOOL(mClippedOut);
diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h
index 4539eab..09f53c3 100644
--- a/WebKit/android/nav/CachedNode.h
+++ b/WebKit/android/nav/CachedNode.h
@@ -95,7 +95,6 @@ public:
WTF::Vector<WebCore::IntRect>* rings);
bool clip(const WebCore::IntRect& );
bool clippedOut() { return mClippedOut; }
- int colorIndex() const { return mColorIndex; }
WebCore::IntRect cursorRingBounds(const CachedFrame* ) const;
void cursorRings(const CachedFrame* , WTF::Vector<WebCore::IntRect>* ) const;
bool disabled() const { return mDisabled; }
@@ -148,7 +147,6 @@ public:
WebCore::IntRect ring(const CachedFrame* , size_t part) const;
void setBounds(const WebCore::IntRect& bounds) { mBounds = bounds; }
void setClippedOut(bool clipped) { mClippedOut = clipped; }
- void setColorIndex(int index) { mColorIndex = index; }
void setCondition(Condition condition) const { mCondition = condition; }
void setDataIndex(int index) { mDataIndex = index; }
void setDisabled(bool disabled) { mDisabled = disabled; }
@@ -192,7 +190,6 @@ private:
int mNavableRects; // FIXME: could be bitfield once I limit max number of rects
int mParentIndex;
int mTabIndex;
- int mColorIndex; // index to ring color and other stylable properties
mutable Condition mCondition : 5; // why the node was not chosen on the first pass
CachedNodeType mType : 4;
bool mClippedOut : 1;