scrolledContentOffset is already available as an IntPoint. We should just use it.
Created attachment 49182 [details] Patch
Comment on attachment 49182 [details] Patch An excellent idea. > + IntRect clipRect(IntPoint() + m_offset + renderer->view()->layoutDelta(), layer->size()); It's annoying that the way to convert an IntSize to an IntPoint is to do "IntPoint() + size". That might end up doing addition to zero instead of just converting the type. I wish there was a clean idiom for doing that without addition. > void RenderBlock::offsetForContents(int& tx, int& ty) const These arguments are just begging to be turned into an IntPoint&. Some day. > FloatPoint offsetFromRepaintContainer = transformState.mappedPoint(); > - int x = offsetFromRepaintContainer.x(); > - int y = offsetFromRepaintContainer.y(); > > if (hasOverflowClip()) > - layer()->subtractScrolledContentOffset(x, y); > + offsetFromRepaintContainer -= layer()->scrolledContentOffset(); > + > + int x = offsetFromRepaintContainer.x(); > + int y = offsetFromRepaintContainer.y(); The old code did integer subtraction. This new code does floating point subtraction. r=me too (I see mitz reviewed)
http://trac.webkit.org/changeset/55090