Changeset 83832 in webkit
- Timestamp:
- Apr 14, 2011 3:46:14 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 1 deleted
- 13 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/Android.mk
r83636 r83832 487 487 platform/Logging.cpp \ 488 488 platform/MIMETypeRegistry.cpp \ 489 platform/RuntimeApplicationChecks.cpp \ 489 490 platform/ScrollView.cpp \ 490 491 platform/Scrollbar.cpp \ -
trunk/Source/WebCore/CMakeLists.txt
r83792 r83832 1055 1055 platform/Logging.cpp 1056 1056 platform/MIMETypeRegistry.cpp 1057 platform/RuntimeApplicationChecks.cpp 1057 1058 platform/ScrollAnimator.cpp 1058 1059 platform/ScrollableArea.cpp -
trunk/Source/WebCore/ChangeLog
r83828 r83832 1 2011-04-14 Andy Estes <aestes@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 REGRESSION (r75555): Safari RSS sidebar jiggles when scrolling 6 https://bugs.webkit.org/show_bug.cgi?id=52988 7 8 Safari RSS relies on synchronous dispatch of ScrollEvent to update the 9 position of its sidebar during scrolling without producing a jiggling 10 effect. Due to r75555, this event is no longer dispatched synchronously 11 which results in stale repaints before the onscroll handler gets a 12 chance to update the position of the sidebar. 13 14 Since it is impractical to resolve this issue in Safari RSS itself, add 15 a quirk that restores synchronous ScrollEvent dispatch for Safari RSS. 16 17 No tests. This is an app-specific change that doesn't affect web 18 content. 19 20 * Android.mk: Add platform/RuntimeApplicationChecks.[cpp|h] 21 * CMakeLists.txt: Ditto. 22 * GNUmakefile.list.am: Ditto. 23 * WebCore.gypi: Ditto. 24 * WebCore.pro: Ditto. 25 * WebCore.vcproj/WebCore.vcproj: Ditto. 26 * WebCore.xcodeproj/project.pbxproj: Ditto. 27 * dom/EventQueue.cpp: 28 (WebCore::shouldDispatchScrollEventSynchronously): Send ScrollEvent 29 synchronously if the embedding application is Safari and the document's 30 URL scheme is "feed" or "feeds". 31 (WebCore::EventQueue::enqueueOrDispatchScrollEvent): Dispatch 32 ScrollEvent synchronously if shouldDispatchScrollEventSynchronously() 33 returns true. 34 * dom/EventQueue.h: 35 * page/EventHandler.cpp: 36 (WebCore::EventHandler::sendScrollEvent): Call enqueueOrDispatchScrollEvent(). 37 * platform/RuntimeApplicationChecks.cpp: Added. 38 (WebCore::mainBundleIsEqualTo): Add a helper routine for CF platforms 39 that checks if the main bundle's identifier is equal to a given string. 40 This function returns false for non-CF platforms. 41 (WebCore::applicationIsSafari): Call mainBundleIsEqualTo(). 42 (WebCore::applicationIsAppleMail): Ditto. 43 (WebCore::applicationIsMicrosoftMessenger): Ditto. 44 (WebCore::applicationIsAdobeInstaller): Ditto. 45 (WebCore::applicationIsAOLInstantMessenger): Ditto. 46 (WebCore::applicationIsMicrosoftMyDay): Ditto. 47 (WebCore::applicationIsMicrosoftOutlook): Ditto. 48 * platform/mac/RuntimeApplicationChecks.mm: Removed. Functions moved to 49 RuntimeApplicationChecks.cpp. 50 * rendering/RenderLayer.cpp: 51 (WebCore::RenderLayer::scrollTo): Call enqueueOrDispatchScrollEvent(). 52 * rendering/RenderListBox.cpp: 53 (WebCore::RenderListBox::scrollTo): Call enqueueOrDispatchScrollEvent(). 54 1 55 2011-04-14 John Bates <jbates@google.com> 2 56 -
trunk/Source/WebCore/GNUmakefile.list.am
r83636 r83832 2573 2573 Source/WebCore/platform/PurgeableBuffer.h \ 2574 2574 Source/WebCore/platform/PurgePriority.h \ 2575 Source/WebCore/platform/RuntimeApplicationChecks.cpp \ 2576 Source/WebCore/platform/RuntimeApplicationChecks.h \ 2575 2577 Source/WebCore/platform/SchemeRegistry.cpp \ 2576 2578 Source/WebCore/platform/SchemeRegistry.h \ -
trunk/Source/WebCore/WebCore.gypi
r83791 r83832 771 771 'platform/PopupMenuStyle.h', 772 772 'platform/PurgePriority.h', 773 'platform/RuntimeApplicationChecks.h', 773 774 'platform/SchemeRegistry.h', 774 775 'platform/ScrollTypes.h', … … 3557 3558 'platform/PurgeableBuffer.h', 3558 3559 'platform/RunLoopTimer.h', 3560 'platform/RuntimeApplicationChecks.cpp', 3561 'platform/RuntimeApplicationChecks.h', 3559 3562 'platform/SSLKeyGenerator.h', 3560 3563 'platform/SchemeRegistry.cpp', -
trunk/Source/WebCore/WebCore.pro
r83729 r83832 1032 1032 platform/network/ResourceResponseBase.cpp \ 1033 1033 platform/text/RegularExpression.cpp \ 1034 platform/RuntimeApplicationChecks.cpp \ 1034 1035 platform/SchemeRegistry.cpp \ 1035 1036 platform/ScrollableArea.cpp \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r83786 r83832 26179 26179 </File> 26180 26180 <File 26181 RelativePath="..\platform\RuntimeApplicationChecks.cpp" 26182 > 26183 </File> 26184 <File 26185 RelativePath="..\platform\RuntimeApplicationChecks.h" 26186 > 26187 </File> 26188 <File 26181 26189 RelativePath="..\platform\SchemeRegistry.cpp" 26182 26190 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r83786 r83832 658 658 2542F4DB1166C25A00E89A86 /* UserGestureIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2542F4D91166C25A00E89A86 /* UserGestureIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 659 659 26E98A10130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */; }; 660 293EAE1F1356B2FE0067ACF9 /* RuntimeApplicationChecks.h in Headers */ = {isa = PBXBuildFile; fileRef = 293EAE1E1356B2FE0067ACF9 /* RuntimeApplicationChecks.h */; }; 661 293EAE211356B32E0067ACF9 /* RuntimeApplicationChecks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 293EAE201356B32E0067ACF9 /* RuntimeApplicationChecks.cpp */; }; 660 662 29489FC712C00F0300D83F0F /* AccessibilityScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29489FC512C00F0300D83F0F /* AccessibilityScrollView.h */; }; 661 663 29A8122B0FBB9C1D00510293 /* AccessibilityTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 29A8120D0FBB9C1D00510293 /* AccessibilityTable.h */; }; … … 1012 1014 44311CD912E4E257000A8D19 /* DOMDocumentFragmentPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 44311CD412E4E22D000A8D19 /* DOMDocumentFragmentPrivate.h */; }; 1013 1015 44311F8212E4E66C000A8D19 /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; }; 1014 447D69030FA626810015CCB1 /* RuntimeApplicationChecks.h in Headers */ = {isa = PBXBuildFile; fileRef = 447D69010FA626810015CCB1 /* RuntimeApplicationChecks.h */; settings = {ATTRIBUTES = (Private, ); }; };1015 447D69040FA626810015CCB1 /* RuntimeApplicationChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 447D69020FA626810015CCB1 /* RuntimeApplicationChecks.mm */; };1016 1016 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */; }; 1017 1017 448A29C00A46D9CB0030759F /* JSHTMLOptionsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */; }; … … 7097 7097 2542F4D91166C25A00E89A86 /* UserGestureIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserGestureIndicator.h; sourceTree = "<group>"; }; 7098 7098 26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecASCIIFastPath.h; sourceTree = "<group>"; }; 7099 293EAE1E1356B2FE0067ACF9 /* RuntimeApplicationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeApplicationChecks.h; sourceTree = "<group>"; }; 7100 293EAE201356B32E0067ACF9 /* RuntimeApplicationChecks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeApplicationChecks.cpp; sourceTree = "<group>"; }; 7099 7101 29489FC512C00F0300D83F0F /* AccessibilityScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityScrollView.h; sourceTree = "<group>"; }; 7100 7102 2981CA9D131822EC00D12F2A /* AccessibilityARIAGrid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityARIAGrid.cpp; sourceTree = "<group>"; }; … … 7522 7524 44311CD412E4E22D000A8D19 /* DOMDocumentFragmentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDocumentFragmentPrivate.h; sourceTree = "<group>"; }; 7523 7525 44311CD512E4E22D000A8D19 /* DOMDocumentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDocumentPrivate.h; sourceTree = "<group>"; }; 7524 447D69010FA626810015CCB1 /* RuntimeApplicationChecks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuntimeApplicationChecks.h; sourceTree = "<group>"; };7525 447D69020FA626810015CCB1 /* RuntimeApplicationChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RuntimeApplicationChecks.mm; sourceTree = "<group>"; };7526 7526 448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLOptionsCollection.h; sourceTree = "<group>"; }; 7527 7527 448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOptionsCollection.cpp; sourceTree = "<group>"; }; … … 14195 14195 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */, 14196 14196 E4D687760ED7AE3D006EA978 /* PurgeableBufferMac.cpp */, 14197 447D69010FA626810015CCB1 /* RuntimeApplicationChecks.h */,14198 447D69020FA626810015CCB1 /* RuntimeApplicationChecks.mm */,14199 14197 1CE24F960D7CAF0E007E04C2 /* SchedulePairMac.mm */, 14200 14198 BCAE1FA512939DB7004CB026 /* ScrollAnimatorMac.h */, … … 18665 18663 7E33CD00127F340D00BE8F17 /* PurgePriority.h */, 18666 18664 1C63A2460F71646600C09D5A /* RunLoopTimer.h */, 18665 293EAE1E1356B2FE0067ACF9 /* RuntimeApplicationChecks.h */, 18667 18666 5162C7F211F77EFA00612EFE /* SchemeRegistry.cpp */, 18668 18667 5162C7F311F77EFB00612EFE /* SchemeRegistry.h */, … … 18707 18706 9380F47209A11AB4001FDB34 /* Widget.h */, 18708 18707 E1E1BEFF115FF6FB006F52CA /* WindowsKeyboardCodes.h */, 18708 293EAE201356B32E0067ACF9 /* RuntimeApplicationChecks.cpp */, 18709 18709 ); 18710 18710 path = platform; … … 22261 22261 1A569D230D7E2B82007C3983 /* runtime_object.h in Headers */, 22262 22262 1A569D250D7E2B82007C3983 /* runtime_root.h in Headers */, 22263 447D69030FA626810015CCB1 /* RuntimeApplicationChecks.h in Headers */,22264 22263 8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */, 22265 22264 49E911CB0EF86D47009D0CAF /* ScaleTransformOperation.h in Headers */, … … 22914 22913 22BD9F7F1353625C009BD102 /* ImageBufferData.h in Headers */, 22915 22914 22BD9F81135364FE009BD102 /* ImageBufferDataCG.h in Headers */, 22915 293EAE1F1356B2FE0067ACF9 /* RuntimeApplicationChecks.h in Headers */, 22916 22916 ); 22917 22917 runOnlyForDeploymentPostprocessing = 0; … … 25096 25096 1A569D220D7E2B82007C3983 /* runtime_object.cpp in Sources */, 25097 25097 1A569D240D7E2B82007C3983 /* runtime_root.cpp in Sources */, 25098 447D69040FA626810015CCB1 /* RuntimeApplicationChecks.mm in Sources */,25099 25098 8C6EA61911EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp in Sources */, 25100 25099 49E911CA0EF86D47009D0CAF /* ScaleTransformOperation.cpp in Sources */, … … 25613 25612 977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */, 25614 25613 2292B27C1356669400CF11EF /* ImageBufferDataCG.cpp in Sources */, 25614 293EAE211356B32E0067ACF9 /* RuntimeApplicationChecks.cpp in Sources */, 25615 25615 ); 25616 25616 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/dom/EventQueue.cpp
r83128 r83832 29 29 30 30 #include "DOMWindow.h" 31 #include "Document.h" 31 32 #include "Event.h" 32 33 #include "EventNames.h" 34 #include "RuntimeApplicationChecks.h" 33 35 #include "ScriptExecutionContext.h" 34 36 #include "SuspendableTimer.h" 35 37 36 38 namespace WebCore { 39 40 static inline bool shouldDispatchScrollEventSynchronously(Document* document) 41 { 42 ASSERT_ARG(document, document); 43 return applicationIsSafari() && (document->url().protocolIs("feed") || document->url().protocolIs("feeds")); 44 } 37 45 38 46 class EventQueueTimer : public SuspendableTimer { … … 72 80 } 73 81 74 void EventQueue::enqueue ScrollEvent(PassRefPtr<Node> target, ScrollEventTargetType targetType)82 void EventQueue::enqueueOrDispatchScrollEvent(PassRefPtr<Node> target, ScrollEventTargetType targetType) 75 83 { 84 // Per the W3C CSSOM View Module, scroll events fired at the document should bubble, others should not. 85 bool canBubble = targetType == ScrollEventDocumentTarget; 86 RefPtr<Event> scrollEvent = Event::create(eventNames().scrollEvent, canBubble, false /* non cancelleable */); 87 88 if (shouldDispatchScrollEventSynchronously(target->document())) { 89 target->dispatchEvent(scrollEvent.release()); 90 return; 91 } 92 76 93 if (!m_nodesWithQueuedScrollEvents.add(target.get()).second) 77 94 return; 78 95 79 // Per the W3C CSSOM View Module, scroll events fired at the document should bubble, others should not.80 bool canBubble = targetType == ScrollEventDocumentTarget;81 RefPtr<Event> scrollEvent = Event::create(eventNames().scrollEvent, canBubble, false /* non cancelleable */);82 96 scrollEvent->setTarget(target); 83 97 enqueueEvent(scrollEvent.release()); -
trunk/Source/WebCore/dom/EventQueue.h
r83128 r83832 52 52 53 53 void enqueueEvent(PassRefPtr<Event>); 54 void enqueue ScrollEvent(PassRefPtr<Node>, ScrollEventTargetType);54 void enqueueOrDispatchScrollEvent(PassRefPtr<Node>, ScrollEventTargetType); 55 55 bool cancelEvent(Event*); 56 56 void cancelQueuedEvents(); -
trunk/Source/WebCore/page/EventHandler.cpp
r83688 r83832 2969 2969 setFrameWasScrolledByUser(); 2970 2970 if (m_frame->view() && m_frame->document()) 2971 m_frame->document()->eventQueue()->enqueue ScrollEvent(m_frame->document(), EventQueue::ScrollEventDocumentTarget);2971 m_frame->document()->eventQueue()->enqueueOrDispatchScrollEvent(m_frame->document(), EventQueue::ScrollEventDocumentTarget); 2972 2972 } 2973 2973 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r83820 r83832 1405 1405 1406 1406 // Schedule the scroll DOM event. 1407 renderer()->node()->document()->eventQueue()->enqueue ScrollEvent(renderer()->node(), EventQueue::ScrollEventElementTarget);1407 renderer()->node()->document()->eventQueue()->enqueueOrDispatchScrollEvent(renderer()->node(), EventQueue::ScrollEventElementTarget); 1408 1408 } 1409 1409 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r82200 r83832 600 600 m_indexOffset = newOffset; 601 601 repaint(); 602 node()->document()->eventQueue()->enqueue ScrollEvent(node(), EventQueue::ScrollEventElementTarget);602 node()->document()->eventQueue()->enqueueOrDispatchScrollEvent(node(), EventQueue::ScrollEventElementTarget); 603 603 } 604 604
Note: See TracChangeset
for help on using the changeset viewer.