Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1061)

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 1148003010: Force layout for main thread scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix layout-triggers test. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 933
934 if (!node) 934 if (!node)
935 node = m_frame->document()->focusedElement(); 935 node = m_frame->document()->focusedElement();
936 936
937 if (!node) 937 if (!node)
938 node = m_mousePressNode.get(); 938 node = m_mousePressNode.get();
939 939
940 if (!node || !node->layoutObject()) 940 if (!node || !node->layoutObject())
941 return false; 941 return false;
942 942
943 m_frame->document()->updateLayoutIgnorePendingStylesheets();
944
943 LayoutBox* curBox = node->layoutObject()->enclosingBox(); 945 LayoutBox* curBox = node->layoutObject()->enclosingBox();
944 while (curBox && !curBox->isLayoutView()) { 946 while (curBox && !curBox->isLayoutView()) {
945 ScrollDirectionPhysical physicalDirection = toPhysicalDirection( 947 ScrollDirectionPhysical physicalDirection = toPhysicalDirection(
946 direction, curBox->isHorizontalWritingMode(), curBox->style()->isFli ppedBlocksWritingMode()); 948 direction, curBox->isHorizontalWritingMode(), curBox->style()->isFli ppedBlocksWritingMode());
947 949
948 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it 950 // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
949 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode; 951 bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *st opNode;
950 bool didScroll = curBox->scroll(physicalDirection, granularity, delta); 952 bool didScroll = curBox->scroll(physicalDirection, granularity, delta);
951 953
952 if (didScroll && stopNode) 954 if (didScroll && stopNode)
(...skipping 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after
4172 unsigned EventHandler::accessKeyModifiers() 4174 unsigned EventHandler::accessKeyModifiers()
4173 { 4175 {
4174 #if OS(MACOSX) 4176 #if OS(MACOSX)
4175 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4177 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4176 #else 4178 #else
4177 return PlatformEvent::AltKey; 4179 return PlatformEvent::AltKey;
4178 #endif 4180 #endif
4179 } 4181 }
4180 4182
4181 } // namespace blink 4183 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698