diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/html/HTMLBodyElement.cpp | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/html/HTMLBodyElement.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLBodyElement.cpp | 9 |
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 |