No subject


Fri Mar 7 15:32:22 PST 2014


l)

EnclosedIntRect -> enclosingIntRect() changes functionality for Inspec=
torOverlay painting,
but currently untestable.

Source/WebCore:

* WebCore.exp.in:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::showPaintRect):
* platform/graphics/FloatPoint.h:
(WebCore::flooredIntSize):
(WebCore::floorPointToDevicePixels):
(WebCore::ceilPointToDevicePixels):
(WebCore::flooredToDevicePixels): Deleted.
(WebCore::ceiledToDevicePixels): Deleted.
* platform/graphics/FloatRect.cpp:
(WebCore::enclosingRectToDevicePixels):
(WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed.
(WebCore::enclosedIntRect): Deleted. Not needed.
* platform/graphics/FloatRect.h:

Source/WebKit2:

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTapHighlight]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebC=
ore.exp.in</a></li>
<li><a href=3D"#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Sou=
rce/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href=3D"#trunkSourceWebCoreplatformgraphicsFloatPointh">trunk/Sour=
ce/WebCore/platform/graphics/FloatPoint.h</a></li>
<li><a href=3D"#trunkSourceWebCoreplatformgraphicsFloatRectcpp">trunk/Sou=
rce/WebCore/platform/graphics/FloatRect.cpp</a></li>
<li><a href=3D"#trunkSourceWebCoreplatformgraphicsFloatRecth">trunk/Sourc=
e/WebCore/platform/graphics/FloatRect.h</a></li>
<li><a href=3D"#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"=
>trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
</ul>

