Commit 1f8b99ce authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] WebPage: fix build due to type mismatches

https://bugs.webkit.org/show_bug.cgi?id=114148

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-08
Reviewed by Darin Adler.

Add explicit conversions between LayoutUnit and int, and between
LayoutRect and IntRect.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::rectForNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 385909e0
...@@ -2736,15 +2736,15 @@ IntRect WebPagePrivate::rectForNode(Node* node) ...@@ -2736,15 +2736,15 @@ IntRect WebPagePrivate::rectForNode(Node* node)
int xOffset = 0; int xOffset = 0;
int yOffset = 0; int yOffset = 0;
while (!renderBlock->isRoot()) { while (!renderBlock->isRoot()) {
xOffset += renderBlock->x(); xOffset += renderBlock->x().toInt();
yOffset += renderBlock->y(); yOffset += renderBlock->y().toInt();
renderBlock = renderBlock->containingBlock(); renderBlock = renderBlock->containingBlock();
} }
const RenderText* renderText = toRenderText(renderer); const RenderText* renderText = toRenderText(renderer);
IntRect linesBox = renderText->linesBoundingBox(); IntRect linesBox = renderText->linesBoundingBox();
blockRect = IntRect(xOffset + linesBox.x(), yOffset + linesBox.y(), linesBox.width(), linesBox.height()); blockRect = IntRect(xOffset + linesBox.x(), yOffset + linesBox.y(), linesBox.width(), linesBox.height());
} else } else
blockRect = renderer->absoluteClippedOverflowRect(); blockRect = IntRect(renderer->absoluteClippedOverflowRect());
if (renderer->isText()) { if (renderer->isText()) {
RenderBlock* rb = renderer->containingBlock(); RenderBlock* rb = renderer->containingBlock();
...@@ -2753,7 +2753,7 @@ IntRect WebPagePrivate::rectForNode(Node* node) ...@@ -2753,7 +2753,7 @@ IntRect WebPagePrivate::rectForNode(Node* node)
int blockWidth = 0; int blockWidth = 0;
int lineCount = rb->lineCount(); int lineCount = rb->lineCount();
for (int i = 0; i < lineCount; i++) for (int i = 0; i < lineCount; i++)
blockWidth = max(blockWidth, rb->availableLogicalWidthForLine(i, false)); blockWidth = max(blockWidth, rb->availableLogicalWidthForLine(i, false).toInt());
blockRect.setWidth(blockWidth); blockRect.setWidth(blockWidth);
blockRect.setX(blockRect.x() + rb->logicalLeftOffsetForLine(1, false)); blockRect.setX(blockRect.x() + rb->logicalLeftOffsetForLine(1, false));
......
2013-04-08 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] WebPage: fix build due to type mismatches
https://bugs.webkit.org/show_bug.cgi?id=114148
Reviewed by Darin Adler.
Add explicit conversions between LayoutUnit and int, and between
LayoutRect and IntRect.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::rectForNode):
2013-04-08 Jeff Rogers <jrogers@rim.com> 2013-04-08 Jeff Rogers <jrogers@rim.com>
   
[BlackBerry] Update BlackBerry JavaScript API [BlackBerry] Update BlackBerry JavaScript API
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment