Changeset 140202 in webkit
- Timestamp:
- Jan 18, 2013 1:44:25 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140198 r140202 1 2013-01-18 Chris Hopman <cjhopman@google.com> 2 3 Fix scrollRectToVisible in the presence of transforms 4 https://bugs.webkit.org/show_bug.cgi?id=105574 5 6 Reviewed by Simon Fraser. 7 8 * editing/input/reveal-caret-of-transformed-input-scrollable-parent.html: Added. 9 * editing/input/reveal-caret-of-transformed-input-scrollable-parent-expected.txt: Added. 10 Test that when scrolling an overflow layer to reveal a rect, the rect 11 passed to the parent to scroll is calculated properly. 12 * editing/input/reveal-caret-of-transformed-multiline-input.html: Added. 13 * editing/input/reveal-caret-of-transformed-multiline-input-expected.txt: Added. 14 Test that scrolling to reveal a rect works properly on a transformed 15 overflow layer. 16 17 * platform/chromium/TestExpectations: 18 * platform/mac/TestExpectations: 19 1 20 2013-01-18 Julien Chaffraix <jchaffraix@webkit.org> 2 21 -
trunk/LayoutTests/platform/chromium/TestExpectations
r140196 r140202 4312 4312 webkit.org/b/107033 [ Debug ] fast/css/stylesheet-enable-first-alternate-link.html [ Crash ] 4313 4313 4314 # Needs rebaseline. 4315 webkit.org/b/105574 editing/input/caret-at-the-edge-of-contenteditable.html [ Failure ] 4316 webkit.org/b/105574 editing/input/reveal-caret-of-multiline-contenteditable.html [ Failure ] 4317 webkit.org/b/105574 editing/input/reveal-caret-of-multiline-input.html [ Failure ] 4318 webkit.org/b/105574 platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar.html [ ImageOnlyFailure ] 4319 webkit.org/b/105574 platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar.html [ ImageOnlyFailure ] 4320 webkit.org/b/105574 platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar.html [ ImageOnlyFailure ] 4321 4314 4322 # This is won't fix, as the debug and release versions differ. 4315 4323 webkit.org/b/99138 [ Debug SnowLeopard ] svg/custom/foreign-object-skew.svg [ ImageOnlyFailure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r140192 r140202 1281 1281 webkit.org/b/103955 fast/repaint/caret-with-transformation.html [ Missing ] 1282 1282 1283 # Needs rebaseline. 1284 webkit.org/b/105574 editing/input/caret-at-the-edge-of-contenteditable.html [ Failure ] 1285 webkit.org/b/105574 editing/input/reveal-caret-of-multiline-contenteditable.html [ Failure ] 1286 webkit.org/b/105574 editing/input/reveal-caret-of-multiline-input.html [ Failure ] 1287 webkit.org/b/105574 fast/spatial-navigation/snav-div-overflow-scrol-hidden.html [ Failure ] 1288 1283 1289 # Rebaseline required after https://webkit.org/b/107208 1284 1290 webkit.org/b/107208 fast/regions/overflow-moving-below-floats-in-variable-width-regions.html [ Pass Failure ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r140198 r140202 1 2013-01-18 Chris Hopman <cjhopman@google.com> 2 3 Fix scrollRectToVisible in the presence of transforms 4 https://bugs.webkit.org/show_bug.cgi?id=105574 5 6 Reviewed by Simon Fraser. 7 8 When scrolling to reveal an overflow layer, the required scroll was 9 being calculated in absolute coordinates. To properly account for 10 transforms, this calculation should be done in the local coordinates 11 of the renderBox. 12 13 Tests: editing/input/reveal-selection-transformed-overflow-parent.html 14 editing/input/reveal-selection-transformed-textarea.html 15 16 * rendering/RenderLayer.cpp: 17 (WebCore::RenderLayer::scrollRectToVisible): 18 When scrolling to reveal an overflow layer, calculate the required 19 scroll in the local coordinates of the RenderBox. 20 * rendering/RenderObject.cpp: 21 (WebCore::RenderObject::absoluteToLocalQuad): 22 (WebCore): 23 * rendering/RenderObject.h: 24 (RenderObject): 25 Add function to convert an absolute quad to a local quad. 26 1 27 2013-01-18 Julien Chaffraix <jchaffraix@webkit.org> 2 28 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r140192 r140202 2143 2143 RenderBox* box = renderBox(); 2144 2144 ASSERT(box); 2145 FloatPoint absPos = box->localToAbsolute(); 2146 absPos.move(box->borderLeft(), box->borderTop()); 2147 2148 LayoutRect layerBounds = LayoutRect(absPos.x() + scrollXOffset(), absPos.y() + scrollYOffset(), box->clientWidth(), box->clientHeight()); 2149 LayoutRect exposeRect = LayoutRect(rect.x() + scrollXOffset(), rect.y() + scrollYOffset(), rect.width(), rect.height()); 2150 LayoutRect r = getRectToExpose(layerBounds, exposeRect, alignX, alignY); 2151 2152 int roundedAdjustedX = roundToInt(r.x() - absPos.x()); 2153 int roundedAdjustedY = roundToInt(r.y() - absPos.y()); 2154 IntSize clampedScrollOffset = clampScrollOffset(IntSize(roundedAdjustedX, roundedAdjustedY)); 2145 LayoutRect localExposeRect(box->absoluteToLocalQuad(FloatQuad(FloatRect(rect)), UseTransforms).boundingBox()); 2146 LayoutRect layerBounds(0, 0, box->clientWidth(), box->clientHeight()); 2147 LayoutRect r = getRectToExpose(layerBounds, localExposeRect, alignX, alignY); 2148 2149 IntSize clampedScrollOffset = clampScrollOffset(scrollOffset() + toIntSize(roundedIntRect(r).location())); 2155 2150 if (clampedScrollOffset != scrollOffset()) { 2156 2151 IntSize oldScrollOffset = scrollOffset(); 2157 2152 scrollToOffset(clampedScrollOffset); 2158 2153 IntSize scrollOffsetDifference = scrollOffset() - oldScrollOffset; 2159 newRect.move(-scrollOffsetDifference); 2154 localExposeRect.move(-scrollOffsetDifference); 2155 newRect = LayoutRect(box->localToAbsoluteQuad(FloatQuad(FloatRect(localExposeRect)), UseTransforms).boundingBox()); 2160 2156 } 2161 2157 } else if (!parentLayer && renderer()->isBox() && renderBox()->canBeProgramaticallyScrolled()) { … … 2184 2180 if (frameView->safeToPropagateScrollToParent()) { 2185 2181 parentLayer = ownerElement->renderer()->enclosingLayer(); 2182 // FIXME: This doesn't correctly convert the rect to 2183 // absolute coordinates in the parent. 2186 2184 newRect.setX(rect.x() - frameView->scrollX() + frameView->x()); 2187 2185 newRect.setY(rect.y() - frameView->scrollY() + frameView->y()); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r140097 r140202 2051 2051 } 2052 2052 2053 FloatQuad RenderObject::absoluteToLocalQuad(const FloatQuad& quad, MapCoordinatesFlags mode) const 2054 { 2055 TransformState transformState(TransformState::UnapplyInverseTransformDirection, quad.boundingBox().center(), quad); 2056 mapAbsoluteToLocalPoint(mode, transformState); 2057 transformState.flatten(); 2058 return transformState.lastPlanarQuad(); 2059 } 2060 2053 2061 void RenderObject::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const 2054 2062 { -
trunk/Source/WebCore/rendering/RenderObject.h
r140068 r140202 735 735 return localToContainerQuad(quad, 0, mode, wasFixed); 736 736 } 737 // Convert an absolute quad to local coordinates. 738 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0) const; 737 739 738 740 // Convert a local quad into the coordinate system of container, taking transforms into account.
Note: See TracChangeset
for help on using the changeset viewer.