Changeset 188577 in webkit
- Timestamp:
- Aug 17, 2015 11:03:51 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r188566 r188577 1 2015-08-17 Zalan Bujtas <zalan@apple.com> 2 3 Outline with auto style leaves bits behind when the the box is moved. 4 https://bugs.webkit.org/show_bug.cgi?id=148100 5 6 Reviewed by Simon Fraser. 7 8 Due to RenderView::maximalOutlineSize() each outline width need to be tested separately. 9 10 * fast/repaint/outline-with1px-auto-repaint-rect-expected.txt: Added. 11 * fast/repaint/outline-with1px-auto-repaint-rect.html: Added. 12 * fast/repaint/outline-with2px-auto-repaint-rect-expected.txt: Added. 13 * fast/repaint/outline-with2px-auto-repaint-rect.html: Added. 14 * fast/repaint/outline-with3px-auto-repaint-rect-expected.txt: Added. 15 * fast/repaint/outline-with3px-auto-repaint-rect.html: Added. 16 1 17 2015-08-17 Myles C. Maxfield <mmaxfield@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r188575 r188577 1 2015-08-17 Zalan Bujtas <zalan@apple.com> 2 3 Outline with auto style leaves bits behind when the the box is moved. 4 https://bugs.webkit.org/show_bug.cgi?id=148100 5 6 Reviewed by Simon Fraser. 7 8 We paint the focus ring when 'outline-style: auto' is present, however 9 we don't take the focus ring width into account when the repaint rect 10 is computed. 11 12 Tests: fast/repaint/outline-with1px-auto-repaint-rect.html 13 fast/repaint/outline-with2px-auto-repaint-rect.html 14 fast/repaint/outline-with3px-auto-repaint-rect.html 15 16 * rendering/RenderObject.cpp: 17 (WebCore::RenderObject::adjustRectForOutlineAndShadow): 18 * rendering/RenderThemeMac.h: 19 * rendering/RenderThemeMac.mm: 20 (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. : 0 as focus ring width is incorrect. 21 The reason why r169699 fixed the failing cases was because they all had outline width < 3 (but no auto outline style). 22 The correct fix is to check if the style requires focus ring painting and use the RenderTheme::platformFocusRingMaxWidth 23 accordingly. 24 1 25 2015-08-17 Myles C. Maxfield <mmaxfield@apple.com> 2 26 -
trunk/Source/WebCore/rendering/RenderElement.cpp
r188530 r188577 365 365 #endif 366 366 367 void RenderElement::computeMaxOutlineSize() const 368 { 369 // We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen 370 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). 371 if (!m_style->outlineWidth()) 372 return; 373 int maxOutlineSize = m_style->outlineSize(); 374 if (m_style->outlineStyleIsAuto()) 375 maxOutlineSize = std::max(theme().platformFocusRingMaxWidth(), maxOutlineSize); 376 377 if (maxOutlineSize < maximalOutlineSize(PaintPhaseOutline)) 378 return; 379 380 view().setMaximalOutlineSize(maxOutlineSize); 381 } 382 367 383 void RenderElement::initializeStyle() 368 384 { … … 381 397 #endif 382 398 383 // We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen 384 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). 385 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSize(PaintPhaseOutline)) 386 view().setMaximalOutlineSize(std::max(theme().platformFocusRingMaxWidth(), static_cast<int>(m_style->outlineSize()))); 387 399 computeMaxOutlineSize(); 400 388 401 styleDidChange(StyleDifferenceNewStyle, nullptr); 389 402 … … 435 448 #endif 436 449 437 // We need to ensure that view->maximalOutlineSize() is valid for any repaints that happen 438 // during styleDidChange (it's used by clippedOverflowRectForRepaint()). 439 if (m_style->outlineWidth() > 0 && m_style->outlineSize() > maximalOutlineSize(PaintPhaseOutline)) 440 view().setMaximalOutlineSize(std::max(theme().platformFocusRingMaxWidth(), static_cast<int>(m_style->outlineSize()))); 450 computeMaxOutlineSize(); 441 451 442 452 bool doesNotNeedLayout = !parent(); -
trunk/Source/WebCore/rendering/RenderElement.h
r188530 r188577 312 312 bool shouldWillChangeCreateStackingContext() const; 313 313 314 void computeMaxOutlineSize() const; 315 314 316 unsigned m_baseTypeFlags : 6; 315 317 unsigned m_ancestorLineBoxDirty : 1; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r188420 r188577 1918 1918 { 1919 1919 int outlineSize = outlineStyleForRepaint().outlineSize(); 1920 if (outlineStyleForRepaint().outlineStyleIsAuto()) 1921 outlineSize = std::max(theme().platformFocusRingMaxWidth(), outlineSize); 1920 1922 if (const ShadowData* boxShadow = style().boxShadow()) { 1921 1923 boxShadow->adjustRectForShadow(rect, outlineSize); 1922 1924 return; 1923 1925 } 1924 1925 1926 rect.inflate(outlineSize); 1926 1927 } -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r188510 r188577 62 62 virtual Color platformInactiveListBoxSelectionForegroundColor() const override; 63 63 virtual Color platformFocusRingColor() const override; 64 virtual int platformFocusRingMaxWidth() const override;65 64 66 65 virtual ScrollbarControlSize scrollbarControlSizeForPart(ControlPart) override { return SmallScrollbar; } -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r188510 r188577 307 307 } 308 308 309 int RenderThemeMac::platformFocusRingMaxWidth() const310 {311 // FIXME: Shouldn't this function be named platformFocusRingMinWidth? But also, I'm not sure if this function is needed - looks like312 // all platforms just used 0 for this before <http://trac.webkit.org/changeset/168397>.313 return 0;314 }315 316 309 Color RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor() const 317 310 {
Note: See TracChangeset
for help on using the changeset viewer.