</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1730=
44 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog	2014-08-28 02:34:=
35 UTC (rev 173044)
+++ trunk/Source/WebCore/ChangeLog	2014-08-28 03:33:02 UTC (rev 173045)
</span><span class=3D"lines">@@ -1,5 +1,32 @@
</span><span class=3D"cx"> 2014-08-27  Zalan Bujtas  &lt;zalan at apple.com&=
gt;
</span><span class=3D"cx">=20
</span><ins>+        Subpixel layout: Rename FloatPoint/FloatRect device =
pixel snapping functions.
+        https://bugs.webkit.org/show_bug.cgi?id=3D136314
+
+        Reviewed by Simon Fraser.
+
+        From *edToDevicePixels() to *PointToDevicePixels() (* =3D floor/=
round/ceil)
+
+        EnclosedIntRect -&gt; enclosingIntRect() changes functionality f=
or InspectorOverlay painting,
+        but currently untestable.
+
+        * WebCore.exp.in:
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::showPaintRect):
+        * platform/graphics/FloatPoint.h:
+        (WebCore::flooredIntSize):
+        (WebCore::floorPointToDevicePixels):
+        (WebCore::ceilPointToDevicePixels):
+        (WebCore::flooredToDevicePixels): Deleted.
+        (WebCore::ceiledToDevicePixels): Deleted.
+        * platform/graphics/FloatRect.cpp:
+        (WebCore::enclosingRectToDevicePixels):
+        (WebCore::enclosingRectExtendedToDevicePixels): Deleted. Renamed=
.
+        (WebCore::enclosedIntRect): Deleted. Not needed.
+        * platform/graphics/FloatRect.h:
+
+2014-08-27  Zalan Bujtas  &lt;zalan at apple.com&gt;
+
</ins><span class=3D"cx">         Subpixel layout: Rename LayoutPoint's d=
evice pixel snapping functions.
</span><span class=3D"cx">         https://bugs.webkit.org/show_bug.cgi?i=
d=3D136306
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreWebCoreexpin"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in =
(173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/WebCore.exp.in	2014-08-28 0=
2:34:35 UTC (rev 173044)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-08-28 03:33:02 UTC (rev 1730=
45)
</span><span class=3D"lines">@@ -2686,7 +2686,7 @@
</span><span class=3D"cx"> __ZN7WebCore31applicationIsMicrosoftMessengerE=
v
</span><span class=3D"cx"> __ZN7WebCore31enableURLSchemeCanonicalizationE=
b
</span><span class=3D"cx"> __ZN7WebCore33applicationIsTheEconomistOnIPhon=
eEv
</span><del>-__ZN7WebCore35enclosingRectExtendedToDevicePixelsERKNS_9Floa=
tRectEf
</del><ins>+__ZN7WebCore35encloseRectToDevicePixelsERKNS_9FloatRectEf
</ins><span class=3D"cx"> __ZN7WebCore35isEndOfEditableOrNonEditableConte=
ntERKNS_15VisiblePositionE
</span><span class=3D"cx"> __ZN7WebCore35positionOfNextBoundaryOfGranular=
ityERKNS_15VisiblePositionENS_15TextGranularityENS_18SelectionDirectionE
</span><span class=3D"cx"> __ZN7WebCore41initializeHTTPConnectionSettings=
OnStartupEv
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/inspector/Inspe=
ctorOverlay.cpp (173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/inspector/InspectorOverlay.=
cpp	2014-08-28 02:34:35 UTC (rev 173044)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2014-08-28 03:33:=
02 UTC (rev 173045)
</span><span class=3D"lines">@@ -489,7 +489,7 @@
</span><span class=3D"cx">     if (!m_showingPaintRects)
</span><span class=3D"cx">         return;
</span><span class=3D"cx">=20
</span><del>-    IntRect rootRect =3D m_page.mainFrame().view()-&gt;conte=
ntsToRootView(enclosedIntRect(rect));
</del><ins>+    IntRect rootRect =3D m_page.mainFrame().view()-&gt;conten=
tsToRootView(enclosingIntRect(rect));
</ins><span class=3D"cx">=20
</span><span class=3D"cx">     const std::chrono::milliseconds removeDela=
y =3D std::chrono::milliseconds(250);
</span><span class=3D"cx">=20
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreplatformgraphicsFloatPointh"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/platform/graphi=
cs/FloatPoint.h (173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/platform/graphics/FloatPoin=
t.h	2014-08-28 02:34:35 UTC (rev 173044)
+++ trunk/Source/WebCore/platform/graphics/FloatPoint.h	2014-08-28 03:33:=
02 UTC (rev 173045)
</span><span class=3D"lines">@@ -210,6 +210,11 @@
</span><span class=3D"cx">     return a.dot(b);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+inline IntSize flooredIntSize(const FloatPoint&amp; p)
+{
+    return IntSize(clampToInteger(floorf(p.x())), clampToInteger(floorf(=
p.y())));
+}
+
</ins><span class=3D"cx"> inline IntPoint roundedIntPoint(const FloatPoin=
t&amp; p)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     return IntPoint(clampToInteger(roundf(p.x(=
))), clampToInteger(roundf(p.y())));
</span><span class=3D"lines">@@ -220,24 +225,19 @@
</span><span class=3D"cx">     return IntPoint(clampToInteger(floorf(p.x(=
))), clampToInteger(floorf(p.y())));
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-inline FloatPoint flooredToDevicePixels(const FloatPoint&amp=
; p, float deviceScaleFactor)
-{
-    return FloatPoint(floorf(p.x() * deviceScaleFactor)  / deviceScaleFa=
ctor, floorf(p.y() * deviceScaleFactor)  / deviceScaleFactor);
-}
-
</del><span class=3D"cx"> inline IntPoint ceiledIntPoint(const FloatPoint=
&amp; p)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     return IntPoint(clampToInteger(ceilf(p.x()=
)), clampToInteger(ceilf(p.y())));
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-inline FloatPoint ceiledToDevicePixels(const FloatPoint&amp;=
 p, float deviceScaleFactor)
</del><ins>+inline FloatPoint floorPointToDevicePixels(const FloatPoint&a=
mp; p, float deviceScaleFactor)
</ins><span class=3D"cx"> {
</span><del>-    return FloatPoint(ceilf(p.x() * deviceScaleFactor)  / de=
viceScaleFactor, ceilf(p.y() * deviceScaleFactor)  / deviceScaleFactor);
</del><ins>+    return FloatPoint(floorf(p.x() * deviceScaleFactor)  / de=
viceScaleFactor, floorf(p.y() * deviceScaleFactor)  / deviceScaleFactor);
</ins><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-inline IntSize flooredIntSize(const FloatPoint&amp; p)
</del><ins>+inline FloatPoint ceilPointToDevicePixels(const FloatPoint&am=
p; p, float deviceScaleFactor)
</ins><span class=3D"cx"> {
</span><del>-    return IntSize(clampToInteger(floorf(p.x())), clampToInt=
eger(floorf(p.y())));
</del><ins>+    return FloatPoint(ceilf(p.x() * deviceScaleFactor)  / dev=
iceScaleFactor, ceilf(p.y() * deviceScaleFactor)  / deviceScaleFactor);
</ins><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"cx"> inline FloatSize toFloatSize(const FloatPoint&=
amp; a)
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreplatformgraphicsFloatRectcpp"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/platform/graphi=
cs/FloatRect.cpp (173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/platform/graphics/FloatRect=
.cpp	2014-08-28 02:34:35 UTC (rev 173044)
+++ trunk/Source/WebCore/platform/graphics/FloatRect.cpp	2014-08-28 03:33=
:02 UTC (rev 173045)
</span><span class=3D"lines">@@ -206,10 +206,10 @@
</span><span class=3D"cx">     setLocationAndSizeFromEdges(left, top, rig=
ht, bottom);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-FloatRect enclosingRectExtendedToDevicePixels(const FloatRec=
t&amp; rect, float deviceScaleFactor)
</del><ins>+FloatRect encloseRectToDevicePixels(const FloatRect&amp; rect=
, float deviceScaleFactor)
</ins><span class=3D"cx"> {
</span><del>-    FloatPoint location =3D flooredToDevicePixels(rect.minXM=
inYCorner(), deviceScaleFactor);
-    FloatPoint maxPoint =3D ceiledToDevicePixels(rect.maxXMaxYCorner(), =
deviceScaleFactor);
</del><ins>+    FloatPoint location =3D floorPointToDevicePixels(rect.min=
XMinYCorner(), deviceScaleFactor);
+    FloatPoint maxPoint =3D ceilPointToDevicePixels(rect.maxXMaxYCorner(=
), deviceScaleFactor);
</ins><span class=3D"cx">     return FloatRect(location, maxPoint - locat=
ion);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><span class=3D"lines">@@ -221,16 +221,6 @@
</span><span class=3D"cx">     return IntRect(location, maxPoint - locati=
on);
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-IntRect enclosedIntRect(const FloatRect&amp; rect)
-{
-    IntPoint location =3D ceiledIntPoint(rect.minXMinYCorner());
-    IntPoint maxPoint =3D flooredIntPoint(rect.maxXMaxYCorner());
-    IntSize size =3D maxPoint - location;
-    size.clampNegativeToZero();
-
-    return IntRect(location, size);
-}
-
</del><span class=3D"cx"> IntRect roundedIntRect(const FloatRect&amp; rec=
t)
</span><span class=3D"cx"> {
</span><span class=3D"cx">     return IntRect(roundedIntPoint(rect.locati=
on()), roundedIntSize(rect.size()));
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreplatformgraphicsFloatRecth"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/platform/graphi=
cs/FloatRect.h (173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/platform/graphics/FloatRect=
.h	2014-08-28 02:34:35 UTC (rev 173044)
+++ trunk/Source/WebCore/platform/graphics/FloatRect.h	2014-08-28 03:33:0=
2 UTC (rev 173045)
</span><span class=3D"lines">@@ -246,12 +246,8 @@
</span><span class=3D"cx">     return *this =3D=3D infiniteRect();
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><del>-WEBCORE_EXPORT FloatRect enclosingRectExtendedToDevicePixels=
(const FloatRect&amp;, float deviceScaleFactor);
</del><ins>+WEBCORE_EXPORT FloatRect encloseRectToDevicePixels(const Floa=
tRect&amp;, float deviceScaleFactor);
</ins><span class=3D"cx"> WEBCORE_EXPORT IntRect enclosingIntRect(const F=
loatRect&amp;);
</span><del>-
-// Returns a valid IntRect contained within the given FloatRect.
-IntRect enclosedIntRect(const FloatRect&amp;);
-
</del><span class=3D"cx"> WEBCORE_EXPORT IntRect roundedIntRect(const Flo=
atRect&amp;);
</span><span class=3D"cx">=20
</span><span class=3D"cx"> }
</span></span></pre></div>
<a id=3D"trunkSourceWebKit2ChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (1730=
44 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit2/ChangeLog	2014-08-28 02:34:=
35 UTC (rev 173044)
+++ trunk/Source/WebKit2/ChangeLog	2014-08-28 03:33:02 UTC (rev 173045)
</span><span class=3D"lines">@@ -1,3 +1,18 @@
</span><ins>+2014-08-27  Zalan Bujtas  &lt;zalan at apple.com&gt;
+
+        Subpixel layout: Rename FloatPoint/FloatRect device pixel snappi=
ng functions.
+        https://bugs.webkit.org/show_bug.cgi?id=3D136314
+
+        Reviewed by Simon Fraser.
+
+        From *edToDevicePixels() to *PointToDevicePixels() (* =3D floor/=
round/ceil)
+
+        EnclosedIntRect -&gt; enclosingIntRect() changes functionality f=
or InspectorOverlay painting,
+        but currently untestable.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _updateTapHighlight]):
+
</ins><span class=3D"cx"> 2014-08-27  Tim Horton  &lt;timothy_horton at appl=
e.com&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         WebKit2 swipe gesture should report th=
e position of the snapshot to the client
</span></span></pre></div>
<a id=3D"trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/W=
KContentViewInteraction.mm (173044 =3D> 173045)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView=
Interaction.mm	2014-08-28 02:34:35 UTC (rev 173044)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2014-0=
8-28 03:33:02 UTC (rev 173045)
</span><span class=3D"lines">@@ -577,7 +577,7 @@
</span><span class=3D"cx">             FloatRect boundingBox =3D quad.bou=
ndingBox();
</span><span class=3D"cx">             boundingBox.scale(selfScale);
</span><span class=3D"cx">             boundingBox.inflate(minimumTapHigh=
lightRadius);
</span><del>-            CGRect pixelAlignedRect =3D static_cast&lt;CGRec=
t&gt;(enclosingRectExtendedToDevicePixels(boundingBox, deviceScaleFactor)=
);
</del><ins>+            CGRect pixelAlignedRect =3D static_cast&lt;CGRect=
&gt;(encloseRectToDevicePixels(boundingBox, deviceScaleFactor));
</ins><span class=3D"cx">             [rects addObject:[NSValue valueWith=
CGRect:pixelAlignedRect]];
</span><span class=3D"cx">         } else {
</span><span class=3D"cx">             allHighlightRectsAreRectilinear =3D=
 false;
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list