Diff
Modified: trunk/LayoutTests/ChangeLog (97219 => 97220)
--- trunk/LayoutTests/ChangeLog 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/LayoutTests/ChangeLog 2011-10-12 02:42:18 UTC (rev 97220)
@@ -1,3 +1,16 @@
+2011-10-11 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r97202, r97207, and r97215.
+ http://trac.webkit.org/changeset/97202
+ http://trac.webkit.org/changeset/97207
+ http://trac.webkit.org/changeset/97215
+ https://bugs.webkit.org/show_bug.cgi?id=69894
+
+ Broke builds (Requested by rniwa on #webkit).
+
+ * fast/dom/popup-menu-client-test-expected.txt: Removed.
+ * fast/dom/popup-menu-client-test.html: Removed.
+
2011-10-11 Martin Robinson <[email protected]>
[Soup] ResourceHandleSoup does not handle encodedBlobData
Deleted: trunk/LayoutTests/fast/dom/popup-menu-client-test-expected.txt (97219 => 97220)
--- trunk/LayoutTests/fast/dom/popup-menu-client-test-expected.txt 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/LayoutTests/fast/dom/popup-menu-client-test-expected.txt 2011-10-12 02:42:18 UTC (rev 97220)
@@ -1,10 +0,0 @@
-PASS popupClientPaddingLeft is 4
-PASS popupClientPaddingRight is 2
-FAIL boundingBoxRect.left should be 10. Was 20.
-FAIL boundingBoxRect.top should be 10. Was 20.
-PASS boundingBoxRect.width is boundingClientRect.width
-PASS boundingBoxRect.height is boundingClientRect.height
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/fast/dom/popup-menu-client-test.html (97219 => 97220)
--- trunk/LayoutTests/fast/dom/popup-menu-client-test.html 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/LayoutTests/fast/dom/popup-menu-client-test.html 2011-10-12 02:42:18 UTC (rev 97220)
@@ -1,38 +0,0 @@
-<html>
- <head>
- <body>
- <div id="console"></div>
- <select id="selectelement">
- <option>Element 1</option>
- <option>Element 2</option>
- <option>Element 3</option>
- </select>
- </body>
- <script src=""
- <script>
- var selectElement = document.getElementById("selectelement");
- if (window.internals) {
- // FIXME: This wil fail if the page scale factor != 1.0
- var pageScaleFactor = 2.0;
- eventSender.scalePageBy(pageScaleFactor, 0, 0);
-
- var popupClientPaddingLeft = window.internals.popupClientPaddingLeft(selectElement);
- var popupClientPaddingRight = window.internals.popupClientPaddingRight(selectElement);
- var boundingBoxRect = window.internals.popupClientBoundingBoxRect(selectElement);
- var boundingClientRect = selectElement.getBoundingClientRect();
- shouldBe("popupClientPaddingLeft", "4");
- shouldBe("popupClientPaddingRight", "2");
- shouldBe("boundingBoxRect.left", "boundingClientRect.left");
- shouldBe("boundingBoxRect.top", "boundingClientRect.top");
- shouldBe("boundingBoxRect.width", "boundingClientRect.width");
- shouldBe("boundingBoxRect.height", "boundingClientRect.height");
- }
- if (window.layoutTestController) {
- layoutTestController.dumpAsText();
- }
- successfullyParsed = true;
- </script>
- <script src=""
- </script>
- </head>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (97219 => 97220)
--- trunk/Source/WebCore/ChangeLog 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/ChangeLog 2011-10-12 02:42:18 UTC (rev 97220)
@@ -1,3 +1,25 @@
+2011-10-11 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r97202, r97207, and r97215.
+ http://trac.webkit.org/changeset/97202
+ http://trac.webkit.org/changeset/97207
+ http://trac.webkit.org/changeset/97215
+ https://bugs.webkit.org/show_bug.cgi?id=69894
+
+ Broke builds (Requested by rniwa on #webkit).
+
+ * platform/PopupMenuClient.h:
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::showPopup):
+ * rendering/RenderMenuList.h:
+ * rendering/RenderObject.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::showPopup):
+ * rendering/RenderTextControlSingleLine.h:
+ * testing/Internals.cpp:
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2011-10-11 Martin Robinson <[email protected]>
[Soup] ResourceHandleSoup does not handle encodedBlobData
Modified: trunk/Source/WebCore/platform/PopupMenuClient.h (97219 => 97220)
--- trunk/Source/WebCore/platform/PopupMenuClient.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/platform/PopupMenuClient.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -22,7 +22,6 @@
#ifndef PopupMenuClient_h
#define PopupMenuClient_h
-#include "LayoutTypes.h"
#include "PopupMenuStyle.h"
#include "ScrollTypes.h"
#include <wtf/Forward.h>
@@ -50,7 +49,6 @@
virtual bool itemIsEnabled(unsigned listIndex) const = 0;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const = 0;
virtual PopupMenuStyle menuStyle() const = 0;
- virtual LayoutRect boundingBoxRect() const = 0;
virtual int clientInsetLeft() const = 0;
virtual int clientInsetRight() const = 0;
virtual int clientPaddingLeft() const = 0;
Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (97219 => 97220)
--- trunk/Source/WebCore/rendering/RenderMenuList.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -303,7 +303,13 @@
HTMLSelectElement* select = toSelectElement(static_cast<Element*>(node()));
m_popupIsVisible = true;
- m_popup->show(boundingBoxRect(), document()->view(), select->optionToListIndex(select->selectedIndex()));
+ // Compute the top left taking transforms into account, but use
+ // the actual width of the element to size the popup.
+ FloatPoint absTopLeft = localToAbsolute(FloatPoint(), false, true);
+ LayoutRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
+ absBounds.setLocation(roundedIntPoint(absTopLeft));
+ m_popup->show(absBounds, document()->view(),
+ select->optionToListIndex(select->selectedIndex()));
}
void RenderMenuList::hidePopup()
@@ -500,16 +506,6 @@
return widget.release();
}
-LayoutRect RenderMenuList::boundingBoxRect() const
-{
- // Compute the top left taking transforms into account, but use
- // the actual width of the element to size the popup.
- FloatPoint absTopLeft = localToAbsolute(FloatPoint(), false, true);
- LayoutRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
- absBounds.setLocation(roundedIntPoint(absTopLeft));
- return absBounds;
-}
-
int RenderMenuList::clientInsetLeft() const
{
return 0;
Modified: trunk/Source/WebCore/rendering/RenderMenuList.h (97219 => 97220)
--- trunk/Source/WebCore/rendering/RenderMenuList.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/rendering/RenderMenuList.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -39,9 +39,9 @@
class RenderText;
#if ENABLE(NO_LISTBOX_RENDERING)
-class RenderMenuList : public RenderDeprecatedFlexibleBox, public ListPopupMenuClient {
+class RenderMenuList : public RenderDeprecatedFlexibleBox, private ListPopupMenuClient {
#else
-class RenderMenuList : public RenderDeprecatedFlexibleBox, public PopupMenuClient {
+class RenderMenuList : public RenderDeprecatedFlexibleBox, private PopupMenuClient {
#endif
public:
@@ -61,7 +61,6 @@
private:
virtual bool isMenuList() const { return true; }
- virtual bool isPopupMenuClient() const { return true; }
virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0);
virtual void removeChild(RenderObject*);
@@ -90,7 +89,6 @@
virtual bool itemIsEnabled(unsigned listIndex) const;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const;
virtual PopupMenuStyle menuStyle() const;
- virtual LayoutRect boundingBoxRect() const;
virtual int clientInsetLeft() const;
virtual int clientInsetRight() const;
virtual int clientPaddingLeft() const;
Modified: trunk/Source/WebCore/rendering/RenderObject.h (97219 => 97220)
--- trunk/Source/WebCore/rendering/RenderObject.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -52,7 +52,6 @@
class InlineFlowBox;
class OverlapTestRequestClient;
class Path;
-class PopupMenuClient;
class Position;
class RenderBoxModelObject;
class RenderInline;
@@ -297,7 +296,6 @@
#if ENABLE(METER_TAG)
virtual bool isMeter() const { return false; }
#endif
- virtual bool isPopupMenuClient() const { return false; }
#if ENABLE(PROGRESS_TAG)
virtual bool isProgress() const { return false; }
#endif
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (97219 => 97220)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -174,7 +174,7 @@
m_searchPopup->saveRecentSearches(name, m_recentSearches);
}
- m_searchPopup->popupMenu()->show(boundingBoxRect(), document()->view(), -1);
+ m_searchPopup->popupMenu()->show(absoluteBoundingBoxRect(), document()->view(), -1);
}
void RenderTextControlSingleLine::hidePopup()
@@ -613,11 +613,6 @@
return PopupMenuStyle(style()->visitedDependentColor(CSSPropertyColor), style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->font(), style()->visibility() == VISIBLE, style()->display() == NONE, style()->textIndent(), style()->direction(), style()->unicodeBidi() == Override);
}
-LayoutRect RenderTextControlSingleLine::boundingBoxRect() const
-{
- return absoluteBoundingBoxRect();
-}
-
int RenderTextControlSingleLine::clientInsetLeft() const
{
// Inset the menu by the radius of the cap on the left so that
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h (97219 => 97220)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -56,7 +56,6 @@
private:
virtual bool hasControlClip() const;
virtual LayoutRect controlClipRect(const LayoutPoint&) const;
- virtual bool isPopupMenuClient() const { return true; }
virtual bool isTextField() const { return true; }
virtual void paint(PaintInfo&, const LayoutPoint&);
@@ -101,7 +100,6 @@
virtual bool itemIsEnabled(unsigned listIndex) const;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const;
virtual PopupMenuStyle menuStyle() const;
- virtual LayoutRect boundingBoxRect() const;
virtual int clientInsetLeft() const;
virtual int clientInsetRight() const;
virtual int clientPaddingLeft() const;
Modified: trunk/Source/WebCore/testing/Internals.cpp (97219 => 97220)
--- trunk/Source/WebCore/testing/Internals.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/testing/Internals.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -36,7 +36,6 @@
#include "FrameView.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
-#include "HTMLSelectElement.h"
#include "HTMLTextAreaElement.h"
#include "InspectorController.h"
#include "IntRect.h"
@@ -45,9 +44,7 @@
#if ENABLE(GESTURE_EVENTS)
#include "PlatformGestureEvent.h"
#endif
-#include "PopupMenuClient.h"
#include "Range.h"
-#include "RenderMenuList.h"
#include "RenderObject.h"
#include "RenderTreeAsText.h"
#if ENABLE(SMOOTH_SCROLLING)
@@ -438,62 +435,4 @@
frameView->scrollElementToRect(element, IntRect(x, y, w, h));
}
-static const PopupMenuClient* toPopupMenuClient(RenderObject* object)
-{
- ASSERT(!object || object->isPopupMenuClient());
- if (!object)
- return 0;
-
- // Special case: RenderMenuList uses multiple inheritance and so,
- // depending on the compiler, we may end up in a situation where
- // the first vptr does not point to the PopupMenuClient's vtable,
- // and so we'd end up calling the wrong method. Thus, we first cast to
- // RenderMenuList and then to PopupMenuClient which will automagically
- // take into account thunking if necessary (the casting will actually shift
- // the pointer over to the PopupMenuClient part of the object).
- if (object->isMenuList())
- return static_cast<PopupMenuClient*>(toRenderMenuList(object));
-
- return reinterpret_cast<PopupMenuClient*>(object);
}
-
-int Internals::popupClientPaddingLeft(Element* element, ExceptionCode& ec)
-{
- if (!element || !element->renderer()) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
- element->document()->updateLayoutIgnorePendingStylesheets();
- RenderObject* renderer = element->renderer();
- if (renderer->isPopupMenuClient())
- return toPopupMenuClient(renderer)->clientPaddingLeft();
- return 0;
-}
-
-int Internals::popupClientPaddingRight(Element* element, ExceptionCode& ec)
-{
- if (!element || !element->renderer()) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
- element->document()->updateLayoutIgnorePendingStylesheets();
- RenderObject* renderer = element->renderer();
- if (renderer->isPopupMenuClient())
- return toPopupMenuClient(renderer)->clientPaddingRight();
- return 0;
-}
-
-PassRefPtr<ClientRect> Internals::popupClientBoundingBoxRect(Element* element, ExceptionCode& ec)
-{
- if (!element || !element->renderer()) {
- ec = INVALID_ACCESS_ERR;
- return ClientRect::create();
- }
- element->document()->updateLayoutIgnorePendingStylesheets();
- RenderObject* renderer = element->renderer();
- if (renderer->isPopupMenuClient())
- return ClientRect::create(toPopupMenuClient(renderer)->boundingBoxRect());
- return ClientRect::create();
-}
-
-}
Modified: trunk/Source/WebCore/testing/Internals.h (97219 => 97220)
--- trunk/Source/WebCore/testing/Internals.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/testing/Internals.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -38,9 +38,7 @@
class Document;
class Element;
class Node;
-class PopupMenuClient;
class Range;
-class RenderObject;
class Internals : public RefCounted<Internals> {
public:
@@ -94,10 +92,6 @@
void setSuggestedValue(Element* inputElement, const String&, ExceptionCode&);
void scrollElementToRect(Element*, long x, long y, long w, long h, ExceptionCode&);
- int popupClientPaddingLeft(Element*, ExceptionCode&);
- int popupClientPaddingRight(Element*, ExceptionCode&);
- PassRefPtr<ClientRect> popupClientBoundingBoxRect(Element*, ExceptionCode&);
-
static const char* internalsId;
void paintControlTints(Document*, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/Internals.idl (97219 => 97220)
--- trunk/Source/WebCore/testing/Internals.idl 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebCore/testing/Internals.idl 2011-10-12 02:42:18 UTC (rev 97220)
@@ -67,10 +67,6 @@
void paintControlTints(in Document document) raises (DOMException);
void scrollElementToRect(in Element element, in long x, in long y, in long w, in long h) raises (DOMException);
-
- int popupClientPaddingLeft(in Element element) raises (DOMException);
- int popupClientPaddingRight(in Element element) raises (DOMException);
- ClientRect popupClientBoundingBoxRect(in Element element) raises (DOMException);
};
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (97219 => 97220)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-10-12 02:42:18 UTC (rev 97220)
@@ -1,3 +1,19 @@
+2011-10-11 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r97202, r97207, and r97215.
+ http://trac.webkit.org/changeset/97202
+ http://trac.webkit.org/changeset/97207
+ http://trac.webkit.org/changeset/97215
+ https://bugs.webkit.org/show_bug.cgi?id=69894
+
+ Broke builds (Requested by rniwa on #webkit).
+
+ * src/AutofillPopupMenuClient.cpp:
+ * src/AutofillPopupMenuClient.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+ * tests/PopupMenuTest.cpp:
+
2011-10-11 Ryosuke Niwa <[email protected]>
Second attempt to fix Chromium Windows build after r97202.
Modified: trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp (97219 => 97220)
--- trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -216,13 +216,6 @@
return RenderTheme::defaultTheme()->popupInternalPaddingRight(style);
}
-WebCore::LayoutRect AutofillPopupMenuClient::boundingBoxRect() const
-{
- if (m_textField)
- return m_textField->getRect();
- return WebCore::LayoutRect();
-}
-
void AutofillPopupMenuClient::popupDidHide()
{
WebViewImpl* webView = getWebView();
Modified: trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.h (97219 => 97220)
--- trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.h 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.h 2011-10-12 02:42:18 UTC (rev 97220)
@@ -31,7 +31,6 @@
#ifndef AutofillPopupMenuClient_h
#define AutofillPopupMenuClient_h
-#include "LayoutTypes.h"
#include "PopupMenuClient.h"
namespace WebCore {
@@ -83,7 +82,6 @@
virtual bool itemIsEnabled(unsigned listIndex) const;
virtual WebCore::PopupMenuStyle itemStyle(unsigned listIndex) const;
virtual WebCore::PopupMenuStyle menuStyle() const;
- virtual WebCore::LayoutRect boundingBoxRect() const;
virtual int clientInsetLeft() const { return 0; }
virtual int clientInsetRight() const { return 0; }
virtual int clientPaddingLeft() const;
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (97219 => 97220)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -2241,7 +2241,7 @@
if (m_autofillPopupShowing) {
refreshAutofillPopup();
} else {
- m_autofillPopup->showInRect(m_autofillPopupClient->boundingBoxRect(), focusedNode->ownerDocument()->view(), 0);
+ m_autofillPopup->showInRect(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
m_autofillPopupShowing = true;
}
}
Modified: trunk/Source/WebKit/chromium/tests/PopupMenuTest.cpp (97219 => 97220)
--- trunk/Source/WebKit/chromium/tests/PopupMenuTest.cpp 2011-10-12 02:26:45 UTC (rev 97219)
+++ trunk/Source/WebKit/chromium/tests/PopupMenuTest.cpp 2011-10-12 02:42:18 UTC (rev 97220)
@@ -98,7 +98,6 @@
return PopupMenuStyle(Color::black, Color::white, font, true, false, Length(), TextDirection(), false /* has text direction override */);
}
virtual PopupMenuStyle menuStyle() const { return itemStyle(0); }
- virtual LayoutRect boundingBoxRect() const { return LayoutRect(); }
virtual int clientInsetLeft() const { return 0; }
virtual int clientInsetRight() const { return 0; }
virtual int clientPaddingLeft() const { return 0; }
@@ -120,6 +119,7 @@
void setDisabledIndex(unsigned index) { m_disabledIndexSet.insert(index); }
void setFocusedNode(Node* node) { m_node = node; }
+
private:
unsigned m_selectIndex;
std::set<unsigned> m_disabledIndexSet;