Element.getBoudingClientRect() and Element.getClientRects() should not scale back the rects if the element is in a frame because page scale only apply to elements in the main frame.
Created attachment 146068 [details] patch
Created attachment 146075 [details] patch v2 (removed extra code in layout test)
Looks like frame()->frameScaleFactor() was already introduced for this purpose in bug 68081 , maybe we can reuse that?
Created attachment 146098 [details] patch v3 (using Frame::frameScaleFactor()) Thanks Alex for your good idea.
Comment on attachment 146098 [details] patch v3 (using Frame::frameScaleFactor()) View in context: https://bugs.webkit.org/attachment.cgi?id=146098&action=review R=me > Source/WebCore/ChangeLog:3 > + Element.getBoudingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page typo "bouding" -> "bounding" > Source/WebCore/dom/Document.cpp:6041 > + extra newline > LayoutTests/fast/dom/Element/scale-page-bounding-client-rect-in-frame.html:1 > +<html> please use <!DOCTYPE html> for this and other new test files unless you explicitly want to test quirks mode behavior
Comment on attachment 146098 [details] patch v3 (using Frame::frameScaleFactor()) View in context: https://bugs.webkit.org/attachment.cgi?id=146098&action=review >> Source/WebCore/ChangeLog:3 >> + Element.getBoudingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page > > typo "bouding" -> "bounding" Done (also other places) >> Source/WebCore/dom/Document.cpp:6041 >> + > > extra newline Done. >> LayoutTests/fast/dom/Element/scale-page-bounding-client-rect-in-frame.html:1 >> +<html> > > please use <!DOCTYPE html> for this and other new test files unless you explicitly want to test quirks mode behavior Done (also other places). Also changed "xxxPageScale" in the change to "xxxFrameScale" as per Grace's suggestion.
Created attachment 146146 [details] patch for landing
Comment on attachment 146146 [details] patch for landing Clearing flags on attachment: 146146 Committed r119690: <http://trac.webkit.org/changeset/119690>
All reviewed patches have been landed. Closing bug.
I wish we could have just fixed absoluteQuads() to not include frame scale, rather than adding code to adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale() to remove frame scale from the quads again. We don't have a clear policy about when localToAbsolute() stuff includes frame scale, but could add one.