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.
Created attachment 71703 [details] Patch
<rdar://problem/8530670>
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.
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.
Landed in http://trac.webkit.org/changeset/70428.
Why didn't this share code with clientRect() or getBoundingClientRect()?