Changeset 196439 in webkit
- Timestamp:
- Feb 11, 2016 2:15:45 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196434 r196439 1 2016-02-11 Zalan Bujtas <zalan@apple.com> 2 3 Subpixel rendering: Make focusring painting subpixel aware. 4 https://bugs.webkit.org/show_bug.cgi?id=154111 5 6 Reviewed by David Hyatt. 7 8 Do not integral snap focusring rects while collecting them (use device pixel snapping instead 9 right before passing them to GraphicsContext::drawFocusRing). 10 11 * platform/mac/accessibility/image-link-expected.txt: 12 * platform/mac/accessibility/mac/aria-columnrowheaders-expected.txt: Copied from LayoutTests/platform/mac/accessibility/table-cells-expected.txt. 13 * platform/mac/accessibility/mac/document-links-expected.txt: Added. 14 * platform/mac/accessibility/table-attributes-expected.txt: 15 * platform/mac/accessibility/table-cells-expected.txt: 16 * platform/mac/accessibility/table-sections-expected.txt: 17 * platform/mac/accessibility/table-with-rules-expected.txt: 18 1 19 2016-02-11 Sukolsak Sakshuwong <sukolsak@gmail.com> 2 20 -
trunk/LayoutTests/accessibility/mac/aria-columnrowheaders-expected.txt
r190833 r196439 47 47 AXHelp: 48 48 AXParent: <AXCell> 49 AXSize: NSSize: {5 6, 18}49 AXSize: NSSize: {54, 18} 50 50 AXTitle: 51 51 AXDescription: … … 116 116 AXHelp: 117 117 AXParent: <AXCell> 118 AXSize: NSSize: {2 9, 18}118 AXSize: NSSize: {28, 18} 119 119 AXTitle: 120 120 AXDescription: … … 150 150 AXHelp: 151 151 AXParent: <AXCell> 152 AXSize: NSSize: {2 9, 18}152 AXSize: NSSize: {28, 18} 153 153 AXTitle: 154 154 AXDescription: -
trunk/LayoutTests/accessibility/mac/document-links-expected.txt
r187799 r196439 96 96 AXHelp: 97 97 AXParent: <AXLink: 'link 4'> 98 AXSize: NSSize: {3 8, 18}98 AXSize: NSSize: {37, 18} 99 99 AXTitle: link 4 100 100 AXDescription: -
trunk/LayoutTests/platform/mac/accessibility/image-link-expected.txt
r171360 r196439 10 10 AXHelp: 11 11 AXParent: <AXLink: 'Delicious cake'> 12 AXSize: NSSize: {280, 21 4}12 AXSize: NSSize: {280, 215} 13 13 AXTitle: Delicious cake 14 14 AXDescription: -
trunk/LayoutTests/platform/mac/accessibility/table-attributes-expected.txt
r191623 r196439 15 15 AXHelp: 16 16 AXParent: <AXCell> 17 AXSize: NSSize: {14 4, 66}17 AXSize: NSSize: {145, 66} 18 18 AXTitle: 19 19 AXDescription: … … 49 49 AXHelp: 50 50 AXParent: <AXCell> 51 AXSize: NSSize: {14 4, 66}51 AXSize: NSSize: {145, 66} 52 52 AXTitle: 53 53 AXDescription: … … 488 488 AXHelp: 489 489 AXParent: <AXRow> 490 AXSize: NSSize: {33 6, 30}490 AXSize: NSSize: {335, 30} 491 491 AXTitle: 492 492 AXDescription: … … 516 516 AXHelp: 517 517 AXParent: <AXRow> 518 AXSize: NSSize: {33 6, 36}518 AXSize: NSSize: {335, 36} 519 519 AXTitle: 520 520 AXDescription: … … 544 544 AXHelp: 545 545 AXParent: <AXRow> 546 AXSize: NSSize: {33 6, 30}546 AXSize: NSSize: {335, 30} 547 547 AXTitle: 548 548 AXDescription: … … 572 572 AXHelp: 573 573 AXParent: <AXRow> 574 AXSize: NSSize: {33 6, 30}574 AXSize: NSSize: {335, 30} 575 575 AXTitle: 576 576 AXDescription: … … 1084 1084 AXHelp: 1085 1085 AXParent: <AXGroup> 1086 AXSize: NSSize: {33 6, 66}1086 AXSize: NSSize: {335, 66} 1087 1087 AXTitle: 1088 1088 AXDescription: -
trunk/LayoutTests/platform/mac/accessibility/table-cells-expected.txt
r191623 r196439 17 17 AXHelp: 18 18 AXParent: <AXCell> 19 AXSize: NSSize: {14 4, 66}19 AXSize: NSSize: {145, 66} 20 20 AXTitle: 21 21 AXDescription: -
trunk/LayoutTests/platform/mac/accessibility/table-sections-expected.txt
r191623 r196439 58 58 AXHelp: 59 59 AXParent: <AXCell> 60 AXSize: NSSize: {2 9, 30}60 AXSize: NSSize: {28, 30} 61 61 AXTitle: 62 62 AXDescription: … … 861 861 AXHelp: 862 862 AXParent: <AXGroup> 863 AXSize: NSSize: {7 6, 30}863 AXSize: NSSize: {77, 30} 864 864 AXTitle: 865 865 AXDescription: … … 1733 1733 AXHelp: 1734 1734 AXParent: <AXGroup> 1735 AXSize: NSSize: {7 6, 30}1735 AXSize: NSSize: {77, 30} 1736 1736 AXTitle: 1737 1737 AXDescription: -
trunk/LayoutTests/platform/mac/accessibility/table-with-rules-expected.txt
r191623 r196439 157 157 AXHelp: 158 158 AXParent: <AXGroup> 159 AXSize: NSSize: { 29, 20}159 AXSize: NSSize: {30, 20} 160 160 AXTitle: 161 161 AXDescription: -
trunk/Source/WebCore/ChangeLog
r196438 r196439 1 2016-02-11 Zalan Bujtas <zalan@apple.com> 2 3 Subpixel rendering: Make focusring painting subpixel aware. 4 https://bugs.webkit.org/show_bug.cgi?id=154111 5 6 Reviewed by David Hyatt. 7 8 Do not integral snap focusring rects while collecting them (use device pixel snapping instead 9 right before passing them to GraphicsContext::drawFocusRing). 10 11 Unable to test. 12 13 * platform/graphics/GraphicsContext.h: 14 * platform/graphics/displaylists/DisplayListItems.h: 15 (WebCore::DisplayList::DrawFocusRingRects::create): 16 (WebCore::DisplayList::DrawFocusRingRects::rects): 17 (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): 18 * platform/graphics/displaylists/DisplayListRecorder.cpp: 19 (WebCore::DisplayList::Recorder::drawFocusRing): 20 * platform/graphics/displaylists/DisplayListRecorder.h: 21 * platform/graphics/mac/GraphicsContextMac.mm: 22 (WebCore::GraphicsContext::drawFocusRing): 23 * rendering/RenderBlock.cpp: 24 (WebCore::RenderBlock::addFocusRingRectsForInlineChildren): 25 (WebCore::RenderBlock::addFocusRingRects): 26 * rendering/RenderBlock.h: 27 * rendering/RenderBlockFlow.cpp: 28 (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): 29 * rendering/RenderBlockFlow.h: 30 * rendering/RenderBox.cpp: 31 (WebCore::RenderBox::addFocusRingRects): 32 * rendering/RenderBox.h: 33 * rendering/RenderElement.cpp: 34 (WebCore::RenderElement::paintFocusRing): 35 (WebCore::RenderElement::issueRepaintForOutlineAuto): 36 * rendering/RenderInline.cpp: 37 (WebCore::RenderInline::absoluteRects): 38 (WebCore::RenderInline::addFocusRingRects): 39 * rendering/RenderInline.h: 40 * rendering/RenderListBox.cpp: 41 (WebCore::RenderListBox::addFocusRingRects): 42 * rendering/RenderListBox.h: 43 * rendering/RenderObject.cpp: 44 (WebCore::RenderObject::addPDFURLRect): 45 (WebCore::RenderObject::absoluteFocusRingQuads): 46 * rendering/RenderObject.h: 47 (WebCore::RenderObject::addFocusRingRects): 48 * rendering/RenderTextControl.cpp: 49 (WebCore::RenderTextControl::addFocusRingRects): 50 * rendering/RenderTextControl.h: 51 * rendering/svg/RenderSVGContainer.cpp: 52 (WebCore::RenderSVGContainer::addFocusRingRects): 53 * rendering/svg/RenderSVGContainer.h: 54 * rendering/svg/RenderSVGImage.cpp: 55 (WebCore::RenderSVGImage::addFocusRingRects): 56 * rendering/svg/RenderSVGImage.h: 57 * rendering/svg/RenderSVGShape.cpp: 58 (WebCore::RenderSVGShape::addFocusRingRects): 59 * rendering/svg/RenderSVGShape.h: 60 1 61 2016-02-11 Myles C. Maxfield <mmaxfield@apple.com> 2 62 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r195848 r196439 437 437 #endif 438 438 439 void drawFocusRing(const Vector< IntRect>&, float width, float offset, const Color&);439 void drawFocusRing(const Vector<FloatRect>&, float width, float offset, const Color&); 440 440 void drawFocusRing(const Path&, float width, float offset, const Color&); 441 441 #if PLATFORM(MAC) 442 void drawFocusRing(const Vector< IntRect>&, float width, float offset, double timeOffset, bool& needsRedraw);442 void drawFocusRing(const Vector<FloatRect>&, float offset, double timeOffset, bool& needsRedraw); 443 443 #endif 444 444 -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
r195170 r196439 610 610 } 611 611 612 void GraphicsContext::drawFocusRing(const Vector< IntRect>& rects, float width, float /* offset */, const Color& color)612 void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, float width, float /* offset */, const Color& color) 613 613 { 614 614 if (paintingDisabled()) -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
r195170 r196439 934 934 class DrawFocusRingRects : public DrawingItem { 935 935 public: 936 static Ref<DrawFocusRingRects> create(const Vector< IntRect>& rects, int width, int offset, const Color& color)936 static Ref<DrawFocusRingRects> create(const Vector<FloatRect>& rects, int width, int offset, const Color& color) 937 937 { 938 938 return adoptRef(*new DrawFocusRingRects(rects, width, offset, color)); 939 939 } 940 940 941 const Vector< IntRect> rects() const { return m_rects; }941 const Vector<FloatRect> rects() const { return m_rects; } 942 942 int width() const { return m_width; } 943 943 int offset() const { return m_offset; } … … 945 945 946 946 private: 947 DrawFocusRingRects(const Vector< IntRect>& rects, int width, int offset, const Color& color)947 DrawFocusRingRects(const Vector<FloatRect>& rects, int width, int offset, const Color& color) 948 948 : DrawingItem(ItemType::DrawFocusRingRects) 949 949 , m_rects(rects) … … 958 958 virtual Optional<FloatRect> localBounds(const GraphicsContext&) const override; 959 959 960 Vector< IntRect> m_rects;960 Vector<FloatRect> m_rects; 961 961 int m_width; 962 962 int m_offset; -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
r195185 r196439 248 248 } 249 249 250 void Recorder::drawFocusRing(const Vector< IntRect>& rects, int width, int offset, const Color& color)250 void Recorder::drawFocusRing(const Vector<FloatRect>& rects, int width, int offset, const Color& color) 251 251 { 252 252 DrawingItem& newItem = downcast<DrawingItem>(appendItem(DrawFocusRingRects::create(rects, width, offset, color))); -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
r195170 r196439 99 99 100 100 void drawFocusRing(const Path&, int width, int offset, const Color&); 101 void drawFocusRing(const Vector< IntRect>&, int width, int offset, const Color&);101 void drawFocusRing(const Vector<FloatRect>&, int width, int offset, const Color&); 102 102 103 103 void save(); -
trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm
r194421 r196439 86 86 87 87 #if PLATFORM(MAC) 88 void GraphicsContext::drawFocusRing(const Vector< IntRect>& rects, float, float offset, double timeOffset, bool& needsRedraw)88 void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, float offset, double timeOffset, bool& needsRedraw) 89 89 { 90 90 if (paintingDisabled()) … … 99 99 #endif 100 100 101 void GraphicsContext::drawFocusRing(const Vector< IntRect>& rects, float, float offset, const Color&)101 void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, float, float offset, const Color&) 102 102 { 103 103 #if !PLATFORM(IOS) -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
r194798 r196439 138 138 // FIXME: This is nearly identical to the GraphicsContext::drawFocusRing function in GraphicsContextMac.mm. 139 139 // The code could move to GraphicsContextCG.cpp and be shared. 140 void GraphicsContext::drawFocusRing(const Vector< IntRect>& rects, float width, float offset, const Color& color)140 void GraphicsContext::drawFocusRing(const Vector<FloatRect>& rects, float width, float offset, const Color& color) 141 141 { 142 142 if (paintingDisabled()) -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r196222 r196439 3428 3428 } 3429 3429 3430 void RenderBlock::addFocusRingRectsForInlineChildren(Vector< IntRect>&, const LayoutPoint&, const RenderLayerModelObject*)3430 void RenderBlock::addFocusRingRectsForInlineChildren(Vector<LayoutRect>&, const LayoutPoint&, const RenderLayerModelObject*) 3431 3431 { 3432 3432 ASSERT_NOT_REACHED(); 3433 3433 } 3434 3434 3435 void RenderBlock::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer)3435 void RenderBlock::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) 3436 3436 { 3437 3437 // For blocks inside inlines, we include margins so that we run right up to the inline boxes … … 3448 3448 LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin); 3449 3449 if (!rect.isEmpty()) 3450 rects.append( snappedIntRect(rect));3450 rects.append(rect); 3451 3451 } else if (width() && height()) 3452 rects.append( snappedIntRect(additionalOffset, size()));3452 rects.append(LayoutRect(additionalOffset, size())); 3453 3453 3454 3454 if (!hasOverflowClip() && !hasControlClip()) { -
trunk/Source/WebCore/rendering/RenderBlock.h
r194417 r196439 381 381 void addVisualOverflowFromTheme(); 382 382 383 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;384 virtual void addFocusRingRectsForInlineChildren(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer);383 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override; 384 virtual void addFocusRingRectsForInlineChildren(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer); 385 385 386 386 void computeRegionRangeForBoxChild(const RenderBox&) const; -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r196222 r196439 3458 3458 3459 3459 3460 void RenderBlockFlow::addFocusRingRectsForInlineChildren(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*)3460 void RenderBlockFlow::addFocusRingRectsForInlineChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) 3461 3461 { 3462 3462 ASSERT(childrenInline()); … … 3466 3466 LayoutRect rect(additionalOffset.x() + curr->x(), additionalOffset.y() + top, curr->width(), bottom - top); 3467 3467 if (!rect.isEmpty()) 3468 rects.append( snappedIntRect(rect));3468 rects.append(rect); 3469 3469 } 3470 3470 } -
trunk/Source/WebCore/rendering/RenderBlockFlow.h
r194496 r196439 534 534 Position positionForBox(InlineBox*, bool start = true) const; 535 535 virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderRegion*) override; 536 virtual void addFocusRingRectsForInlineChildren(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) override;536 virtual void addFocusRingRectsForInlineChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) override; 537 537 538 538 // FIXME-BLOCKFLOW: These methods have implementations in -
trunk/Source/WebCore/rendering/RenderBox.cpp
r196222 r196439 730 730 } 731 731 732 void RenderBox::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*)732 void RenderBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) 733 733 { 734 734 if (!size().isEmpty()) 735 rects.append( snappedIntRect(additionalOffset, size()));735 rects.append(LayoutRect(additionalOffset, size())); 736 736 } 737 737 -
trunk/Source/WebCore/rendering/RenderBox.h
r195284 r196439 171 171 // Bounds of the outline box in absolute coords. Respects transforms 172 172 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap*) const override final; 173 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override;173 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override; 174 174 175 175 virtual FloatRect repaintRectInLocalCoordinates() const override { return borderBoxRect(); } -
trunk/Source/WebCore/rendering/RenderElement.cpp
r196222 r196439 2086 2086 ASSERT(style.outlineStyleIsAuto()); 2087 2087 2088 Vector< IntRect> focusRingRects;2088 Vector<LayoutRect> focusRingRects; 2089 2089 addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer); 2090 Vector<FloatRect> pixelSnappedFocusRingRects; 2091 float deviceScaleFactor = document().deviceScaleFactor(); 2092 for (const auto& rect : focusRingRects) 2093 pixelSnappedFocusRingRects.append(snapRectToDevicePixels(rect, deviceScaleFactor)); 2090 2094 #if PLATFORM(MAC) 2091 2095 bool needsRepaint; 2092 paintInfo.context().drawFocusRing( focusRingRects, style.outlineWidth(), style.outlineOffset(), document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);2096 paintInfo.context().drawFocusRing(pixelSnappedFocusRingRects, style.outlineOffset(), document().page()->focusController().timeSinceFocusWasSet(), needsRepaint); 2093 2097 if (needsRepaint) 2094 2098 document().page()->focusController().setFocusedElementNeedsRepaint(); 2095 2099 #else 2096 paintInfo.context().drawFocusRing( focusRingRects, style.outlineWidth(), style.outlineOffset(), style.visitedDependentColor(CSSPropertyOutlineColor));2100 paintInfo.context().drawFocusRing(pixelSnappedFocusRingRects, style.outlineWidth(), style.outlineOffset(), style.visitedDependentColor(CSSPropertyOutlineColor)); 2097 2101 #endif 2098 2102 } … … 2169 2173 { 2170 2174 LayoutRect repaintRect; 2171 Vector< IntRect> focusRingRects;2175 Vector<LayoutRect> focusRingRects; 2172 2176 addFocusRingRects(focusRingRects, LayoutPoint(), containerForRepaint()); 2173 2177 for (auto rect : focusRingRects) { -
trunk/Source/WebCore/rendering/RenderInline.cpp
r196334 r196439 744 744 class AbsoluteRectsGeneratorContext { 745 745 public: 746 AbsoluteRectsGeneratorContext(Vector< IntRect>& rects, const LayoutPoint& accumulatedOffset)746 AbsoluteRectsGeneratorContext(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) 747 747 : m_rects(rects) 748 748 , m_accumulatedOffset(accumulatedOffset) { } … … 750 750 void addRect(const FloatRect& rect) 751 751 { 752 IntRect intRect = enclosingIntRect(rect);753 intRect.move(m_accumulatedOffset.x(), m_accumulatedOffset.y());754 m_rects.append( intRect);752 LayoutRect adjustedRect = LayoutRect(rect); 753 adjustedRect.moveBy(m_accumulatedOffset); 754 m_rects.append(adjustedRect); 755 755 } 756 756 private: 757 Vector< IntRect>& m_rects;757 Vector<LayoutRect>& m_rects; 758 758 const LayoutPoint& m_accumulatedOffset; 759 759 }; … … 763 763 void RenderInline::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const 764 764 { 765 AbsoluteRectsGeneratorContext context(rects, accumulatedOffset); 765 Vector<LayoutRect> lineboxRects; 766 AbsoluteRectsGeneratorContext context(lineboxRects, accumulatedOffset); 766 767 generateLineBoxRects(context); 768 for (const auto& rect : lineboxRects) 769 rects.append(snappedIntRect(rect)); 767 770 768 771 if (RenderBoxModelObject* continuation = this->continuation()) { … … 1568 1571 } 1569 1572 1570 void RenderInline::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer)1573 void RenderInline::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) 1571 1574 { 1572 1575 AbsoluteRectsGeneratorContext context(rects, additionalOffset); -
trunk/Source/WebCore/rendering/RenderInline.h
r194016 r196439 88 88 LayoutSize offsetForInFlowPositionedInline(const RenderBox* child) const; 89 89 90 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final;90 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final; 91 91 void paintOutline(PaintInfo&, const LayoutPoint&); 92 92 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r196222 r196439 314 314 } 315 315 316 void RenderListBox::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer)316 void RenderListBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer) 317 317 { 318 318 if (!selectElement().allowsNonContiguousSelection()) … … 333 333 if (is<HTMLOptionElement>(*element) && !element->isDisabledFormControl()) { 334 334 selectElement().setActiveSelectionEndIndex(i); 335 rects.append( snappedIntRect(itemBoundingBoxRect(additionalOffset, i)));335 rects.append(itemBoundingBoxRect(additionalOffset, i)); 336 336 return; 337 337 } -
trunk/Source/WebCore/rendering/RenderListBox.h
r194515 r196439 90 90 virtual void layout() override; 91 91 92 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override;92 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = nullptr) override; 93 93 94 94 virtual bool canBeProgramaticallyScrolled() const override { return true; } -
trunk/Source/WebCore/rendering/RenderObject.cpp
r196222 r196439 721 721 void RenderObject::addPDFURLRect(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 722 722 { 723 Vector< IntRect> focusRingRects;723 Vector<LayoutRect> focusRingRects; 724 724 addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer); 725 IntRect urlRect = unionRect(focusRingRects);725 LayoutRect urlRect = unionRect(focusRingRects); 726 726 727 727 if (urlRect.isEmpty()) … … 799 799 void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) 800 800 { 801 Vector< IntRect> rects;801 Vector<LayoutRect> rects; 802 802 // FIXME: addFocusRingRects() needs to be passed this transform-unaware 803 803 // localToAbsolute() offset here because RenderInline::addFocusRingRects() … … 806 806 FloatPoint absolutePoint = localToAbsolute(); 807 807 addFocusRingRects(rects, flooredLayoutPoint(absolutePoint)); 808 size_t count = rects.size(); 809 for (size_t i = 0; i < count; ++i) { 810 IntRect rect = rects[i]; 811 rect.move(-absolutePoint.x(), -absolutePoint.y()); 812 quads.append(localToAbsoluteQuad(FloatQuad(rect))); 808 float deviceScaleFactor = document().deviceScaleFactor(); 809 for (auto rect : rects) { 810 rect.moveBy(LayoutPoint(-absolutePoint)); 811 quads.append(localToAbsoluteQuad(FloatQuad(snapRectToDevicePixels(rect, deviceScaleFactor)))); 813 812 } 814 813 } -
trunk/Source/WebCore/rendering/RenderObject.h
r196222 r196439 837 837 void getTransformFromContainer(const RenderObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const; 838 838 839 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& /* additionalOffset */, const RenderLayerModelObject* /* paintContainer */ = nullptr) { };839 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& /* additionalOffset */, const RenderLayerModelObject* /* paintContainer */ = nullptr) { }; 840 840 841 841 LayoutRect absoluteOutlineBounds() const -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r195180 r196439 232 232 } 233 233 234 void RenderTextControl::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*)234 void RenderTextControl::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) 235 235 { 236 236 if (!size().isEmpty()) 237 rects.append( snappedIntRect(additionalOffset, size()));237 rects.append(LayoutRect(additionalOffset, size())); 238 238 } 239 239 -
trunk/Source/WebCore/rendering/RenderTextControl.h
r194496 r196439 81 81 virtual bool canHaveGeneratedChildren() const override { return false; } 82 82 83 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;83 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override; 84 84 85 85 virtual bool canBeProgramaticallyScrolled() const override { return true; } -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
r194496 r196439 155 155 156 156 // addFocusRingRects is called from paintOutline and needs to be in the same coordinates as the paintOuline call 157 void RenderSVGContainer::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint&, const RenderLayerModelObject*)157 void RenderSVGContainer::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&, const RenderLayerModelObject*) 158 158 { 159 IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));159 LayoutRect paintRectInParent = LayoutRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates())); 160 160 if (!paintRectInParent.isEmpty()) 161 161 rects.append(paintRectInParent); -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.h
r177259 r196439 51 51 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) override final; 52 52 virtual void removeChild(RenderObject&) override final; 53 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final;53 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final; 54 54 55 55 virtual FloatRect objectBoundingBox() const override final { return m_objectBoundingBox; } -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp
r194496 r196439 223 223 } 224 224 225 void RenderSVGImage::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint&, const RenderLayerModelObject*)225 void RenderSVGImage::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&, const RenderLayerModelObject*) 226 226 { 227 227 // this is called from paint() after the localTransform has already been applied 228 IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates());228 LayoutRect contentRect = LayoutRect(repaintRectInLocalCoordinates()); 229 229 if (!contentRect.isEmpty()) 230 230 rects.append(contentRect); -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.h
r177259 r196439 67 67 virtual FloatRect repaintRectInLocalCoordinatesExcludingSVGShadow() const override { return m_repaintBoundingBoxExcludingShadow; } 68 68 69 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;69 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override; 70 70 71 71 virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp
r195411 r196439 327 327 // This method is called from inside paintOutline() since we call paintOutline() 328 328 // while transformed to our coord system, return local coords 329 void RenderSVGShape::addFocusRingRects(Vector< IntRect>& rects, const LayoutPoint&, const RenderLayerModelObject*)330 { 331 IntRect rect = enclosingIntRect(repaintRectInLocalCoordinates());329 void RenderSVGShape::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&, const RenderLayerModelObject*) 330 { 331 LayoutRect rect = LayoutRect(repaintRectInLocalCoordinates()); 332 332 if (!rect.isEmpty()) 333 333 rects.append(rect); -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.h
r189144 r196439 99 99 virtual void layout() override final; 100 100 virtual void paint(PaintInfo&, const LayoutPoint&) override final; 101 virtual void addFocusRingRects(Vector< IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final;101 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override final; 102 102 103 103 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override final;
Note: See TracChangeset
for help on using the changeset viewer.