Title: [113471] trunk/Source/WebCore
- Revision
- 113471
- Author
- [email protected]
- Date
- 2012-04-06 11:55:54 -0700 (Fri, 06 Apr 2012)
Log Message
Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
https://bugs.webkit.org/show_bug.cgi?id=83343
Reviewed by Eric Seidel.
Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
RenderEmbeddedObject in preparation for turing on subpixel support.
No new tests, no change in functionality.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::baselinePosition):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::nodeAtPoint):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (113470 => 113471)
--- trunk/Source/WebCore/ChangeLog 2012-04-06 18:55:51 UTC (rev 113470)
+++ trunk/Source/WebCore/ChangeLog 2012-04-06 18:55:54 UTC (rev 113471)
@@ -1,3 +1,20 @@
+2012-04-06 Emil A Eklund <[email protected]>
+
+ Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
+ https://bugs.webkit.org/show_bug.cgi?id=83343
+
+ Reviewed by Eric Seidel.
+
+ Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
+ RenderEmbeddedObject in preparation for turing on subpixel support.
+
+ No new tests, no change in functionality.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::baselinePosition):
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::nodeAtPoint):
+
2012-04-06 Dan Bernstein <[email protected]>
<rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (113470 => 113471)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-04-06 18:55:51 UTC (rev 113470)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-04-06 18:55:54 UTC (rev 113471)
@@ -5916,9 +5916,9 @@
bool ignoreBaseline = (layer() && (layer()->marquee() || (direction == HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset() != 0)
: (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
- int baselinePos = ignoreBaseline ? LayoutUnit(-1) : lastLineBoxBaseline();
+ LayoutUnit baselinePos = ignoreBaseline ? static_cast<LayoutUnit>(-1) : lastLineBoxBaseline();
- int bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
+ LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
if (baselinePos != -1 && baselinePos <= bottomOfContent)
return direction == HorizontalLine ? marginTop() + baselinePos : marginRight() + baselinePos;
Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (113470 => 113471)
--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2012-04-06 18:55:51 UTC (rev 113470)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2012-04-06 18:55:54 UTC (rev 113471)
@@ -261,16 +261,17 @@
return true;
PluginViewBase* view = static_cast<PluginViewBase*>(widget());
+ IntPoint roundedPoint = roundedIntPoint(pointInContainer);
if (Scrollbar* horizontalScrollbar = view->horizontalScrollbar()) {
- if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains(pointInContainer)) {
+ if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains(roundedPoint)) {
result.setScrollbar(horizontalScrollbar);
return true;
}
}
if (Scrollbar* verticalScrollbar = view->verticalScrollbar()) {
- if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains(pointInContainer)) {
+ if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains(roundedPoint)) {
result.setScrollbar(verticalScrollbar);
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes