Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 12616003: Merge 144350 (Closed)

Created:
7 years, 9 months ago by Xianzhu
Modified:
7 years, 9 months ago
Reviewers:
Xianzhu
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Visibility:
Public.

Description

Merge 144350 > Focus ring for a child layer is incorrectly offset by ancestor composited layer's position > https://bugs.webkit.org/show_bug.cgi?id=110895 > > Reviewed by Simon Fraser. > > Source/WebCore: > > Test: compositing/sub-layer-focus-ring.html > > The problem occurs in RenderBlock::addFocusRingRects() where the absolute position of a sub-layer is used to calculate the focus ring rect of the layer. > Should use the relative position to the current paintContainer instead. > > To fix the issue: > - RenderLayer passes LayerPaintingInfo.rootLayer to PaintInfo.paintContainer > - Let RenderObject::paintFocusRing() and RenderObject::paintOutline() take PaintInfo instead of GraphicsContext* so that the paintContainer can be passed > - RenderBlock::addFocusRingRects() uses localToContainerPoint(FloatPoint(), paintContainer) instead of localToAbsolute() to calculate the focus ring rect of a sublayer. > > * rendering/PaintInfo.h: > (WebCore): > (WebCore::PaintInfo::PaintInfo): Add a field paintContainer (the RenderLayerModelObject which originates the current painting) > (PaintInfo): > * rendering/RenderBlock.cpp: > (WebCore::RenderBlock::paintObject): > (WebCore::RenderBlock::paintContinuationOutlines): > (WebCore::RenderBlock::addFocusRingRects): Use the added paintContainer parameter to calculate the relative offset of the child layer. > * rendering/RenderLayer.cpp: > (WebCore::RenderLayer::paintBackgroundForFragments): Pass LayerPaintingInfo.rootLayer to PaintInfo.paintContainer. > (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase): Ditto. > (WebCore::RenderLayer::paintOutlineForFragments): Ditto. > (WebCore::RenderLayer::paintMaskForFragments): Ditto. > * rendering/RenderLayer.cpp: > * rendering/RenderObject.cpp: > (WebCore::RenderObject::paintFocusRing): Now takes PaintInfo instead of GraphicsContext*. Pass paintInfo.paintContainer to addFocusRingRects(). > (WebCore::RenderObject::paintOutline): Now takes PaintInfo instead of GraphicsContext*. > (WebCore::RenderObject::absoluteFocusRingQuads): > * rendering/RenderObject.h: > (WebCore::RenderObject::addFocusRingRects): Add paintContainer parameter. > > LayoutTests: > > New ref test for the bug. > > * compositing/sub-layer-focus-ring-expected.html: Added. > * compositing/sub-layer-focus-ring.html: Added. > TBR=wangxianzhu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=145087

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -56 lines) Patch
A + LayoutTests/compositing/sub-layer-focus-ring.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/compositing/sub-layer-focus-ring-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/rendering/PaintInfo.h View 4 chunks +5 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/RenderBlock.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderBlock.cpp View 5 chunks +7 lines, -7 lines 0 comments Download
M Source/WebCore/rendering/RenderBox.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderBox.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderInline.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/RenderInline.cpp View 3 chunks +8 lines, -7 lines 0 comments Download
M Source/WebCore/rendering/RenderLayer.cpp View 4 chunks +5 lines, -4 lines 0 comments Download
M Source/WebCore/rendering/RenderLineBoxList.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderListBox.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderListBox.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/RenderObject.h View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/WebCore/rendering/RenderObject.cpp View 4 chunks +11 lines, -10 lines 0 comments Download
M Source/WebCore/rendering/RenderReplaced.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderTable.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderTableRow.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderTableSection.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderTextControl.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderTextControl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderWidget.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGContainer.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGContainer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGImage.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGImage.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGShape.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGShape.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Xianzhu
7 years, 9 months ago (2013-03-07 17:16:43 UTC) #1
Xianzhu
7 years, 9 months ago (2013-03-07 17:17:11 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r145087.

Powered by Google App Engine
This is Rietveld 408576698