- Revision
- 111268
- Author
- [email protected]
- Date
- 2012-03-19 16:33:53 -0700 (Mon, 19 Mar 2012)
Log Message
Source/WebCore: [mac/chromium] Change platform code to use pixelSnappedRect methods
https://bugs.webkit.org/show_bug.cgi?id=81016
Reviewed by Eric Seidel.
Change platform code to use Node::getPixelSnappedRect,
pixelSnappedBoundingBoxRect and pixelSnappedAbsoluteClippedOverflowRect
to avoid exposing subpixel types to the platform layer.
No new tests.
* WebCore.exp.in:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
Add pixelSnapped version of absoluteClippedOverflowRect
(WebCore):
* rendering/RenderObject.h:
(RenderObject):
Source/WebKit/chromium: [mac/chromium] Change platform code to use pixelSnappedRect methods
https://bugs.webkit.org/show_bug.cgi?id=81016
Reviewed by Eric Seidel.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::applyAutofillSuggestions):
(WebKit::WebViewImpl::refreshAutofillPopup):
Source/WebKit/mac: [mac/chromium] Change platform code to use pixelSnappedRect methods
https://bugs.webkit.org/show_bug.cgi?id=81016
Reviewed by Eric Seidel.
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
* WebView/WebFrame.mm:
(-[WebFrame _getVisibleRect:]):
(-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]):
* WebView/WebView.mm:
(-[WebView _dashboardRegions]):
(-[WebView trackedRepaintRects]):
Source/WebKit/qt: [mac/qt/chromium] Change platform code to use pixelSnappedRect methods
https://bugs.webkit.org/show_bug.cgi?id=81016
Reviewed by Eric Seidel.
* Api/qwebelement.cpp:
(QWebElement::geometry):
(QWebElement::render):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111267 => 111268)
--- trunk/Source/WebCore/ChangeLog 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebCore/ChangeLog 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1,3 +1,25 @@
+2012-03-19 Emil A Eklund <[email protected]>
+
+ [mac/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ Change platform code to use Node::getPixelSnappedRect,
+ pixelSnappedBoundingBoxRect and pixelSnappedAbsoluteClippedOverflowRect
+ to avoid exposing subpixel types to the platform layer.
+
+ No new tests.
+
+ * WebCore.exp.in:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::pixelSnappedAbsoluteClippedOverflowRect):
+ Add pixelSnapped version of absoluteClippedOverflowRect
+
+ (WebCore):
+ * rendering/RenderObject.h:
+ (RenderObject):
+
2012-03-19 Brady Eidson <[email protected]>
<rdar://problem/10848575> and https://bugs.webkit.org/show_bug.cgi?id=81516
Modified: trunk/Source/WebCore/WebCore.exp.in (111267 => 111268)
--- trunk/Source/WebCore/WebCore.exp.in 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebCore/WebCore.exp.in 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1220,6 +1220,7 @@
__ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEbb
__ZNK7WebCore12RenderObject20localToContainerQuadERKNS_9FloatQuadEPNS_20RenderBoxModelObjectEbPb
__ZNK7WebCore12RenderObject23absoluteBoundingBoxRectEb
+__ZNK7WebCore12RenderObject39pixelSnappedAbsoluteClippedOverflowRectEv
__ZNK7WebCore12RenderObject7childAtEj
__ZNK7WebCore12RenderWidget14windowClipRectEv
__ZNK7WebCore12SharedBuffer11getSomeDataERPKcj
Modified: trunk/Source/WebCore/dom/Node.h (111267 => 111268)
--- trunk/Source/WebCore/dom/Node.h 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebCore/dom/Node.h 2012-03-19 23:33:53 UTC (rev 111268)
@@ -375,6 +375,7 @@
virtual bool shouldUseInputMethod();
virtual LayoutRect getRect() const;
+ IntRect getPixelSnappedRect() const { return pixelSnappedIntRect(getRect()); }
LayoutRect renderRect(bool* isReplaced);
// Returns true if the node has a non-empty bounding box in layout.
Modified: trunk/Source/WebKit/chromium/ChangeLog (111267 => 111268)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1,3 +1,15 @@
+2012-03-19 Emil A Eklund <[email protected]>
+
+ [mac/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::computeBlockBounds):
+ (WebKit::WebViewImpl::applyAutofillSuggestions):
+ (WebKit::WebViewImpl::refreshAutofillPopup):
+
2012-03-19 Eric Seidel <[email protected]>
Fix WTF header include discipline in Chromium WebKit
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (111267 => 111268)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-19 23:33:53 UTC (rev 111268)
@@ -860,7 +860,7 @@
// Return the bounding box in the window coordinate system.
if (node) {
- IntRect rect = node->Node::getRect();
+ IntRect rect = node->Node::getPixelSnappedRect();
Frame* frame = node->document()->frame();
return frame->view()->contentsToWindow(rect);
}
@@ -2758,7 +2758,7 @@
if (m_autofillPopupShowing) {
refreshAutofillPopup();
} else {
- m_autofillPopup->showInRect(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
+ m_autofillPopup->showInRect(focusedNode->getPixelSnappedRect(), focusedNode->ownerDocument()->view(), 0);
m_autofillPopupShowing = true;
}
}
@@ -3033,7 +3033,7 @@
}
IntRect oldBounds = m_autofillPopup->frameRect();
- m_autofillPopup->refresh(focusedWebCoreNode()->getRect());
+ m_autofillPopup->refresh(focusedWebCoreNode()->getPixelSnappedRect());
IntRect newBounds = m_autofillPopup->frameRect();
// Let's resize the backing window if necessary.
if (oldBounds != newBounds) {
Modified: trunk/Source/WebKit/mac/ChangeLog (111267 => 111268)
--- trunk/Source/WebKit/mac/ChangeLog 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1,3 +1,19 @@
+2012-03-19 Emil A Eklund <[email protected]>
+
+ [mac/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
+ * WebView/WebFrame.mm:
+ (-[WebFrame _getVisibleRect:]):
+ (-[WebFrame _computePageRectsWithPrintScaleFactor:pageSize:]):
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]):
+ (-[WebView trackedRepaintRects]):
+
2012-03-16 Brady Eidson <[email protected]>
<rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412
Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (111267 => 111268)
--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm 2012-03-19 23:33:53 UTC (rev 111268)
@@ -875,7 +875,7 @@
if (!frameView)
return NSZeroRect;
- IntRect widgetRect = renderer->absoluteClippedOverflowRect();
+ IntRect widgetRect = renderer->pixelSnappedAbsoluteClippedOverflowRect();
widgetRect = frameView->contentsToWindow(widgetRect);
return intersection(toRenderWidget(renderer)->windowClipRect(), widgetRect);
}
Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (111267 => 111268)
--- trunk/Source/WebKit/mac/WebView/WebFrame.mm 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm 2012-03-19 23:33:53 UTC (rev 111268)
@@ -583,7 +583,7 @@
if (RenderPart* ownerRenderer = _private->coreFrame->ownerRenderer()) {
if (ownerRenderer->needsLayout())
return NO;
- *rect = ownerRenderer->absoluteClippedOverflowRect();
+ *rect = ownerRenderer->pixelSnappedAbsoluteClippedOverflowRect();
return YES;
}
@@ -1293,9 +1293,9 @@
if (!root)
return [NSArray array];
- const IntRect& documentRect = root->documentRect();
- float printWidth = root->style()->isHorizontalWritingMode() ? documentRect.width() / printScaleFactor : pageSize.width;
- float printHeight = root->style()->isHorizontalWritingMode() ? pageSize.height : documentRect.height() / printScaleFactor;
+ const LayoutRect& documentRect = root->documentRect();
+ float printWidth = root->style()->isHorizontalWritingMode() ? static_cast<float>(documentRect.width()) / printScaleFactor : pageSize.width;
+ float printHeight = root->style()->isHorizontalWritingMode() ? pageSize.height : static_cast<float>(documentRect.height()) / printScaleFactor;
PrintContext printContext(_private->coreFrame);
printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true);
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (111267 => 111268)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2012-03-19 23:33:53 UTC (rev 111268)
@@ -2034,7 +2034,7 @@
[regionValues release];
}
- WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:region.bounds clip:region.clip type:type];
+ WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:pixelSnappedIntRect(region.bounds) clip:pixelSnappedIntRect(region.clip) type:type];
[regionValues addObject:webRegion];
[webRegion release];
}
@@ -2495,7 +2495,7 @@
NSMutableArray* rectsArray = [[NSMutableArray alloc] initWithCapacity:repaintRects.size()];
for (unsigned i = 0; i < repaintRects.size(); ++i)
- [rectsArray addObject:[NSValue valueWithRect:repaintRects[i]]];
+ [rectsArray addObject:[NSValue valueWithRect:pixelSnappedIntRect(repaintRects[i])]];
return [rectsArray autorelease];
}
Modified: trunk/Source/WebKit/qt/Api/qwebelement.cpp (111267 => 111268)
--- trunk/Source/WebKit/qt/Api/qwebelement.cpp 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/qt/Api/qwebelement.cpp 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1495,7 +1495,7 @@
view->updateLayoutAndStyleIfNeededRecursive();
- IntRect rect = e->getRect();
+ IntRect rect = e->getPixelSnappedRect();
if (rect.size().isEmpty())
return;
Modified: trunk/Source/WebKit/qt/ChangeLog (111267 => 111268)
--- trunk/Source/WebKit/qt/ChangeLog 2012-03-19 23:20:56 UTC (rev 111267)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-03-19 23:33:53 UTC (rev 111268)
@@ -1,3 +1,14 @@
+2012-03-19 Emil A Eklund <[email protected]>
+
+ [mac/qt/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ (QWebElement::render):
+
2012-03-16 Teemu Katajisto <[email protected]>
[Qt] QtWebKit documentation missing a few since 4.6 information