RESOLVED FIXED 48216
Need a way to determine the screen rect for a form control in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=48216
Summary Need a way to determine the screen rect for a form control in WebKit2
Sam Weinig
Reported 2010-10-24 17:39:47 PDT
Need a way to determine the screen rect for a form control in WebKit2. In old WebKit, Safari on Mac used [DOMHTMLInputElement _rectOnScreen] in DOMPrivate.h.
Attachments
Patch (13.44 KB, patch)
2010-10-24 17:43 PDT, Sam Weinig
mitz: review+
Sam Weinig
Comment 1 2010-10-24 17:43:40 PDT
Sam Weinig
Comment 2 2010-10-24 17:43:58 PDT
WebKit Review Bot
Comment 3 2010-10-24 17:52:13 PDT
Attachment 71703 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:33: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 4 2010-10-24 17:56:00 PDT
Comment on attachment 71703 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=71703&action=review > WebCore/dom/Element.cpp:485 > + IntRect result = quads[0].enclosingBoundingBox(); > + for (size_t i = 1; i < quads.size(); ++i) > + result.unite(quads[i].enclosingBoundingBox()); Can just start with the empty rect and start the loop from 0, but I guess this is slightly more efficient. > WebCore/dom/Element.cpp:489 > + FrameView* view = document()->view(); > + if (!view) > + return IntRect(); This can go closer to the beginning. > WebKit2/WebKit2.xcodeproj/project.pbxproj:481 > - remoteGlobalIDString = C0CE72851247E66800BC0EC4 /* Derived Sources */; > + remoteGlobalIDString = C0CE72851247E66800BC0EC4; Don’t land this.
Sam Weinig
Comment 5 2010-10-24 18:10:57 PDT
Simon Fraser (smfr)
Comment 6 2016-10-30 12:10:22 PDT
Why didn't this share code with clientRect() or getBoundingClientRect()?
Note You need to log in before you can comment on or make changes to this bug.