|
Lines 1798-1803
bool RenderLayer::isActive() const
Source/WebCore/rendering/RenderLayer.cpp_sec1
|
| 1798 |
return page && page->focusController()->isActive(); |
1798 |
return page && page->focusController()->isActive(); |
| 1799 |
} |
1799 |
} |
| 1800 |
|
1800 |
|
|
|
1801 |
static LayoutUnit cornerStart(const RenderLayer* layer, int minX, int maxX, int thickness) |
| 1802 |
{ |
| 1803 |
#if USE(RTL_SCROLLBAR) |
| 1804 |
if (layer->renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) |
| 1805 |
return minX + layer->renderer()->style()->borderLeftWidth(); |
| 1806 |
#else |
| 1807 |
UNUSED_PARAM(minX); |
| 1808 |
#endif |
| 1809 |
return maxX - thickness - layer->renderer()->style()->borderRightWidth(); |
| 1810 |
} |
| 1811 |
|
| 1801 |
static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds) |
1812 |
static IntRect cornerRect(const RenderLayer* layer, const IntRect& bounds) |
| 1802 |
{ |
1813 |
{ |
| 1803 |
int horizontalThickness; |
1814 |
int horizontalThickness; |
|
Lines 1817-1823
static IntRect cornerRect(const RenderLa
Source/WebCore/rendering/RenderLayer.cpp_sec2
|
| 1817 |
horizontalThickness = layer->verticalScrollbar()->width(); |
1828 |
horizontalThickness = layer->verticalScrollbar()->width(); |
| 1818 |
verticalThickness = layer->horizontalScrollbar()->height(); |
1829 |
verticalThickness = layer->horizontalScrollbar()->height(); |
| 1819 |
} |
1830 |
} |
| 1820 |
return IntRect(bounds.maxX() - horizontalThickness - layer->renderer()->style()->borderRightWidth(), |
1831 |
return IntRect(cornerStart(layer, bounds.x(), bounds.maxX(), horizontalThickness), |
| 1821 |
bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(), |
1832 |
bounds.maxY() - verticalThickness - layer->renderer()->style()->borderBottomWidth(), |
| 1822 |
horizontalThickness, verticalThickness); |
1833 |
horizontalThickness, verticalThickness); |
| 1823 |
} |
1834 |
} |
|
Lines 1940-1954
IntPoint RenderLayer::currentMousePositi
Source/WebCore/rendering/RenderLayer.cpp_sec3
|
| 1940 |
return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : IntPoint(); |
1951 |
return renderer()->frame() ? renderer()->frame()->eventHandler()->currentMousePosition() : IntPoint(); |
| 1941 |
} |
1952 |
} |
| 1942 |
|
1953 |
|
|
|
1954 |
LayoutUnit RenderLayer::verticalScrollbarStart(int minX, int maxX) const |
| 1955 |
{ |
| 1956 |
const RenderBox* box = renderBox(); |
| 1957 |
#if USE(RTL_SCROLLBAR) |
| 1958 |
if (renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) |
| 1959 |
return minX + box->borderLeft(); |
| 1960 |
#else |
| 1961 |
UNUSED_PARAM(minX); |
| 1962 |
#endif |
| 1963 |
return maxX - box->borderRight() - m_vBar->width(); |
| 1964 |
} |
| 1965 |
|
| 1966 |
LayoutUnit RenderLayer::horizontalScrollbarStart(int minX) const |
| 1967 |
{ |
| 1968 |
const RenderBox* box = renderBox(); |
| 1969 |
int x = minX + box->borderLeft(); |
| 1970 |
#if USE(RTL_SCROLLBAR) |
| 1971 |
if (renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) |
| 1972 |
x += m_vBar ? m_vBar->width() : resizerCornerRect(this, box->borderBoxRect()).width(); |
| 1973 |
#endif |
| 1974 |
return x; |
| 1975 |
} |
| 1976 |
|
| 1943 |
IntSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const |
1977 |
IntSize RenderLayer::scrollbarOffset(const Scrollbar* scrollbar) const |
| 1944 |
{ |
1978 |
{ |
| 1945 |
RenderBox* box = renderBox(); |
1979 |
RenderBox* box = renderBox(); |
| 1946 |
|
1980 |
|
| 1947 |
if (scrollbar == m_vBar.get()) |
1981 |
if (scrollbar == m_vBar.get()) |
| 1948 |
return IntSize(box->width() - box->borderRight() - scrollbar->width(), box->borderTop()); |
1982 |
return IntSize(verticalScrollbarStart(0, box->width()), box->borderTop()); |
| 1949 |
|
1983 |
|
| 1950 |
if (scrollbar == m_hBar.get()) |
1984 |
if (scrollbar == m_hBar.get()) |
| 1951 |
return IntSize(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height()); |
1985 |
return IntSize(horizontalScrollbarStart(0), box->height() - box->borderBottom() - scrollbar->height()); |
| 1952 |
|
1986 |
|
| 1953 |
ASSERT_NOT_REACHED(); |
1987 |
ASSERT_NOT_REACHED(); |
| 1954 |
return IntSize(); |
1988 |
return IntSize(); |
|
Lines 1973-1981
void RenderLayer::invalidateScrollbarRec
Source/WebCore/rendering/RenderLayer.cpp_sec4
|
| 1973 |
RenderBox* box = renderBox(); |
2007 |
RenderBox* box = renderBox(); |
| 1974 |
ASSERT(box); |
2008 |
ASSERT(box); |
| 1975 |
if (scrollbar == m_vBar.get()) |
2009 |
if (scrollbar == m_vBar.get()) |
| 1976 |
scrollRect.move(box->width() - box->borderRight() - scrollbar->width(), box->borderTop()); |
2010 |
scrollRect.move(verticalScrollbarStart(0, box->width()), box->borderTop()); |
| 1977 |
else |
2011 |
else |
| 1978 |
scrollRect.move(box->borderLeft(), box->height() - box->borderBottom() - scrollbar->height()); |
2012 |
scrollRect.move(horizontalScrollbarStart(0), box->height() - box->borderBottom() - scrollbar->height()); |
| 1979 |
renderer()->repaintRectangle(scrollRect); |
2013 |
renderer()->repaintRectangle(scrollRect); |
| 1980 |
} |
2014 |
} |
| 1981 |
|
2015 |
|
|
Lines 2153-2165
void RenderLayer::positionOverflowContro
Source/WebCore/rendering/RenderLayer.cpp_sec5
|
| 2153 |
const IntRect& scrollCorner = scrollCornerRect(); |
2187 |
const IntRect& scrollCorner = scrollCornerRect(); |
| 2154 |
IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size()); |
2188 |
IntRect absBounds(borderBox.location() + offsetFromLayer, borderBox.size()); |
| 2155 |
if (m_vBar) |
2189 |
if (m_vBar) |
| 2156 |
m_vBar->setFrameRect(IntRect(absBounds.maxX() - box->borderRight() - m_vBar->width(), |
2190 |
m_vBar->setFrameRect(IntRect(verticalScrollbarStart(absBounds.x(), absBounds.maxX()), |
| 2157 |
absBounds.y() + box->borderTop(), |
2191 |
absBounds.y() + box->borderTop(), |
| 2158 |
m_vBar->width(), |
2192 |
m_vBar->width(), |
| 2159 |
absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height())); |
2193 |
absBounds.height() - (box->borderTop() + box->borderBottom()) - scrollCorner.height())); |
| 2160 |
|
2194 |
|
| 2161 |
if (m_hBar) |
2195 |
if (m_hBar) |
| 2162 |
m_hBar->setFrameRect(IntRect(absBounds.x() + box->borderLeft(), |
2196 |
m_hBar->setFrameRect(IntRect(horizontalScrollbarStart(absBounds.x()), |
| 2163 |
absBounds.maxY() - box->borderBottom() - m_hBar->height(), |
2197 |
absBounds.maxY() - box->borderBottom() - m_hBar->height(), |
| 2164 |
absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(), |
2198 |
absBounds.width() - (box->borderLeft() + box->borderRight()) - scrollCorner.width(), |
| 2165 |
m_hBar->height())); |
2199 |
m_hBar->height())); |
|
Lines 2560-2566
bool RenderLayer::hitTestOverflowControl
Source/WebCore/rendering/RenderLayer.cpp_sec6
|
| 2560 |
int resizeControlSize = max(resizeControlRect.height(), 0); |
2594 |
int resizeControlSize = max(resizeControlRect.height(), 0); |
| 2561 |
|
2595 |
|
| 2562 |
if (m_vBar && m_vBar->shouldParticipateInHitTesting()) { |
2596 |
if (m_vBar && m_vBar->shouldParticipateInHitTesting()) { |
| 2563 |
LayoutRect vBarRect(box->width() - box->borderRight() - m_vBar->width(), |
2597 |
LayoutRect vBarRect(verticalScrollbarStart(0, box->width()), |
| 2564 |
box->borderTop(), |
2598 |
box->borderTop(), |
| 2565 |
m_vBar->width(), |
2599 |
m_vBar->width(), |
| 2566 |
box->height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize)); |
2600 |
box->height() - (box->borderTop() + box->borderBottom()) - (m_hBar ? m_hBar->height() : resizeControlSize)); |
|
Lines 2572-2578
bool RenderLayer::hitTestOverflowControl
Source/WebCore/rendering/RenderLayer.cpp_sec7
|
| 2572 |
|
2606 |
|
| 2573 |
resizeControlSize = max(resizeControlRect.width(), 0); |
2607 |
resizeControlSize = max(resizeControlRect.width(), 0); |
| 2574 |
if (m_hBar && m_hBar->shouldParticipateInHitTesting()) { |
2608 |
if (m_hBar && m_hBar->shouldParticipateInHitTesting()) { |
| 2575 |
LayoutRect hBarRect(box->borderLeft(), |
2609 |
LayoutRect hBarRect(horizontalScrollbarStart(0), |
| 2576 |
box->height() - box->borderBottom() - m_hBar->height(), |
2610 |
box->height() - box->borderBottom() - m_hBar->height(), |
| 2577 |
box->width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize), |
2611 |
box->width() - (box->borderLeft() + box->borderRight()) - (m_vBar ? m_vBar->width() : resizeControlSize), |
| 2578 |
m_hBar->height()); |
2612 |
m_hBar->height()); |