|
Lines 213-218
void FrameView::reset()
a/Source/WebCore/page/FrameView.cpp_sec1
|
| 213 |
m_cannotBlitToWindow = false; |
213 |
m_cannotBlitToWindow = false; |
| 214 |
m_isOverlapped = false; |
214 |
m_isOverlapped = false; |
| 215 |
m_contentIsOpaque = false; |
215 |
m_contentIsOpaque = false; |
|
|
216 |
m_layoutFixedElementsRelativeToFrame = false; |
| 216 |
m_borderX = 30; |
217 |
m_borderX = 30; |
| 217 |
m_borderY = 30; |
218 |
m_borderY = 30; |
| 218 |
m_layoutTimer.stop(); |
219 |
m_layoutTimer.stop(); |
|
Lines 1387-1393
LayoutUnit FrameView::scrollXForFixedPosition() const
a/Source/WebCore/page/FrameView.cpp_sec2
|
| 1387 |
// When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned |
1388 |
// When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned |
| 1388 |
// doesn't move as fast as the content view, so that when the content is scrolled all the way to the |
1389 |
// doesn't move as fast as the content view, so that when the content is scrolled all the way to the |
| 1389 |
// end, the bottom of the scaled "viewport" touches the bottom of the real viewport. |
1390 |
// end, the bottom of the scaled "viewport" touches the bottom of the real viewport. |
| 1390 |
float dragFactor = (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX; |
1391 |
float dragFactor = layoutFixedElementsRelativeToFrame() ? 1 : (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX; |
| 1391 |
|
1392 |
|
| 1392 |
return x * dragFactor / frameScaleFactor; |
1393 |
return x * dragFactor / frameScaleFactor; |
| 1393 |
} |
1394 |
} |
|
Lines 1395-1402
LayoutUnit FrameView::scrollXForFixedPosition() const
a/Source/WebCore/page/FrameView.cpp_sec3
|
| 1395 |
LayoutUnit FrameView::scrollYForFixedPosition() const |
1396 |
LayoutUnit FrameView::scrollYForFixedPosition() const |
| 1396 |
{ |
1397 |
{ |
| 1397 |
LayoutUnit visibleContentHeight = visibleContentRect().height(); |
1398 |
LayoutUnit visibleContentHeight = visibleContentRect().height(); |
| 1398 |
|
|
|
| 1399 |
LayoutUnit maxY = contentsHeight() - visibleContentHeight; |
1399 |
LayoutUnit maxY = contentsHeight() - visibleContentHeight; |
|
|
1400 |
|
| 1400 |
if (maxY == 0) |
1401 |
if (maxY == 0) |
| 1401 |
return 0; |
1402 |
return 0; |
| 1402 |
|
1403 |
|
|
Lines 1418-1425
LayoutUnit FrameView::scrollYForFixedPosition() const
a/Source/WebCore/page/FrameView.cpp_sec4
|
| 1418 |
return y; |
1419 |
return y; |
| 1419 |
|
1420 |
|
| 1420 |
float frameScaleFactor = m_frame->frameScaleFactor(); |
1421 |
float frameScaleFactor = m_frame->frameScaleFactor(); |
| 1421 |
float dragFactor = (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY; |
1422 |
float dragFactor = layoutFixedElementsRelativeToFrame() ? 1 : (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY; |
| 1422 |
|
|
|
| 1423 |
return y * dragFactor / frameScaleFactor; |
1423 |
return y * dragFactor / frameScaleFactor; |
| 1424 |
} |
1424 |
} |
| 1425 |
|
1425 |
|
|
Lines 1428-1433
LayoutSize FrameView::scrollOffsetForFixedPosition() const
a/Source/WebCore/page/FrameView.cpp_sec5
|
| 1428 |
return LayoutSize(scrollXForFixedPosition(), scrollYForFixedPosition()); |
1428 |
return LayoutSize(scrollXForFixedPosition(), scrollYForFixedPosition()); |
| 1429 |
} |
1429 |
} |
| 1430 |
|
1430 |
|
|
|
1431 |
void FrameView::setLayoutFixedElementsRelativeToFrame(bool layoutFixedElementsRelativeToFrame) |
| 1432 |
{ |
| 1433 |
if (layoutFixedElementsRelativeToFrame == m_layoutFixedElementsRelativeToFrame) |
| 1434 |
return; |
| 1435 |
|
| 1436 |
m_layoutFixedElementsRelativeToFrame = layoutFixedElementsRelativeToFrame; |
| 1437 |
|
| 1438 |
if (!hasFixedObjects()) |
| 1439 |
return; |
| 1440 |
|
| 1441 |
setNeedsLayout(); |
| 1442 |
} |
| 1443 |
|
| 1431 |
LayoutPoint FrameView::currentMousePosition() const |
1444 |
LayoutPoint FrameView::currentMousePosition() const |
| 1432 |
{ |
1445 |
{ |
| 1433 |
return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint(); |
1446 |
return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint(); |