WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
fixed ChangeLog
bug-72294-20111118113911.patch (text/plain), 3.23 KB, created by
Dana Jansens
on 2011-11-18 08:39:12 PST
(
hide
)
Description:
fixed ChangeLog
Filename:
MIME Type:
Creator:
Dana Jansens
Created:
2011-11-18 08:39:12 PST
Size:
3.23 KB
patch
obsolete
>Subversion Revision: 100069 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07a83e2c4573758e1461add6855ad37168edc170..4b0e3dce563afd37680a344352ab1b716f3c4722 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2011-11-18 Dana Jansens <danakj@chromium.org> >+ >+ Add contains() test to Region >+ https://bugs.webkit.org/show_bug.cgi?id=72294 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/Region.cpp: >+ (WebCore::Region::contains): A contains B <=> A.intersect(B) == B >+ * platform/graphics/Region.h: >+ (WebCore::operator==): Helper functions for contains() >+ (WebCore::operator!=): Helper functions for contains() >+ > 2011-11-11 Nat Duca <nduca@chromium.org> > > Since GraphicsContext3D::makeContextCurrent can fail, return bool. >diff --git a/Source/WebCore/platform/graphics/Region.cpp b/Source/WebCore/platform/graphics/Region.cpp >index 5427c6c91d2160eb77e82787ab09aef421d66127..53efba5b05ccdbc16022da3713d0d6b9b45405f6 100644 >--- a/Source/WebCore/platform/graphics/Region.cpp >+++ b/Source/WebCore/platform/graphics/Region.cpp >@@ -65,6 +65,11 @@ Vector<IntRect> Region::rects() const > return rects; > } > >+bool Region::contains(const Region& region) const >+{ >+ return WebCore::intersect(region, *this).m_shape == region.m_shape; >+} >+ > Region::Shape::Shape() > { > } >diff --git a/Source/WebCore/platform/graphics/Region.h b/Source/WebCore/platform/graphics/Region.h >index b5359bbe39c025c3e2c5e55b39fa4a5757d7975f..4fe36ec631ca352c76b4bdfea59eee301cf876fc 100644 >--- a/Source/WebCore/platform/graphics/Region.h >+++ b/Source/WebCore/platform/graphics/Region.h >@@ -47,6 +47,9 @@ public: > > void translate(const IntSize&); > >+ // Returns true if the query region is a subset of this region. >+ bool contains(const Region&) const; >+ > #ifndef NDEBUG > void dump() const; > #endif >@@ -104,13 +107,19 @@ private: > > bool canCoalesce(SegmentIterator begin, SegmentIterator end); > >- // FIXME: These vectors should have inline sizes. Figure out a good optimal value. >- Vector<int> m_segments; >- Vector<Span> m_spans; >+ Vector<int, 32> m_segments; >+ Vector<Span, 16> m_spans; >+ >+ friend bool operator==(const Shape&, const Shape&); > }; > > IntRect m_bounds; > Shape m_shape; >+ >+ friend bool operator==(const Shape&, const Shape&); >+ friend bool operator!=(const Shape&, const Shape&); >+ friend bool operator==(const Span&, const Span&); >+ friend bool operator!=(const Span&, const Span&); > }; > > static inline Region intersect(const Region& a, const Region& b) >@@ -137,6 +146,12 @@ static inline Region translate(const Region& region, const IntSize& offset) > return result; > } > >+inline bool operator==(const Region::Span& a, const Region::Span& b) { return a.y == b.y && a.segmentIndex == b.segmentIndex; } >+inline bool operator!=(const Region::Span& a, const Region::Span& b) { return !(a == b); } >+ >+inline bool operator==(const Region::Shape& a, const Region::Shape& b) { return a.m_spans == b.m_spans && a.m_segments == b.m_segments; } >+inline bool operator!=(const Region::Shape& a, const Region::Shape& b) { return !(a == b); } >+ > } // namespace WebCore > > #endif // Region_h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 72294
:
114998
|
115009
|
115062
|
115172
|
115199
|
115212
|
115406
|
115410
|
115812
|
115818
|
124767
|
124822
|
125695
|
125714