diff options
author | John Reck <jreck@google.com> | 2012-01-19 09:53:59 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-19 09:53:59 -0800 |
commit | 5c32969050f8abb8eebf48916e339b44543a2437 (patch) | |
tree | 4f23a76d9d7614ee664cf1916dc784ee25ec4be7 /Source/WebKit/android | |
parent | f41a6c48daf18b146426dfb9887c3caff55b4ebc (diff) | |
parent | be276cc8612281d7433f591dd8bc960ff759a8b2 (diff) | |
download | external_webkit-5c32969050f8abb8eebf48916e339b44543a2437.zip external_webkit-5c32969050f8abb8eebf48916e339b44543a2437.tar.gz external_webkit-5c32969050f8abb8eebf48916e339b44543a2437.tar.bz2 |
Merge "Remove ANDROID_CSS_RING"
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/nav/CacheBuilder.cpp | 56 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedColor.cpp | 58 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedColor.h | 87 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedFrame.cpp | 5 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedFrame.h | 6 |
5 files changed, 0 insertions, 212 deletions
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; |