Changeset 123214 in webkit
- Timestamp:
- Jul 20, 2012 7:23:37 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r123212 r123214 1 2012-07-20 Pierre Rossi <pierre.rossi@gmail.com> 2 3 ColorChooserClient should expose the element's location 4 https://bugs.webkit.org/show_bug.cgi?id=91767 5 6 Reviewed by Kent Tamura. 7 8 The rationale is that the chrome client could have an interest in placing the picker next to 9 the element for usability reasons. 10 11 No new tests as there is not much logic here: Just exposing a geometry information to WebKit. 12 13 * html/ColorInputType.cpp: 14 (WebCore::ColorInputType::elementRectRelativeToWindow): 15 (WebCore): 16 * html/ColorInputType.h: 17 (ColorInputType): 18 * platform/ColorChooserClient.h: 19 (ColorChooserClient): 20 1 21 2012-07-20 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 22 -
trunk/Source/WebCore/html/ColorInputType.cpp
r123082 r123214 39 39 #include "HTMLInputElement.h" 40 40 #include "MouseEvent.h" 41 #include "RenderObject.h" 42 #include "RenderView.h" 41 43 #include "ScriptController.h" 42 44 #include "ShadowRoot.h" … … 196 198 } 197 199 200 IntRect ColorInputType::elementRectRelativeToWindow() const 201 { 202 RenderObject* renderer = element()->renderer(); 203 ASSERT(renderer); 204 return pixelSnappedIntRect(renderer->view()->frameView()->contentsToWindow(renderer->absoluteBoundingBoxRect())); 205 } 206 198 207 } // namespace WebCore 199 208 -
trunk/Source/WebCore/html/ColorInputType.h
r115704 r123214 47 47 virtual void didChooseColor(const Color&) OVERRIDE; 48 48 virtual void didEndChooser() OVERRIDE; 49 virtual IntRect elementRectRelativeToWindow() const OVERRIDE; 49 50 50 51 private: -
trunk/Source/WebCore/platform/ColorChooserClient.h
r112658 r123214 5 5 6 6 #include "ColorChooser.h" 7 #include "IntRect.h" 7 8 #include <wtf/OwnPtr.h> 8 9 #include <wtf/PassOwnPtr.h> … … 18 19 virtual void didChooseColor(const Color&) = 0; 19 20 virtual void didEndChooser() = 0; 21 virtual IntRect elementRectRelativeToWindow() const = 0; 20 22 }; 21 23
Note: See TracChangeset
for help on using the changeset viewer.