summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html/HTMLBodyElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLBodyElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLBodyElement.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/WebCore/html/HTMLBodyElement.cpp b/Source/WebCore/html/HTMLBodyElement.cpp
index 84f81c3..3cc4cd8 100644
--- a/Source/WebCore/html/HTMLBodyElement.cpp
+++ b/Source/WebCore/html/HTMLBodyElement.cpp
@@ -171,6 +171,8 @@ void HTMLBodyElement::parseMappedAttribute(Attribute* attr)
document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == onscrollAttr)
document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attr));
+ else if (attr->name() == onselectionchangeAttr)
+ document()->setAttributeEventListener(eventNames().selectionchangeEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == onstorageAttr)
document()->setWindowAttributeEventListener(eventNames().storageEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == ononlineAttr)
@@ -286,7 +288,8 @@ void HTMLBodyElement::setVLink(const String& value)
static int adjustForZoom(int value, Document* document)
{
- float zoomFactor = document->frame()->pageZoomFactor();
+ Frame* frame = document->frame();
+ float zoomFactor = frame->pageZoomFactor() * frame->pageScaleFactor();
if (zoomFactor == 1)
return value;
// Needed because of truncation (rather than rounding) when scaling up.
@@ -314,7 +317,7 @@ void HTMLBodyElement::setScrollLeft(int scrollLeft)
FrameView* view = frame->view();
if (!view)
return;
- view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor()), view->scrollY()));
+ view->setScrollPosition(IntPoint(static_cast<int>(scrollLeft * frame->pageZoomFactor() * frame->pageScaleFactor()), view->scrollY()));
}
int HTMLBodyElement::scrollTop() const
@@ -336,7 +339,7 @@ void HTMLBodyElement::setScrollTop(int scrollTop)
FrameView* view = frame->view();
if (!view)
return;
- view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor())));
+ view->setScrollPosition(IntPoint(view->scrollX(), static_cast<int>(scrollTop * frame->pageZoomFactor() * frame->pageScaleFactor())));
}
int HTMLBodyElement::scrollHeight() const