WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-99975-20121026155409.patch (text/plain), 103.44 KB, created by
Alec Flett
on 2012-10-26 15:55:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alec Flett
Created:
2012-10-26 15:55:38 PDT
Size:
103.44 KB
patch
obsolete
>Subversion Revision: 132633 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 225dc27f3b8982382984d42cbf0e06b4b127aaa2..40a7678fa2aaba03c321b10f70e25b2fd1f25b1d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,38 @@ >+2012-10-26 Dan Carney <dcarney@google.com> >+ >+ Remove ensureAuxiliaryContext >+ https://bugs.webkit.org/show_bug.cgi?id=99975 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Removed auxilliaryContext as use if it is problematic in IDB. >+ >+ No new tests. No change in functionality. >+ >+ * Modules/indexeddb/IDBCursor.cpp: >+ (WebCore::IDBCursor::update): >+ (WebCore::IDBCursor::setValueReady): >+ * Modules/indexeddb/IDBCursor.h: >+ (IDBCursor): >+ * Modules/indexeddb/IDBObjectStore.cpp: >+ (WebCore::generateIndexKeysForValue): >+ (WebCore::IDBObjectStore::put): >+ (WebCore): >+ * Modules/indexeddb/IDBRequest.cpp: >+ (WebCore::IDBRequest::onSuccess): >+ (WebCore::IDBRequest::dispatchEvent): >+ * bindings/v8/IDBBindingUtilities.cpp: >+ (WebCore::createIDBKeyFromScriptValueAndKeyPath): >+ (WebCore::deserializeIDBValue): >+ (WebCore::injectIDBKeyIntoScriptValue): >+ * bindings/v8/IDBBindingUtilities.h: >+ (WebCore): >+ * bindings/v8/V8Binding.cpp: >+ (WebCore::toV8Context): >+ (WebCore): >+ * bindings/v8/V8Binding.h: >+ (WebCore): >+ > 2012-10-26 Kenneth Rohde Christiansen <kenneth@webkit.org> > > Printing should use use high resolution images when available >@@ -494,7 +529,7 @@ > Helper method used to clear the overrideLogicalContentHeight for auto logical height regions. > (WebCore::RenderFlowThread::addForcedRegionBreak): > Extend the method to process region breaks. The method returns true if at least one auto logical height region >- has its override logical content height computed. >+ has its override logical content height computed. > * rendering/RenderFlowThread.h: > * rendering/RenderRegion.cpp: Make these methods work with auto logical height regions. > (WebCore::RenderRegion::pageLogicalHeight): >@@ -710,7 +745,7 @@ > Replaced "undefined" with "null" > * inspector/front-end/AuditsPanel.js: > (WebInspector.AuditCategory.prototype.callbackWrapper): >- Removed callback parameter indirection. >+ Removed callback parameter indirection. > (WebInspector.AuditRuleResult.prototype.addFormatted): > Converted private instance function to scoped function. > >@@ -1106,13 +1141,13 @@ > in these tile coordinates. This worked for the page tile cache, > because its visibleRect was sent in pre-scaled. However, for > tiled layer TileCaches this was wrong. >- >+ > Fix by scaling the tile coverage rect by m_scale before > using it to compute which tiles to throw away and bring in. >- >+ > To fix the problem of the visibleRect being pre-scaled > for the page tile cache, remove the setting of the visibleRect >- in RenderLayerCompositor::frameViewDidScroll(), and rely on >+ in RenderLayerCompositor::frameViewDidScroll(), and rely on > GraphicsLayerCA::updateVisibleRect() which computes the > visible rect in the correct, layer coordinates. > >@@ -1430,10 +1465,10 @@ > > Reviewed by Andreas Kling. > >- There is no need to invalidate element style on id attribute change if neither the old nor the new id were >+ There is no need to invalidate element style on id attribute change if neither the old nor the new id were > mentioned in any stylesheet. This is similar to the optimization we already have for class attributes. >- >- Recalculating element style is expensive. It seems id attribute mutation is often used in scripts for purposes other than styling. >+ >+ Recalculating element style is expensive. It seems id attribute mutation is often used in scripts for purposes other than styling. > > * css/StyleResolver.cpp: > (WebCore::StyleResolver::hasSelectorForId): >@@ -1573,7 +1608,7 @@ > > Changes empty string form-action replacement to about:blank. > Existing form-action.html test modified to check this case. >- >+ > * html/parser/XSSAuditor.cpp: > (WebCore::XSSAuditor::filterFormToken): > >@@ -1587,7 +1622,7 @@ > Inidcate that an <embed> element can respond to > mouse click events, since mouse events are forwarded > to the plugin. Fixes touch adjustment at a plugin >- boundary. Prior to the patch a clickable element >+ boundary. Prior to the patch a clickable element > adjacent to the plugin would capture synthetic mouse > events from tap gestures that spanned the plugin > boundary. >@@ -1626,10 +1661,10 @@ > > r132427 assumed that TileCaches were only used for the page, and changed the tile > size behavior of all non-page TileCaches. >- >+ > Fix by giving TiledBacking a new 'CoverageForSlowScrolling' flag which > affects the tile size behavior. >- >+ > Consolidated the two places that set TileCoverage into one, and in the process > reduced FrameView's direct communication with TiledBacking. > >@@ -1711,7 +1746,7 @@ > (ResourceLoadScheduler): > > Add the new method plus a default implementation: >- * loader/LoaderStrategy.cpp: >+ * loader/LoaderStrategy.cpp: > (WebCore::LoaderStrategy::resourceLoadScheduler): > * loader/LoaderStrategy.h: > >@@ -2335,35 +2370,35 @@ > 2012-10-24 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=100169 >- We should make TileCache tiles the size of the tile coverage rect >+ We should make TileCache tiles the size of the tile coverage rect > when we can't do fast scrolling > -and- > <rdar://problem/12505021> > > Reviewed by Simon Fraser. > >- Some websites that don't do fast scrolling still scroll slower than >- they do with tiled drawing disabled. >- https://bugs.webkit.org/show_bug.cgi?id=99768 addressed some of this >- performance problem, but there is still more ground to make up. This >- patch addresses the remaining issue by making tiles the size of the >- window when we can't do fast scrolling. >+ Some websites that don't do fast scrolling still scroll slower than >+ they do with tiled drawing disabled. >+ https://bugs.webkit.org/show_bug.cgi?id=99768 addressed some of this >+ performance problem, but there is still more ground to make up. This >+ patch addresses the remaining issue by making tiles the size of the >+ window when we can't do fast scrolling. > >- The constructor and create function no longer take a size parameter. >- That's all fully controlled within TileCache now. m_tileSize is no >+ The constructor and create function no longer take a size parameter. >+ That's all fully controlled within TileCache now. m_tileSize is no > longer const. > * platform/graphics/ca/mac/TileCache.h: > >- Store the current default size as constants so that we can access it >+ Store the current default size as constants so that we can access it > in both the constructor and adjustTileSizeForCoverageRect(). > * platform/graphics/ca/mac/TileCache.mm: > (WebCore::TileCache::TileCache): > >- This new function will set m_tileSize to the size of the tile >- coverage rect if the tile coverage is limited to the visible area. >+ This new function will set m_tileSize to the size of the tile >+ coverage rect if the tile coverage is limited to the visible area. > Otherwise, the tiles are set to be the default size. > (WebCore::TileCache::adjustTileSizeForCoverageRect): >- >+ > Call adjustTileSizeForCoverageRect(). > (WebCore::TileCache::revalidateTiles): > >@@ -2579,14 +2614,14 @@ > > Reviewed by Adam Barth. > >- Currently a long-press gesture is used to dispatch a context menu (for platforms >- defining CONTEXT_MENUS) or to select text (for Android). Additionally, for platforms >- defining TOUCH_ADJUSTMENT, gesture target fuzzing is performed on the location and >+ Currently a long-press gesture is used to dispatch a context menu (for platforms >+ defining CONTEXT_MENUS) or to select text (for Android). Additionally, for platforms >+ defining TOUCH_ADJUSTMENT, gesture target fuzzing is performed on the location and > touch area of the long-press gesture. > >- This CL will cause two-finger tap gestures to be handled in the same way as long-press >- gestures. The location and touch area of a two-finger tap gesture will correspond to >- the location and touch area of the first finger down; the location/area of the second >+ This CL will cause two-finger tap gestures to be handled in the same way as long-press >+ gestures. The location and touch area of a two-finger tap gesture will correspond to >+ the location and touch area of the first finger down; the location/area of the second > finger will be ignored. > > Test: touchadjustment/touch-links-two-finger-tap.html >@@ -2791,13 +2826,13 @@ > m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered > content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden, > it is the primary layer that is set to be single-sided. >- >+ > In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via >- "customSublayers" returned from the PlatformCALayer, where the custom sublayer is >+ "customSublayers" returned from the PlatformCALayer, where the custom sublayer is > the tile cache container layer. However, the custom sublayers were being added as > children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer, > thus they were not affected by the doubleSided property. >- >+ > This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList() > by maintaining two vectors of PlatformCALayers, one for sublayers of the structural > layer, and one for sublayers of the primary layer. It adds custom sublayers to >@@ -2966,7 +3001,7 @@ > Reviewed by Levi Weintraub. > > RenderSVGRoot::paintReplaced() converts the container offsets to a relative transform, >- but in doing so it ends up accumulating subpixel rounding deltas twice: first for >+ but in doing so it ends up accumulating subpixel rounding deltas twice: first for > adjustedPaintOffset and second in localToParentTransform(). If coordinates are on > half-pixel boundaries, the 2x rounding delta yields a full pixel drift and we end up > painting at the wrong location. >@@ -3116,7 +3151,7 @@ > <rdar://problem/12044964> > > Unreviewed Build fix. >- >+ > CGFloat is already a float in a 32-bit build so narrowPrecisionToFloat() is unnecessary > > * page/CaptionUserPreferencesMac.mm: >@@ -3146,7 +3181,7 @@ > (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as > un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused. > (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks. >- (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from >+ (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from > setClosedCaptionsVisible > * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener. > >@@ -3171,10 +3206,10 @@ > > * html/track/TextTrackCue.cpp: > (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id. >- (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the >+ (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the > shadow pseudo id so it can be used elsewhere. > (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId. >- (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the >+ (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the > shadow pseudo id so it can be used elsewhere. > (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto. > (WebCore::TextTrackCue::updateDisplayTree): >@@ -3189,15 +3224,15 @@ > (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function. > (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto. > (WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference. >- (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption >+ (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption > background color preference. > (WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference. > (WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect. > (WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow > or webkit-text-stroke property. >- (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property >+ (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property > with a color value. >- (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption >+ (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption > text with the user's preferred text edge stye. > (WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption > text with the user's preferred font. >@@ -3205,7 +3240,7 @@ > with the user's preferred style. > (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale. > (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change. >- (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences >+ (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences > changes listener. > (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences > changes listener. >@@ -3437,7 +3472,7 @@ > Reviewed by George Staikos. > > We should store the credentials in the redirection response handler, if the request is challenged. >- Because the redirect response suggests the authentication succeeds. >+ Because the redirect response suggests the authentication succeeds. > > Test: http://browsertest01.rim.net/authbasic > >@@ -3727,10 +3762,10 @@ > background tab. However, that dropped the layer flush on the floor, so that any subsequent changes > to GraphicsLayerCAs would just pile up and never get flushed. This was most evident on pages > that require frequent flushing, such as those running animated GIFs. >- >+ > Fix by setting a flag in flushPendingLayerChanges() if we're unattached. Consult the flag > when re-attaching the root layer, and if it's set, flush the GraphicsLayers. >- >+ > Not testable because we can't test detaching and re-adding web views in DRT/WTR. > > * rendering/RenderLayerCompositor.cpp: >@@ -4530,9 +4565,9 @@ > > Reviewed by Dean Jackson. > >- When binding a texture to GL_TEXTURE_2D when GL_ACTIVE_TEXTURE is 0, we set m_boundTexture0 to the texture unit. >+ When binding a texture to GL_TEXTURE_2D when GL_ACTIVE_TEXTURE is 0, we set m_boundTexture0 to the texture unit. > However when we delete the texture, we need to be setting m_boundTexture0 to 0. >- Otherwise when we draw to the screen we bind m_boundTexture0 in the prepareTexture() method and since the associated texture >+ Otherwise when we draw to the screen we bind m_boundTexture0 in the prepareTexture() method and since the associated texture > has already been deleted we end up in an error state. > > Tested using Khronos WebGL conformance suite: >@@ -4549,7 +4584,7 @@ > Reviewed by Darin Adler. > > The 'y' parameters of polygon were calculated by the with of the bounding box of the object. >- This caused problems on percentage values for point positions. >+ This caused problems on percentage values for point positions. > Changed it to the height of the bounding box. > > Test: css3/masking/clip-path-polygon-percentage.html >@@ -4851,7 +4886,7 @@ > https://bugs.webkit.org/show_bug.cgi?id=100018 > > Reviewed by Julien Chaffraix. >- >+ > Remove unnecessary initialization from LayoutState constructor > added in r132105. > >@@ -5447,7 +5482,7 @@ > > Reviewed by George Staikos. > >- In "NetworkJob::handleNotifyHeaderReceived", if there are several "Set-Cookie" headers, >+ In "NetworkJob::handleNotifyHeaderReceived", if there are several "Set-Cookie" headers, > we should combine the following ones with the first. > > No new test case. >@@ -5932,7 +5967,7 @@ > a reallocation in the ElementAttributeData's underlying Vector<Attribute>. > > To make it harder to introduce this kind of bug in the future, I changed almost all functions that take >- a "const Attribute&" to take a QualifiedName/AtomicString couple instead (the idea being that the >+ a "const Attribute&" to take a QualifiedName/AtomicString couple instead (the idea being that the > fewer references into the attribute store we have, the better.) > > Test: fast/html/input-type-change-crash.html >@@ -6143,7 +6178,7 @@ > > Reviewed by Alexey Proskuryakov. > >- Followup fix to r131955 for chromium platform. Added call to >+ Followup fix to r131955 for chromium platform. Added call to > (const UChar*, unsigned) version of visitedLinkHash from String& version. > > * platform/chromium/LinkHashChromium.cpp: >@@ -6228,7 +6263,7 @@ > (WebCore::InlineFlowBox::computeLogicalBoxHeights): > (WebCore::InlineFlowBox::placeBoxesInBlockDirection): > Change maxAscent/maxDescent to int to match ascent/descent. >- >+ > * rendering/InlineFlowBox.h: > (InlineFlowBox): > * rendering/InlineTextBox.cpp: >@@ -7360,7 +7395,7 @@ > 2012-10-19 Simon Fraser <simon.fraser@apple.com> > > Remove .get() calls in assertions as suggested by Darin Adler. >- >+ > * platform/graphics/ca/mac/PlatformCALayerMac.mm: > (PlatformCALayer::appendSublayer): > (PlatformCALayer::insertSublayer): >@@ -7377,20 +7412,20 @@ > The new tile cache code added an updateSublayers() call when switching to/from > tiled layers. This confused later sublayer rebuilding, causing us to attempt to > add a layer as a child of itself, causing a hang in CA. >- >+ > Fix by removing all the explicit calls to updateFoo when updating the structural > layer and switching to/from tiled layers. Instead, we set dirty flags, and rely > on the fact that these flag-dirtying functions get called before the later functions > that process those dirty flags. This is assured by some reordering of the update > function calls. >- >+ > A final wrinkle is that ensureStructuralLayer() can change the layer that our > parent GraphicsLayer put in its sublayer list. Rather than diddle with that sublayer > list directly like we used to, just call noteSublayersChanged() on the parent, and have > commitLayerChangesAfterSublayers() check the ChildrenChanged and do a second update > of sublayers if necessary (we clear the flag in commitLayerChangesBeforeSublayers(), so > only do this work if a sublayer requested it). >- >+ > Tests: compositing/tiling/preserve3d-tiled.html > compositing/tiling/reflected-tiled.html > >@@ -7689,23 +7724,23 @@ > 2012-10-19 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=99768 >- We should limit the tile cache coverage when a page can't take >+ We should limit the tile cache coverage when a page can't take > advantage of fast tile scrolling anyway > > Reviewed by Simon Fraser. > >- When sites can't use fast-scrolling, there is no need to inflate the >- tile cache. In fact, we get a performance boost by keeping it small >- on painting-intensive sites. >+ When sites can't use fast-scrolling, there is no need to inflate the >+ tile cache. In fact, we get a performance boost by keeping it small >+ on painting-intensive sites. > >- Instead of just looking a whether or not the FrameView >- canHaveScrollbar(), consult >+ Instead of just looking a whether or not the FrameView >+ canHaveScrollbar(), consult > shouldUpdateScrollLayerPositionOnMainThread(). > * page/FrameView.cpp: > (WebCore::FrameView::performPostLayoutTasks): > * rendering/RenderLayerBacking.cpp: > (WebCore::RenderLayerBacking::RenderLayerBacking): >- >+ > Expose shouldUpdateScrollLayerPositionOnMainThread(). > * page/scrolling/ScrollingCoordinator.cpp: > (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects): >@@ -7880,7 +7915,7 @@ > Marking internal bitmap copy as immutable to prevent it from being > unnecessarily duplicated in skia by SkBitmapHeap. > >- No new tests: code path already well covered by existing layout tests >+ No new tests: code path already well covered by existing layout tests > fast/canvas/canvas-pattern-* > > * platform/graphics/skia/PatternSkia.cpp: >@@ -7893,8 +7928,8 @@ > > Reviewed by Andreas Kling. > >- Currently we maintain a per-document list of stylesheets that matches what is returned by the StyleSheetList DOM API. >- This list contains both CSS and XSLT stylesheets which internally have basically nothing in common. Maintaining >+ Currently we maintain a per-document list of stylesheets that matches what is returned by the StyleSheetList DOM API. >+ This list contains both CSS and XSLT stylesheets which internally have basically nothing in common. Maintaining > a list of active CSS stylesheets separately simplifies code in number of places. > > * css/StyleResolver.cpp: >@@ -8200,7 +8235,7 @@ > > ARIA requires that aria-hidden=false override an element's native visibility and include that > node in the AX hierarchy. >- >+ > To accomplish this we have to allow invisible items to be included, as well as items that > have no renderers associated with them. > >@@ -8315,14 +8350,14 @@ > Reviewed by Beth Dakin. > > The current model of determining the accessible text for an object has a lot of Mac biases built in >- due to legacy implementation. >+ due to legacy implementation. > > This change categorizes and orders accessibility text based on WAI-ARIA text computation rules and then > allows the platform (only Mac right now) to decide how best to apply that text to its own AX API. > http://www.w3.org/TR/wai-aria/roles#textalternativecomputation > > This change tried very hard not to change any test behavior, even though it exposed a number of weird >- edge cases where we were treating attributes differently based on element type. >+ edge cases where we were treating attributes differently based on element type. > > Future patches will resolve those discrepancies. > >@@ -8905,7 +8940,7 @@ > Reviewed by Tony Gentilcore. > > http://www.w3.org/TR/2012/CR-resource-timing-20120522/ >- This patch enable functionality of set buffer size(default is 150 as spec). When buffer is full, resourceTimingBufferFull event will be fired. Incoming entries will be dropped if no more space for them. >+ This patch enable functionality of set buffer size(default is 150 as spec). When buffer is full, resourceTimingBufferFull event will be fired. Incoming entries will be dropped if no more space for them. > > Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html > http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html >@@ -9253,26 +9288,26 @@ > 2012-10-18 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=99668 >- REGRESSION: Crash in >+ REGRESSION: Crash in > WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion > -and corresponding- > <rdar://problem/12491901> > > Reviewed by Simon Fraser. > >- http://trac.webkit.org/changeset/130783 changed the lifetime of the >- ScrollingStateTree's rootStateNode. Before that patch, the root state >- node was never destroyed. It was just constantly re-used for >- different RenderLayerBackings. This crash is just one of a few bugs >- that has occurred because of that change. I have fixed the other bugs >- individually, but I think that long-term, it is the safest solution >+ http://trac.webkit.org/changeset/130783 changed the lifetime of the >+ ScrollingStateTree's rootStateNode. Before that patch, the root state >+ node was never destroyed. It was just constantly re-used for >+ different RenderLayerBackings. This crash is just one of a few bugs >+ that has occurred because of that change. I have fixed the other bugs >+ individually, but I think that long-term, it is the safest solution > to go back to the original ownership model. > >- So this patch ensures that the state tree will always have a root >- state node. Instead of destroying and re-creating the root node when >+ So this patch ensures that the state tree will always have a root >+ state node. Instead of destroying and re-creating the root node when > it's scroll ID changes, we just update the ID. > >- attachToStateTree() now takes an additional ID representing the ID of >+ attachToStateTree() now takes an additional ID representing the ID of > the parent node. > * page/scrolling/ScrollingCoordinator.h: > (WebCore::ScrollingCoordinator::attachToStateTree): >@@ -9281,11 +9316,11 @@ > * page/scrolling/ScrollingStateNode.h: > (WebCore::ScrollingStateNode::setScrollingNodeID): > >- This code that provided a way to mark all properties as having >- changed was added in http://trac.webkit.org/changeset/130989 as a way >- to ensure we would re-set ScrollingThread's nodes when we destroyed >- and re-created the rootStateNode. Now that we are no longer >- destroying and re-creating the rootStateNode, this code is no longer >+ This code that provided a way to mark all properties as having >+ changed was added in http://trac.webkit.org/changeset/130989 as a way >+ to ensure we would re-set ScrollingThread's nodes when we destroyed >+ and re-created the rootStateNode. Now that we are no longer >+ destroying and re-creating the rootStateNode, this code is no longer > necessary. > * page/scrolling/ScrollingStateScrollingNode.cpp: > * page/scrolling/ScrollingStateScrollingNode.h: >@@ -9304,7 +9339,7 @@ > (ScrollingStateTree): > (WebCore::ScrollingStateTree::setRootStateNode): > >- attachToStateTree() now takes an additional ID representing the ID of >+ attachToStateTree() now takes an additional ID representing the ID of > the parent node. > * page/scrolling/mac/ScrollingCoordinatorMac.h: > (ScrollingCoordinatorMac): >@@ -9313,19 +9348,19 @@ > * page/scrolling/mac/ScrollingCoordinatorMac.mm: > (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange): > >- Do not destroy and re-create the state node. Just update its ID. When >+ Do not destroy and re-create the state node. Just update its ID. When > we support child nodes soon, we will create them in this function. > (WebCore::ScrollingCoordinatorMac::attachToStateTree): > > No need to null-check the rootStateNode. > (WebCore::ScrollingCoordinatorMac::clearStateTree): > >- Send 0 as the parent node ID to attachToStateTree() to represent the >+ Send 0 as the parent node ID to attachToStateTree() to represent the > root node. > (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): > * rendering/RenderLayerBacking.cpp: > >- RenderLayerBacking::attachToScrollingCoordinator() now takes a parent >+ RenderLayerBacking::attachToScrollingCoordinator() now takes a parent > layer. > (WebCore::RenderLayerBacking::attachToScrollingCoordinator): > * rendering/RenderLayerBacking.h: >@@ -9518,7 +9553,7 @@ > > Reviewed by Dan Bernstein. > >- Factored out and added findFirstTrailingSpace() templated helper function that is called with the >+ Factored out and added findFirstTrailingSpace() templated helper function that is called with the > approriate character pointer type. > > No tests needed, change covered by existing tests. >@@ -10165,11 +10200,11 @@ > visible area periodically while animations and scrolling are happening. > Make a new class, GraphicsLayerUpdater, to handle this updating. > Internally, it uses DisplayRefreshMonitor to generate the periodic updates. >- >+ > GraphicsLayer clients are notified that layers need periodic updates. Clients > are free to make use of GraphicsLayerUpdater to handle this updating, as > RenderLayerCompositor does. >- >+ > Also do some minor refactoring of methods in RenderLayerCompositor that > get to Page. > >@@ -10683,7 +10718,7 @@ > Reviewed by Adam Barth. > > Security origin of isolated worlds was not previously set at the world >- level, although it could have been. >+ level, although it could have been. > > No new tests. No change in functionality. > >@@ -10724,10 +10759,10 @@ > be reflected in the GraphicsLayer's m_transform. However, > we need the current value of the transform in order to correctly > compute the visible rect of this layer and descendants. >- >+ > Add a function to GraphicsLayerClient to retrieve the current > value of the transform from the client. >- >+ > RenderLayer's currentTransform() used to return a transform > with transform-origin baked in; GraphicsLayerClient needs one > that excludes transform-origin, so enhance RenderLayer::currentTransform() >@@ -11227,7 +11262,7 @@ > of the StyleContentType enum and all the switch statements over > the type(). > >- No tests needed, this is just a refactor. >+ No tests needed, this is just a refactor. > > * rendering/style/ContentData.cpp: > * rendering/style/ContentData.h: >@@ -11545,7 +11580,7 @@ > Reviewed by Simon Fraser. > > No new tests as it's a speculative fix based on crash dump analysis. >- >+ > Despite MediaControlPanelElement checking for document()->page() nullity in other places, it forgot one check in makeTransparent(). > > * html/shadow/MediaControlElements.cpp: >@@ -11584,7 +11619,7 @@ > > Clean up some #includes, mostly related to GraphicsLayer.h. In many > cases this can be replaced by PlatformLayer.h. >- >+ > Remove an #include of PluginViewBase.h from Page.h, which was a source > of #include fan-out. > >@@ -11625,7 +11660,7 @@ > > Reviewed by Alexey Proskuryakov. > >- On construction from platform error types, initialize the timeout flag >+ On construction from platform error types, initialize the timeout flag > to true if the error results from a timeout. > > No new tests, covered by tests that will be added in bug 74802. >@@ -11796,33 +11831,33 @@ > 2012-10-16 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=99254 >- Make ScrollingTree an actual tree of nodes, and have it reflect the >+ Make ScrollingTree an actual tree of nodes, and have it reflect the > ScrollingStateTree > > Reviewed by Simon Fraser. > >- This patch finally makes the ScrollingTree over on the >- ScrollingThread aware of the changes that we have been making to the >+ This patch finally makes the ScrollingTree over on the >+ ScrollingThread aware of the changes that we have been making to the > ScrollingStateTree. > >- First, it makes ScrollingTreeNode a much more generic class, similar >- to ScrollingStateNode. It is an abstract class and we will add other >- types of nodes such as ScrollingTreeFixedNodes that will inherit from >- this class. >+ First, it makes ScrollingTreeNode a much more generic class, similar >+ to ScrollingStateNode. It is an abstract class and we will add other >+ types of nodes such as ScrollingTreeFixedNodes that will inherit from >+ this class. > >- All of the scrolling functionality that was in ScrollingTreeNode has >- been moved to ScrollingTreeScrollingNode. And likewise, >- ScrollingTreeNodeMac has been re-named to >- ScrollingTreeScrollingNodeMac. >+ All of the scrolling functionality that was in ScrollingTreeNode has >+ been moved to ScrollingTreeScrollingNode. And likewise, >+ ScrollingTreeNodeMac has been re-named to >+ ScrollingTreeScrollingNodeMac. > >- And finally, instead of just updating and creating the root node, >- ScrollingTree now recurses through the whole ScrollingStateTree to >+ And finally, instead of just updating and creating the root node, >+ ScrollingTree now recurses through the whole ScrollingStateTree to > create and update a full tree of nodes. > > New files and moves files. > * WebCore.xcodeproj/project.pbxproj: > >- Add a getter for the children vector since we need to recurse it in >+ Add a getter for the children vector since we need to recurse it in > ScrollingTree. > * page/scrolling/ScrollingStateNode.h: > (WebCore::ScrollingStateNode::children): >@@ -11832,27 +11867,27 @@ > * page/scrolling/ScrollingTree.cpp: > (WebCore::ScrollingTree::ScrollingTree): > >- Instead of just updating the root node, call two new functions that >+ Instead of just updating the root node, call two new functions that > will take care of updating the whole tree. > (WebCore::ScrollingTree::commitNewTreeState): > >- This function ecurses through the ScrollingStateTree and updates the >+ This function ecurses through the ScrollingStateTree and updates the > corresponding ScrollingTreeNodes. > (WebCore::ScrollingTree::updateNodesFromStateNode): > >- This function takes the ScrollingStateTree's list of removed nodes >- and removes the corresponding nodes from the ScrollingTree. It will >- destroy the nodes after removing it as long as it's not the root >- node. I think it's the safest choice for now to never remove the root >- node. >+ This function takes the ScrollingStateTree's list of removed nodes >+ and removes the corresponding nodes from the ScrollingTree. It will >+ destroy the nodes after removing it as long as it's not the root >+ node. I think it's the safest choice for now to never remove the root >+ node. > (WebCore::ScrollingTree::removeDestroyedNodes): > >- ScrollingTree now keeps a HashMap mapping ScrollingNodeIDs to >+ ScrollingTree now keeps a HashMap mapping ScrollingNodeIDs to > ScrollingTreeNodes. > * page/scrolling/ScrollingTree.h: > >- All of the scrolling-related functionality has been moved from this >- class to new class ScrollingTreeScrollingNode. And some basic tree >+ All of the scrolling-related functionality has been moved from this >+ class to new class ScrollingTreeScrollingNode. And some basic tree > traversal functionality has been added. > * page/scrolling/ScrollingTreeNode.cpp: > (WebCore::ScrollingTreeNode::ScrollingTreeNode): >@@ -11867,7 +11902,7 @@ > (WebCore::ScrollingTreeNode::setParent): > (WebCore::ScrollingTreeNode::scrollingTree): > >- This class contains all of the scrolling-related work that used to be >+ This class contains all of the scrolling-related work that used to be > done in ScrollingTreeNode. > * page/scrolling/ScrollingTreeScrollingNode.cpp: Added. > (WebCore): >@@ -11891,7 +11926,7 @@ > * page/scrolling/mac/ScrollingCoordinatorMac.mm: > (WebCore::ScrollingCoordinatorMac::detachFromStateTree): > >- Include ScrollingTreeScrollingNodeMac.h instead of >+ Include ScrollingTreeScrollingNodeMac.h instead of > ScrollingTreeNodeMac.h > * page/scrolling/mac/ScrollingTreeMac.mm: > >@@ -11940,7 +11975,7 @@ > add a new PlatformCALayer layer type LayerTypePageTileCacheLayer, > since the page tile cache will have some different behavior from > other tile cache layers. >- >+ > Generalize code that was looking at LayerTypeTileCacheLayer to use > usesTileCacheLayer() if it applies to both types of tile caches. > >@@ -11961,7 +11996,7 @@ > * platform/graphics/mac/WebLayer.mm: > (drawLayerContents): Avoid double-drawing the repaint counter in tile cache layers. > >-2012-10-16 Stephen Chenney <schenney@chromium.org> >+2012-10-16 Stephen Chenney <schenney@chromium.org> > An feImage that tries to render itself should be stopped > https://bugs.webkit.org/show_bug.cgi?id=94652 > >@@ -12232,7 +12267,7 @@ > RenderLayers cache repaint rects which are computed relative to the repaint container. > Repaint containers depend on whether a RenderLayerBacking has its own backing store, > so if that changes, we need to recompute repaint rects for all descendants. >- >+ > Test: compositing/repaint/requires-backing-repaint.html > > * rendering/RenderLayerBacking.cpp: >@@ -13029,7 +13064,7 @@ > rect on the root used for GraphicsLayer visibleRect computation. This > was wrong for subframes, which require a rect with an origin of (0,0) > and size of the contentsSize(). >- >+ > It was also wrong when the scrolling is not represented in the GraphicsLayer > tree. When scrolling is done elsewhere, we need to use the ScrollView's > visibleContentRect(). >@@ -13207,7 +13242,7 @@ > When doing threaded scrolling, the scrolling thread updates the positions of CALayers, > but doesn't update GraphicsLayers. This means that code that relies on GraphicsLayer positions > works incorrectly. >- >+ > Threaded scrolling is not testabled in layout tests. > > * page/scrolling/ScrollingCoordinator.cpp: >@@ -13371,7 +13406,7 @@ > > Reviewed by Stephen White. > >- No new tests -- existing layouttests exercise this, esp. >+ No new tests -- existing layouttests exercise this, esp. > png-partial-load-no-alpha.html > webp-partial-load.html > These two fail if skia is told that these are opaque, which it is w/o this CL. >@@ -13587,7 +13622,7 @@ > > Current tests already cover this code. > >- * css/CSSComputedStyleDeclaration.cpp: >+ * css/CSSComputedStyleDeclaration.cpp: > (WebCore::CSSComputedStyleDeclaration::valueForFilter): The check for mixSettings.enabled has been replaced > by an explicit check for PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE program type. > * css/StyleResolver.cpp: >@@ -13852,15 +13887,15 @@ > 2012-10-15 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=99350 >- REGRESSION (r131238): Repro crash in >- WebCore::ScrollingStateTree::removeNode(WebCore::ScrollingStateNode*) >+ REGRESSION (r131238): Repro crash in >+ WebCore::ScrollingStateTree::removeNode(WebCore::ScrollingStateNode*) > opening pdf page > -and corresponding- > <rdar://problem/12499839> > > Reviewed by Simon Fraser. > >- We have to null-check node here. It won't be found if >+ We have to null-check node here. It won't be found if > clearStateTree() was recently called. > * page/scrolling/mac/ScrollingCoordinatorMac.mm: > (WebCore::ScrollingCoordinatorMac::detachFromStateTree): >@@ -14094,11 +14129,11 @@ > actual text data for performance. Added a characterAt() indexed accessor to RenderText to avoid the > somewhat confusing construct for a RenderText* rt, e.g. (*re)[n] or rt->characters()[n]. This is > now written as rt->characterAt(n). >- Enabled patch in the HTML parser to create 8 bit text data. Modified TextRun to create >+ Enabled patch in the HTML parser to create 8 bit text data. Modified TextRun to create > text runs using 8 bit string data where possible. Added several flavors of RenderBlock::constructTextRun > to create TextRuns from RenderText objects including with an offset. Added an LChar flavor of constructTextRun() > as well. Eliminated the TextRunFlags argument to all but the String flavor as all other flavors used the default >- parameter. >+ parameter. > Encased the code that creates 8 bit TextRun's in #if USE(8BIT_TEXTRUN). Enabled WTF_USE_8BIT_TEXTRUN > for PLATFORM(MAC). Other platform can update this setting in Platform.h when their platform specific code is > updated to TextRun's with 8 bit data. >@@ -14565,13 +14600,13 @@ > > GraphicsLayerCA::computeVisibleRect() was incorrect for layer trees with perspective > and preserve-3d, so fix that, and add some tests. >- >+ > Perspective is implemented via childrenTransform(); if our parent has one, > we have to left-multiply this into the transformation matrix. >- >+ > We have to test both this layer and its parent when deciding whether to accumulate > or flatten. >- >+ > Use state.mappedQuad() rather than state.lastPlanarQuad(), because the last planar > quad might be for some distant ancestor, and there may be intermediate preserve-3d > layers. >@@ -14638,19 +14673,19 @@ > 2012-10-12 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=99211 >- When ScrollingStateNodes are destroyed, they should be removed >+ When ScrollingStateNodes are destroyed, they should be removed > ScrollingCoordinator's HashMap > > Reviewed by Sam Weinig. > >- This patch adds a new member variable to ScrollingStateTree. It's a >- Vector of ScrollingNodeIDs. It will contain the IDs of nodes that >- have been removed from the tree since the last time the tree was >+ This patch adds a new member variable to ScrollingStateTree. It's a >+ Vector of ScrollingNodeIDs. It will contain the IDs of nodes that >+ have been removed from the tree since the last time the tree was > committed. > * page/scrolling/ScrollingStateTree.cpp: > (WebCore::ScrollingStateTree::ScrollingStateTree): > >- When we do commit, copy the Vector over into the cloned tree, and >+ When we do commit, copy the Vector over into the cloned tree, and > then clear our own Vector. > (WebCore::ScrollingStateTree::commit): > >@@ -14755,15 +14790,15 @@ > > Reviewed by Simon Fraser. > >- There is a HashMap in ScrollingCoordinatorMac that maps >- ScrollingNodeIDs to ScrollingStateNodes. The nodes themselves should >- keep track of this id. Then the id can be used to make sure >- ScrollingStateNodes remove themselves from the HashMap when they are >- destroyed, and it will also be useful for associating >- ScrollingStateNodes with ScrollingTreeNodes over on the scrolling >+ There is a HashMap in ScrollingCoordinatorMac that maps >+ ScrollingNodeIDs to ScrollingStateNodes. The nodes themselves should >+ keep track of this id. Then the id can be used to make sure >+ ScrollingStateNodes remove themselves from the HashMap when they are >+ destroyed, and it will also be useful for associating >+ ScrollingStateNodes with ScrollingTreeNodes over on the scrolling > thread. >- >- This patch only has the ScrollingStateNodes cache the id. I will >+ >+ This patch only has the ScrollingStateNodes cache the id. I will > actually make use of the id in follow-up patches. > > * page/scrolling/ScrollingStateNode.cpp: >@@ -14799,7 +14834,7 @@ > (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Fire a needkey event with an initData containing > the key URI. > (WebCore::extractKeyURIKeyIdAndCertificateFromInitData): Extract the keyURI, keyID, and the app certificate from the initData. >- (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Generate a streaming key request from AVFoundation and >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Generate a streaming key request from AVFoundation and > fire a keymessage event. > (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey): Pass to AVFoundation through the AVAssetResourceLoader. > (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelKeyRequest): Release the loader delegate. >@@ -14894,7 +14929,7 @@ > Floor baselinePosition for replaced elements to match logic in > RootInlineBox::ascentAndDescentForBox where the ascent is > computed from the floored baselinePosition. >- >+ > * rendering/RenderBox.cpp: > (WebCore::RenderBox::computePositionedLogicalWidthReplaced): > (WebCore::RenderBox::computePositionedLogicalHeightReplaced): >@@ -16750,15 +16785,15 @@ > > Reviewed by Anders Carlsson. > >- This patch moves all of the threaded scrolling code in >- ScrollingCoordinator into a new class called ScrollingCoordinatorMac >- which inherits from ScrollingCoordinator. >+ This patch moves all of the threaded scrolling code in >+ ScrollingCoordinator into a new class called ScrollingCoordinatorMac >+ which inherits from ScrollingCoordinator. >+ >+ It also adds ScrollingCoordinatorChromium to do Chromium-specific work. >+ ScrollingCoordinator itself does work that is cross-platform. > >- It also adds ScrollingCoordinatorChromium to do Chromium-specific work. >- ScrollingCoordinator itself does work that is cross-platform. >- >- Finally, this patch also eliminates ScrollingCoordinatorNone. >- ScrollingCoordinator is now sufficient for platforms that relied on >+ Finally, this patch also eliminates ScrollingCoordinatorNone. >+ ScrollingCoordinator is now sufficient for platforms that relied on > ScrollingCoordinatorNone to build. > > * CMakeLists.txt: >@@ -17572,7 +17607,7 @@ > Reviewed by Noam Rosenthal. > > Incorrect test (bytesPerLine == targetRect.width() / 4) never >- evaluates to true. Change it to correct test >+ evaluates to true. Change it to correct test > (bytesPerLine == targetRect.width() * 4) > > No new tests because no functional change. >@@ -18447,22 +18482,22 @@ > GraphicsLayerCA may have not flushed layers yet, so layer tree > properties that are affected by flushing (tiled layer, visible > rects) appeared flakey in tests. >- >- Fix by forcing a flush before dumping the layer tree. >- >+ >+ Fix by forcing a flush before dumping the layer tree. >+ > * rendering/RenderLayerCompositor.cpp: > (WebCore::RenderLayerCompositor::layerTreeAsText): > > 2012-10-10 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=98984 >- REGRESSION: Crash happens after we add non-top-level frame to the >+ REGRESSION: Crash happens after we add non-top-level frame to the > ScrollingStateTree > > Reviewed by Simon Fraser. > >- isRootLayer() can return true for layers that do not correspond to >- the main frame. But we only want the ones that DO correspond to the >+ isRootLayer() can return true for layers that do not correspond to >+ the main frame. But we only want the ones that DO correspond to the > main frame! > * rendering/RenderLayerCompositor.cpp: > (WebCore::RenderLayerCompositor::updateBacking): >@@ -18491,7 +18526,7 @@ > > 2012-10-10 Elliott Sprehn <esprehn@chromium.org> > >- Move :before and :after into the DOM >+ Move :before and :after into the DOM > https://bugs.webkit.org/show_bug.cgi?id=95117 > > Reviewed by Eric Seidel. >@@ -18632,7 +18667,7 @@ > Reviewed by Antti Koivisto. > > We've recently added the capability to switch sibling traversal strategy to SelectorChecker, at some readability/clarity expense. >- This patch tries to minimize the surface of this expense to SelectorChecker::checkOneSelector. >+ This patch tries to minimize the surface of this expense to SelectorChecker::checkOneSelector. > > No new tests, no change in behavior. > >@@ -18860,17 +18895,17 @@ > 2012-10-10 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=98968 >- REGRESSION: Unable to scroll with trackpad on some websites after >+ REGRESSION: Unable to scroll with trackpad on some websites after > r130783 > > Reviewed by Simon Fraser. > >- This bug seems to reproduce mostly on web pages that require login. >- The re-routing causes extra churn of the RenderLayerBacking, and we >- end up destroying and re-creating the backing and therefore the >- ScrollingStateNodes, and when the timing is just wrong we get into a >- state where the ScrollingTree has a set of incorrect information. >- This patch fixes the bug by making sure the ScrollingStateNodes keep >+ This bug seems to reproduce mostly on web pages that require login. >+ The re-routing causes extra churn of the RenderLayerBacking, and we >+ end up destroying and re-creating the backing and therefore the >+ ScrollingStateNodes, and when the timing is just wrong we get into a >+ state where the ScrollingTree has a set of incorrect information. >+ This patch fixes the bug by making sure the ScrollingStateNodes keep > the ScrollingTree in synch with their re-set data. > > Tell the ScrollingStateTree that the root layer has changed. >@@ -18885,7 +18920,7 @@ > (WebCore): > * page/scrolling/ScrollingStateScrollingNode.h: > >- When the root layer changes, make sure we update the ScrollingTree >+ When the root layer changes, make sure we update the ScrollingTree > appropriately by indicating that every property could have changed. > * page/scrolling/ScrollingStateTree.cpp: > (WebCore::ScrollingStateTree::rootLayerDidChange): >@@ -18963,7 +18998,7 @@ > Reviewed by Timothy Horton. > > When a variable name is too long we translate to a shorter version and keep a mapping between the long and short names. >- However, when querying for a variable client side using getActiveAttrib or getActiveUniform, we accidentally return the >+ However, when querying for a variable client side using getActiveAttrib or getActiveUniform, we accidentally return the > translated names. This fix makes these methods return the original variable names. > > Tested using Khronos WebGL conformance suite: >@@ -18976,7 +19011,7 @@ > (WebCore::GraphicsContext3D::getActiveAttrib): > (WebCore::GraphicsContext3D::getActiveUniform): > (WebCore): >- (WebCore::GraphicsContext3D::originalSymbolName): This method returns the original variable name given >+ (WebCore::GraphicsContext3D::originalSymbolName): This method returns the original variable name given > the mapped name. > > 2012-10-10 Brady Eidson <beidson@apple.com> >@@ -19276,7 +19311,7 @@ > > * loader/cache/CachedTextTrack.cpp: > (WebCore::CachedTextTrack::data): >- >+ > * loader/cache/CachedXSLStyleSheet.cpp: > (WebCore::CachedXSLStyleSheet::data): > >@@ -19457,7 +19492,7 @@ > To replace CATiledLayer with TileCaches, we need to be able to compute the visible part of a GraphicsLayer, > in order to limit the extent of TileCache tiles. Reuse the existing code in GraphicsLayerCA for this, > but store the computed rect in m_visibleRect. >- >+ > Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in > layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally. > >@@ -20542,7 +20577,7 @@ > > Reviewed by Tony Chang. > >- Adding back the ! removed by mistake before submitting r130779. >+ Adding back the ! removed by mistake before submitting r130779. > > * platform/graphics/FontFastPath.cpp: > (WebCore::Font::glyphDataAndPageForCharacter): >@@ -20569,9 +20604,9 @@ > > Normal anti-aliased text matches subpixel anti-aliased text. > However, text marked with webkit-font-smoothing:antialiased should be drawn without hinting to match Safari. >- See crbug.com/152304 . >+ See crbug.com/152304 . > >- Test is fast/css/font-smoothing.html, but DRT runs with font smoothing disabled, so no change visible. >+ Test is fast/css/font-smoothing.html, but DRT runs with font smoothing disabled, so no change visible. > > * platform/graphics/skia/FontSkia.cpp: > (WebCore::setupPaint): >@@ -20663,29 +20698,29 @@ > 2012-10-09 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=98457 >- ScrollingStateNodes should be referenced via IDs on >+ ScrollingStateNodes should be referenced via IDs on > RenderLayerBacking > > Reviewed by Simon Fraser. > >- This patch associates all ScrollingStateNodes with a >- RenderLayerBacking via a HashMap from RenderLayerBackings to >- ScrollingStateNodes on ScrollingCoordinator. Prior to this patch, the >- root ScrollingStateNode was created immediately upon creation of the >- ScrollingCoordinator, and it was constantly re-used for every main >- FrameView. This doesn't work in the new model since that doesn't >- allow that ScrollingStateNode to have a definite association with a >- RenderLayerBacking. So this patch does also introduce some lifetime >+ This patch associates all ScrollingStateNodes with a >+ RenderLayerBacking via a HashMap from RenderLayerBackings to >+ ScrollingStateNodes on ScrollingCoordinator. Prior to this patch, the >+ root ScrollingStateNode was created immediately upon creation of the >+ ScrollingCoordinator, and it was constantly re-used for every main >+ FrameView. This doesn't work in the new model since that doesn't >+ allow that ScrollingStateNode to have a definite association with a >+ RenderLayerBacking. So this patch does also introduce some lifetime > differences with the ScrollingStateNodes. > >- If a page is going into the page cache, we should clear the state >- tree. When the page is in the cache, we won't have access to the >- RenderLayerBacking, and we don't want to be doing anything with the >+ If a page is going into the page cache, we should clear the state >+ tree. When the page is in the cache, we won't have access to the >+ RenderLayerBacking, and we don't want to be doing anything with the > ScrollingStateNodes anyway. > * dom/Document.cpp: > (WebCore::Document::setInPageCache): > >- When a page is restored from the page cache, call >+ When a page is restored from the page cache, call > frameViewRootLayerDidChange() to re-create the state tree. > * loader/HistoryController.cpp: > (WebCore::HistoryController::restoreScrollPositionAndViewState): >@@ -20697,13 +20732,13 @@ > * page/FrameView.h: > (FrameView): > >- There is a lot of unfortunate fiddling with the terrible >+ There is a lot of unfortunate fiddling with the terrible > if-defs in ScrollingCoordinator. I added a FIXME to the header > noting how we can avoid this in the future. > * page/scrolling/ScrollingCoordinator.cpp: > >- All of this code used to refer to the rootStateNode directly. >- Instead, now it looks up the proper ScrollingStateNode for the given >+ All of this code used to refer to the rootStateNode directly. >+ Instead, now it looks up the proper ScrollingStateNode for the given > FrameView in the HashMap. > (WebCore::ScrollingCoordinator::frameViewLayoutUpdated): > (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged): >@@ -20716,15 +20751,15 @@ > (WebCore::ScrollingCoordinator::setScrollParametersForNode): > (WebCore::ScrollingCoordinator::setWheelEventHandlerCountForNode): > >- Returns the existing ScrollingStateNode for a given FrameView by >+ Returns the existing ScrollingStateNode for a given FrameView by > looking it up in the HashMap. > (WebCore::ScrollingCoordinator::stateNodeForFrameView): > >- This is called when a RenderLayerBacking is destroyed. At that time, >+ This is called when a RenderLayerBacking is destroyed. At that time, > its associated ScrollingStateNode is destroyed. > (WebCore::ScrollingCoordinator::detachFromStateTree): > >- clearStateTree() clears the HashMap and destroys all of the nodes in >+ clearStateTree() clears the HashMap and destroys all of the nodes in > the current state tree. > (WebCore::ScrollingCoordinator::clearStateTree): > >@@ -20745,7 +20780,7 @@ > (WebCore::setScrollParameters): > (WebCore::setWheelEventHandlerCount): > >- New remove functions are used when the sate tree is cleared and when >+ New remove functions are used when the sate tree is cleared and when > a RenderLayerBacking is destroyed. > * page/scrolling/ScrollingStateNode.cpp: > (WebCore::ScrollingStateNode::removeChild): >@@ -20760,8 +20795,8 @@ > (WebCore::toScrollingStateScrollingNode): > (WebCore): > >- No longer automatically create a root node upon creation of the >- ScrollingStateTree. We now want to wait to create the root node until >+ No longer automatically create a root node upon creation of the >+ ScrollingStateTree. We now want to wait to create the root node until > we have a RenderLayerBacking to associate it with. > * page/scrolling/ScrollingStateTree.cpp: > (WebCore::ScrollingStateTree::ScrollingStateTree): >@@ -20771,9 +20806,9 @@ > (WebCore::ScrollingStateTree::setRootStateNode): > (ScrollingStateTree): > >- RenderLayerBacking has a new data member called m_scrollLayerID. If >- this RenderLayerBacking is represented in the scrolling tree, then >- the ID with be unique and non-zero. >+ RenderLayerBacking has a new data member called m_scrollLayerID. If >+ this RenderLayerBacking is represented in the scrolling tree, then >+ the ID with be unique and non-zero. > * rendering/RenderLayerBacking.cpp: > (WebCore::RenderLayerBacking::RenderLayerBacking): > (WebCore::RenderLayerBacking::~RenderLayerBacking): >@@ -20785,11 +20820,11 @@ > (RenderLayerBacking): > (WebCore::RenderLayerBacking::scrollLayerID): > >- Move the call to ScrollingCooridinator::frameViewRootLayerDidChange() >- from RenderLayerCompositor::attachRootLayer() to >- RenderLayerCompositor:: updateBacking(). The problem with the old call >- site is that there is no backing at that time, so we are trying to set >- state on the root scrolling state node before we have enough >+ Move the call to ScrollingCooridinator::frameViewRootLayerDidChange() >+ from RenderLayerCompositor::attachRootLayer() to >+ RenderLayerCompositor:: updateBacking(). The problem with the old call >+ site is that there is no backing at that time, so we are trying to set >+ state on the root scrolling state node before we have enough > information to create that node and add it to the HashMap. > * rendering/RenderLayerCompositor.cpp: > (WebCore::RenderLayerCompositor::updateBacking): >@@ -20808,7 +20843,7 @@ > They do basically the same thing, and the former is much more common (and less code). It's > also safe, on the off-chance that we're using AtomicStrings which might otherwise go away. > >- No new tests, refactoring. >+ No new tests, refactoring. > > * rendering/svg/SVGResources.cpp: > (WebCore::clipperFilterMaskerTags): >@@ -21122,7 +21157,7 @@ > * Resources/pagepopups/suggestionPicker.css: > (.suggestion-list): Don't show horizontal scroll bar. > * Resources/pagepopups/suggestionPicker.js: >- (SuggestionPicker.prototype._fixWindowSize): >+ (SuggestionPicker.prototype._fixWindowSize): > * page/PagePopupClient.cpp: > (WebCore::PagePopupClient::addProperty): For adding an int to JSON. > (WebCore::PagePopupClient::addProperty): For adding an IntRect to JSON. >@@ -22038,7 +22073,7 @@ > In a line such as '<span><span><img>Text' the border, padding and margin belonging > to the two spans was counted twice by RenderBlockLineLayout::nextLineBreak(): once > when adding the width of the <img> object to the line, and a second time when adding >- the 'Text'. The result was that nextLineBreak() now had a length for the line that >+ the 'Text'. The result was that nextLineBreak() now had a length for the line that > exceeded the line's maximum length and inserted a bogus line break. > > This all happened because the helper function that is used to add in the border etc. >@@ -22048,13 +22083,13 @@ > Test: fast/inline/bpm-inline-ancestors.html > > * rendering/RenderBlockLineLayout.cpp: >- (WebCore::shouldAddBorderPaddingMargin): Broke this check out into a helper function so that it >+ (WebCore::shouldAddBorderPaddingMargin): Broke this check out into a helper function so that it > can help inlineLogicalWidth() return early and also treat empty RenderTexts the same as no previous/next > sibling on the line. This ensures that collapsed leading space does not interfere with the decision to > crawl up the ancestors accumulating border, padding, and margin. > (WebCore): >- (WebCore::inlineLogicalWidth): Return early once the current child is no longer on the edge of its line - >- this ensures the border, padding and margin of ancestors is not counted twice. >+ (WebCore::inlineLogicalWidth): Return early once the current child is no longer on the edge of its line - >+ this ensures the border, padding and margin of ancestors is not counted twice. > > 2012-10-08 Mike West <mkwst@chromium.org> > >@@ -22225,7 +22260,7 @@ > use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop. > > According to the EFL API document, this function is designed to dispatch >- a function on ecore main loop by avoiding dead lock or race condition. >+ a function on ecore main loop by avoiding dead lock or race condition. > With this function, webkit doesn't need to maintain ecore pipe also. > > No new tests. The function to wakeup main loop is changed. >@@ -23254,7 +23289,7 @@ > > Change text-align use of legacy '-webkit-auto' to 'start' in the few places where it is used > in default/quirks stylesheets. >- >+ > No new tests. No change of rendering/styling behavior. No performance impact. > > * css/html.css: >@@ -23439,7 +23474,7 @@ > > * bindings/js/JSNodeCustom.cpp: > (WebCore::isObservable): Clarified this comment, since it seems to have >- misled some folks. >+ misled some folks. > > * bindings/js/JSNodeCustom.h: > (WebCore::willCreatePossiblyOrphanedTreeByRemoval): New helper function >@@ -23695,7 +23730,7 @@ > (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as > un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused. > (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks. >- (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from >+ (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from > setClosedCaptionsVisible > * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener. > >@@ -23717,10 +23752,10 @@ > > * html/track/TextTrackCue.cpp: > (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id. >- (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the >+ (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the > shadow pseudo id so it can be used elsewhere. > (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId. >- (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the >+ (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the > shadow pseudo id so it can be used elsewhere. > (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto. > (WebCore::TextTrackCue::updateDisplayTree): >@@ -23747,15 +23782,15 @@ > (WebCore::RenderThemeMac::userHasCaptionPreferences): New, passthrough to WKSI function. > (WebCore::RenderThemeMac::userPrefersCaptions): Ditto. > (WebCore::RenderThemeMac::captionsWindowColor): Return Color with user's caption window color preference. >- (WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption >+ (WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption > background color preference. > (WebCore::RenderThemeMac::captionsTextColor): Return Color with user's caption text color preference. > (WebCore::RenderThemeMac::captionsEdgeColorForTextColor): Return Color for text edge effect. > (WebCore::RenderThemeMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow > or webkit-text-stroke property. >- (WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property >+ (WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property > with a color value. >- (WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption >+ (WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption > text with the user's preferred text edge stye. > (WebCore::RenderThemeMac::captionsDefaultFont): Return a String with css to style caption > text with the user's preferred font. >@@ -23763,7 +23798,7 @@ > with the user's preferred style. > (WebCore::RenderThemeMac::captionFontSizeScale): Return the user's preferred caption font scale. > (WebCore::RenderThemeMac::captionPreferencesChanged): Notify listeners of caption preference change. >- (WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences >+ (WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences > changes listener. > (WebCore::RenderThemeMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences > changes listener. >@@ -23817,12 +23852,12 @@ > However, we will need non-opaque tile caches when we use this > tile cache for tiled layers, so add a member function to > control tile opacity. >- >+ > RenderLayerBacking already calls m_graphicsLayer->setContentsOpaque() > using the FrameView's notion of opaqueness, so this change will > cause the main tile cache to be non-opaque if external forces have > set the FrameView to be non-opaque. >- >+ > Also tweak the layer border widths on tiled layers. > > * platform/graphics/ca/mac/TileCache.h: >@@ -23917,14 +23952,14 @@ > > Allow EventHandler to handle longpress gestures, including longpress selection on Android. > https://bugs.webkit.org/show_bug.cgi?id=98173 >- >+ > Reviewed by Ryosuke Niwa. > > Adds handling for GestureLongPress to EventHandler::handleGestureEvent, with a new > handleGestureLongPress method. On Android, this method selects the closest word > if the gesture event was over non-link text. > >- This is tested via a new chromium test WebViewTest.LongPressSelection. >+ This is tested via a new chromium test WebViewTest.LongPressSelection. > > * page/EventHandler.cpp: > (WebCore::EventHandler::selectClosestWordFromHitTestResult): >@@ -24174,7 +24209,7 @@ > Reviewed by Adam Barth. > > Enforces a minimum row height for popup menus when a touch device is >- detected. In a previous patch (r127597), the sizing of popup was >+ detected. In a previous patch (r127597), the sizing of popup was > consolidated for touch and non-touch. Based on user feedback, reverting > to the old behavior for non-touch and only adding padding for touch > devices seems like a much safer strategy. This patch is not a direct >@@ -24806,7 +24841,7 @@ > Reviewed by Eric Seidel. > > This patch adds per-component overflow guards for CSS selector specificity. >- Previously, we didn't guard against overflow. >+ Previously, we didn't guard against overflow. > Since we stored each component as a byte mapped into a single unsigned int for the whole specificity, > 256 of a particular simple selector was equivalent to 1 of the next-higher-group selector. > This violated the Selectors specification, >@@ -25011,7 +25046,7 @@ > There is a concept of demotion for a <form> contained in a table. A <form> is demoted if its immediate parent > is either a <table>, table sections (tbody, etc) or a table row (tr). A renderer for such a <form> is created only > if its display is one of the table display types (TABLE, INLINE_TABLE, TABLE_FOOTER_GROUP, etc). >- However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and >+ However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and > results in the table getting improperly rendered. > > Test: fast/table/form-with-non-table-display-inside-table-elements.html >@@ -25021,7 +25056,7 @@ > Extended the virtual function for HTMLFormElement class specific implementation. > The function is used to copy any necessary state information(member variables) associated with > the <form> element being cloned to the current node. >- For HTMLFormElement node the member variable can be classified into five groups based on the >+ For HTMLFormElement node the member variable can be classified into five groups based on the > information they hold: > 1) Variables containing information regarding <form> subtree and elements associated with it. > These get updated as and when an element is added to the <form> subtree. >@@ -25190,7 +25225,7 @@ > (WebCore::ReplaceSelectionCommand::doApply): Update visibleStart after inserting a paragraph separator so that > the logic to cleanup the nested div checks the right condition (right beneath it starting with a long comment). > (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Insert a space for smart paste at the appropriate >- offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have >+ offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have > modified the DOM by inserting a space for endNode. Finally, a non-breaking space should be treated like a space > isCharacterSmartReplaceExempt for the purpose of smart replace. e.g. if we're inserting "world" after > "hello ", we shouldn't be inserting another space between "hello" and "world". >@@ -25872,17 +25907,17 @@ > 2012-10-03 Beth Dakin <bdakin@apple.com> > > https://bugs.webkit.org/show_bug.cgi?id=98313 >- ScrollingStateNode should keep a Vector of children instead of child >+ ScrollingStateNode should keep a Vector of children instead of child > pointers > > Reviewed by Simon Fraser. > >- This patch re-names ScrollingStateNode::cloneNode() to >- ScrollingStateNode::cloneAndResetNode(). The new function resets the >- change properties of the current node after cloning it, and it also >+ This patch re-names ScrollingStateNode::cloneNode() to >+ ScrollingStateNode::cloneAndResetNode(). The new function resets the >+ change properties of the current node after cloning it, and it also > takes care of cloning children, which the old function did not do. > >- m_firstChild and m_nextSibling are gone. Use the m_children Vector >+ m_firstChild and m_nextSibling are gone. Use the m_children Vector > instead. > * page/scrolling/ScrollingStateNode.cpp: > (WebCore::ScrollingStateNode::cloneAndResetChildNodes): >@@ -25897,7 +25932,7 @@ > (WebCore::ScrollingStateScrollingNode::cloneAndResetNode): > * page/scrolling/ScrollingStateScrollingNode.h: > >- Yay, this function can be vastly simplified now that we don't have >+ Yay, this function can be vastly simplified now that we don't have > those messy child and sibling pointers. > * page/scrolling/ScrollingStateTree.cpp: > (WebCore::ScrollingStateTree::commit): >@@ -26196,9 +26231,9 @@ > > This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only > allocators. We now have separate allocators for our three types of objects: those objects with no destructors, >- those objects with destructors and with immortal structures, and those objects with destructors that don't have >- immortal structures. All of the objects of the third type (destructors without immortal structures) now >- inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores >+ those objects with destructors and with immortal structures, and those objects with destructors that don't have >+ immortal structures. All of the objects of the third type (destructors without immortal structures) now >+ inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores > the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction. > > No new tests. >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 58885be442edfba1a506f57b0448cbcd13f9d437..5139bede959dc05c4b448470d5c512c1dc9dadf4 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,24 @@ >+2012-10-26 Dan Carney <dcarney@google.com> >+ >+ Remove ensureAuxiliaryContext >+ https://bugs.webkit.org/show_bug.cgi?id=99975 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Updated tests to use correct v8 context. >+ >+ * tests/IDBBindingUtilitiesTest.cpp: >+ (WebKit::checkKeyFromValueAndKeyPathInternal): >+ (WebKit::checkKeyPathNullValue): >+ (WebKit::injectKey): >+ (WebKit::checkInjection): >+ (WebKit::checkInjectionFails): >+ (WebKit::checkKeyPathStringValue): >+ (WebKit::checkKeyPathNumberValue): >+ (WebKit::scriptExecutionContext): >+ (WebKit): >+ (WebKit::TEST): >+ > 2012-10-26 Thiago Marcos P. Santos <thiago.santos@intel.com> > > Add feature flags for CSS Device Adaptation >diff --git a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >index a69d4c3f1ff8cffb039e78af61881d77c936dcad..f680476707de690d449e8428c2ed84b8351a06c6 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBCursor.cpp >@@ -145,7 +145,7 @@ PassRefPtr<IDBRequest> IDBCursor::update(ScriptExecutionContext* context, Script > const IDBKeyPath& keyPath = objectStore->metadata().keyPath; > const bool usesInLineKeys = !keyPath.isNull(); > if (usesInLineKeys) { >- RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(value, keyPath); >+ RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(context, value, keyPath); > if (!keyPathKey || !keyPathKey->isEqual(m_currentPrimaryKey.get())) { > ec = IDBDatabaseException::DATA_ERR; > return 0; >@@ -270,10 +270,10 @@ void IDBCursor::setValueReady(ScriptExecutionContext* context, PassRefPtr<IDBKey > const IDBObjectStoreMetadata metadata = objectStore->metadata(); > if (metadata.autoIncrement && !metadata.keyPath.isNull()) { > #ifndef NDEBUG >- RefPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPath(value, metadata.keyPath); >+ RefPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPath(context, value, metadata.keyPath); > ASSERT(!expectedKey || expectedKey->isEqual(m_currentPrimaryKey.get())); > #endif >- bool injected = injectIDBKeyIntoScriptValue(m_currentPrimaryKey, value, metadata.keyPath); >+ bool injected = injectIDBKeyIntoScriptValue(context, m_currentPrimaryKey, value, metadata.keyPath); > // FIXME: There is no way to report errors here. Move this into onSuccessWithContinuation so that we can abort the transaction there. See: https://bugs.webkit.org/show_bug.cgi?id=92278 > ASSERT_UNUSED(injected, injected); > } >diff --git a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >index fc6573a18a286ec0a625cf6a55df652e1ad7aba3..e46bb3704d52591ca5d532ec0817a63a5641cba4 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp >@@ -101,12 +101,10 @@ PassRefPtr<IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, Pass > return get(context, keyRange.release(), ec); > } > >-static void generateIndexKeysForValue(const IDBIndexMetadata& indexMetadata, >- const ScriptValue& objectValue, >- IDBObjectStore::IndexKeys* indexKeys) >+static void generateIndexKeysForValue(ScriptExecutionContext* context, const IDBIndexMetadata& indexMetadata, const ScriptValue& objectValue, IDBObjectStore::IndexKeys* indexKeys) > { > ASSERT(indexKeys); >- RefPtr<IDBKey> indexKey = createIDBKeyFromScriptValueAndKeyPath(objectValue, indexMetadata.keyPath); >+ RefPtr<IDBKey> indexKey = createIDBKeyFromScriptValueAndKeyPath(context, objectValue, indexMetadata.keyPath); > > if (!indexKey) > return; >@@ -181,7 +179,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBObjectStoreBackendInterface::PutMo > return 0; > } > if (usesInLineKeys) { >- RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(value, keyPath); >+ RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(context, value, keyPath); > if (keyPathKey && !keyPathKey->isValid()) { > ec = IDBDatabaseException::DATA_ERR; > return 0; >@@ -208,7 +206,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBObjectStoreBackendInterface::PutMo > Vector<IndexKeys> indexKeys; > for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it) { > IndexKeys keys; >- generateIndexKeysForValue(it->value, value, &keys); >+ generateIndexKeysForValue(context, it->value, value, &keys); > indexNames.append(it->key); > indexKeys.append(keys); > } >@@ -285,9 +283,9 @@ namespace { > // cursor success handlers are kept alive. > class IndexPopulator : public EventListener { > public: >- static PassRefPtr<IndexPopulator> create(PassRefPtr<IDBObjectStoreBackendInterface> backend, PassRefPtr<IDBTransactionBackendInterface> transaction, PassRefPtr<IDBRequest> request, const IDBIndexMetadata& indexMetadata) >+ static PassRefPtr<IndexPopulator> create(PassRefPtr<IDBObjectStoreBackendInterface> backend, PassRefPtr<IDBTransactionBackendInterface> transaction, PassRefPtr<IDBRequest> request, const IDBIndexMetadata& indexMetadata, ScriptExecutionContext* context) > { >- return adoptRef(new IndexPopulator(backend, transaction, indexMetadata)); >+ return adoptRef(new IndexPopulator(backend, transaction, indexMetadata, context)); > } > > virtual bool operator==(const EventListener& other) >@@ -297,18 +295,21 @@ public: > > private: > IndexPopulator(PassRefPtr<IDBObjectStoreBackendInterface> backend, >- PassRefPtr<IDBTransactionBackendInterface> transaction, >- const IDBIndexMetadata& indexMetadata) >+ PassRefPtr<IDBTransactionBackendInterface> transaction, >+ const IDBIndexMetadata& indexMetadata, >+ ScriptExecutionContext* context) > : EventListener(CPPEventListenerType) > , m_objectStoreBackend(backend) > , m_transaction(transaction) > , m_indexMetadata(indexMetadata) >+ , m_context(context) > { > } > > virtual void handleEvent(ScriptExecutionContext* context, Event* event) > { > ASSERT(event->type() == eventNames().successEvent); >+ ASSERT(context == m_context); > EventTarget* target = event->target(); > IDBRequest* request = static_cast<IDBRequest*>(target); > >@@ -329,7 +330,7 @@ private: > ScriptValue value = cursor->value(); > > IDBObjectStore::IndexKeys indexKeys; >- generateIndexKeysForValue(m_indexMetadata, value, &indexKeys); >+ generateIndexKeysForValue(0, m_indexMetadata, value, &indexKeys); > > Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; > indexKeysList.append(indexKeys); >@@ -349,6 +350,7 @@ private: > RefPtr<IDBObjectStoreBackendInterface> m_objectStoreBackend; > RefPtr<IDBTransactionBackendInterface> m_transaction; > IDBIndexMetadata m_indexMetadata; >+ ScriptExecutionContext* m_context; > }; > } > >@@ -422,7 +424,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context > indexRequest->preventPropagation(); > > // This is kept alive by being the success handler of the request, which is in turn kept alive by the owning transaction. >- RefPtr<IndexPopulator> indexPopulator = IndexPopulator::create(m_backend, m_transaction->backend(), indexRequest, metadata); >+ RefPtr<IndexPopulator> indexPopulator = IndexPopulator::create(m_backend, m_transaction->backend(), indexRequest, metadata, context); > indexRequest->setOnsuccess(indexPopulator); > > return index.release(); >diff --git a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >index 1860bfc59e3ca3842f7565ade1064ce1bf83c3a8..3f1df728f07cd98d1d4820f1c806adafa28e21bf 100644 >--- a/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >+++ b/Source/WebCore/Modules/indexeddb/IDBRequest.cpp >@@ -370,10 +370,10 @@ void IDBRequest::onSuccess(PassRefPtr<SerializedScriptValue> prpSerializedScript > > RefPtr<IDBKey> primaryKey = prpPrimaryKey; > #ifndef NDEBUG >- RefPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPath(value, keyPath); >+ RefPtr<IDBKey> expectedKey = createIDBKeyFromScriptValueAndKeyPath(scriptExecutionContext(), value, keyPath); > ASSERT(!expectedKey || expectedKey->isEqual(primaryKey.get())); > #endif >- bool injected = injectIDBKeyIntoScriptValue(primaryKey, value, keyPath); >+ bool injected = injectIDBKeyIntoScriptValue(scriptExecutionContext(), primaryKey, value, keyPath); > ASSERT_UNUSED(injected, injected); > onSuccessInternal(value); > } >diff --git a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp >index 5becb6a6681fdf32203c761a5b03af4d7ff2841e..c5e56a7f4c75bce1d32ef31cf5836281ae5effde 100644 >--- a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp >+++ b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp >@@ -28,6 +28,7 @@ > > #if ENABLE(INDEXED_DATABASE) > >+#include "Frame.h" > #include "IDBDatabaseException.h" > #include "IDBKey.h" > #include "IDBKeyPath.h" >@@ -35,6 +36,8 @@ > #include "SerializedScriptValue.h" > #include "V8Binding.h" > #include "V8IDBKey.h" >+#include "WorkerContext.h" >+#include "WorkerContextExecutionProxy.h" > #include "WorldContextHandle.h" > #include <wtf/MathExtras.h> > #include <wtf/Vector.h> >@@ -43,6 +46,28 @@ namespace WebCore { > > static const size_t maximumDepth = 2000; > >+v8::Handle<v8::Context> getIDBV8Context(ScriptExecutionContext* context) >+{ >+ if (context) { >+ if (context->isDocument()) { >+ if (Frame* frame = static_cast<Document*>(context)->frame()) { >+ if (V8DOMWindowShell* isolatedContext = V8DOMWindowShell::getEntered()) >+ return v8::Local<v8::Context>::New(isolatedContext->context()); >+ return frame->script()->mainWorldContext(); >+ } >+ ASSERT_NOT_REACHED(); >+#if ENABLE(WORKERS) >+ } else if (context->isWorkerContext()) { >+ if (WorkerContextExecutionProxy* proxy = static_cast<WorkerContext*>(context)->script()->proxy()) >+ return proxy->context(); >+ ASSERT_NOT_REACHED(); >+#endif >+ } >+ ASSERT_NOT_REACHED(); >+ } >+ return V8PerIsolateData::current()->ensureAuxiliaryContext(); >+} >+ > static PassRefPtr<IDBKey> createIDBKeyFromValue(v8::Handle<v8::Value> value, Vector<v8::Handle<v8::Array> >& stack) > { > if (value->IsNumber() && !isnan(value->NumberValue())) >@@ -180,9 +205,6 @@ static PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(const ScriptValu > IDBParseKeyPath(keyPath, keyPathElements, error); > ASSERT(error == IDBKeyPathParseErrorNone); > >- v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >- > v8::Handle<v8::Value> v8Value(value.v8Value()); > v8::Handle<v8::Value> v8Key(getNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size())); > if (v8Key.IsEmpty()) >@@ -190,12 +212,13 @@ static PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(const ScriptValu > return createIDBKeyFromValue(v8Key); > } > >-PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(const ScriptValue& value, const IDBKeyPath& keyPath) >+PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(ScriptExecutionContext* scriptContext, const ScriptValue& value, const IDBKeyPath& keyPath) > { > IDB_TRACE("createIDBKeyFromScriptValueAndKeyPath"); > ASSERT(!keyPath.isNull()); > >- v8::HandleScope scope; >+ v8::HandleScope handleScope; >+ v8::Context::Scope scope(getIDBV8Context(scriptContext)); > if (keyPath.type() == IDBKeyPath::ArrayType) { > IDBKey::KeyArray result; > const Vector<String>& array = keyPath.array(); >@@ -212,18 +235,17 @@ PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(const ScriptValue& valu > return createIDBKeyFromScriptValueAndKeyPath(value, keyPath.string()); > } > >-// FIXME: The only reason this exists is because we need a v8::Context and scope inside a timer. Is there a better / more general way to do this? > ScriptValue deserializeIDBValue(ScriptExecutionContext* scriptContext, PassRefPtr<SerializedScriptValue> prpValue) > { > v8::HandleScope handleScope; >- v8::Context::Scope contextScope(toV8Context(scriptContext, UseCurrentWorld)); >+ v8::Context::Scope contextScope(getIDBV8Context(scriptContext)); > RefPtr<SerializedScriptValue> serializedValue = prpValue; > if (serializedValue) > return ScriptValue(serializedValue->deserialize()); > return ScriptValue(v8::Null()); > } > >-bool injectIDBKeyIntoScriptValue(PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath) >+bool injectIDBKeyIntoScriptValue(ScriptExecutionContext* scriptContext, PassRefPtr<IDBKey> key, ScriptValue& value, const IDBKeyPath& keyPath) > { > IDB_TRACE("injectIDBKeyIntoScriptValue"); > >@@ -237,7 +259,7 @@ bool injectIDBKeyIntoScriptValue(PassRefPtr<IDBKey> key, ScriptValue& value, con > return 0; > > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(getIDBV8Context(scriptContext)); > > v8::Handle<v8::Value> v8Value(value.v8Value()); > v8::Handle<v8::Value> parent(ensureNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size() - 1)); >@@ -269,7 +291,7 @@ bool canInjectIDBKeyIntoScriptValue(const ScriptValue& scriptValue, const IDBKey > ScriptValue idbKeyToScriptValue(ScriptExecutionContext* scriptContext, PassRefPtr<IDBKey> key) > { > v8::HandleScope handleScope; >- v8::Context::Scope contextScope(toV8Context(scriptContext, UseCurrentWorld)); >+ v8::Context::Scope contextScope(getIDBV8Context(scriptContext)); > > v8::Handle<v8::Value> v8Value(toV8(key.get())); > return ScriptValue(v8Value); >diff --git a/Source/WebCore/bindings/v8/IDBBindingUtilities.h b/Source/WebCore/bindings/v8/IDBBindingUtilities.h >index f766056df66d2d708ce2bbc2c9fe6a6cf14e5bba..162f3ea9ac6c398ecab078e70d2d321c397ad478 100644 >--- a/Source/WebCore/bindings/v8/IDBBindingUtilities.h >+++ b/Source/WebCore/bindings/v8/IDBBindingUtilities.h >@@ -40,8 +40,8 @@ class SerializedScriptValue; > > PassRefPtr<IDBKey> createIDBKeyFromValue(v8::Handle<v8::Value>); > >-bool injectIDBKeyIntoScriptValue(PassRefPtr<IDBKey>, ScriptValue&, const IDBKeyPath&); >-PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(const ScriptValue&, const IDBKeyPath&); >+bool injectIDBKeyIntoScriptValue(ScriptExecutionContext*, PassRefPtr<IDBKey>, ScriptValue&, const IDBKeyPath&); >+PassRefPtr<IDBKey> createIDBKeyFromScriptValueAndKeyPath(ScriptExecutionContext*, const ScriptValue&, const IDBKeyPath&); > bool canInjectIDBKeyIntoScriptValue(const ScriptValue&, const IDBKeyPath&); > ScriptValue deserializeIDBValue(ScriptExecutionContext*, PassRefPtr<SerializedScriptValue>); > ScriptValue idbKeyToScriptValue(ScriptExecutionContext*, PassRefPtr<IDBKey>); >diff --git a/Source/WebCore/bindings/v8/V8Binding.cpp b/Source/WebCore/bindings/v8/V8Binding.cpp >index 7c35d45b448850c0ce6cef7d2881ceb341efead1..e777c7903b4d678f75972c795911a81990c00284 100644 >--- a/Source/WebCore/bindings/v8/V8Binding.cpp >+++ b/Source/WebCore/bindings/v8/V8Binding.cpp >@@ -318,6 +318,27 @@ v8::Local<v8::Context> toV8Context(ScriptExecutionContext* context, const WorldC > return v8::Local<v8::Context>(); > } > >+v8::Local<v8::Context> toV8Context(ScriptExecutionContext* context, WorldToUse worldToUse) >+{ >+ if (context->isDocument()) { >+ ASSERT(worldToUse != UseWorkerWorld); >+ if (Frame* frame = static_cast<Document*>(context)->frame()) { >+ if (worldToUse == UseCurrentWorld) { >+ if (V8DOMWindowShell* isolatedContext = V8DOMWindowShell::getEntered()) >+ return v8::Local<v8::Context>::New(isolatedContext->context()); >+ } >+ return frame->script()->mainWorldContext(); >+ } >+#if ENABLE(WORKERS) >+ } else if (context->isWorkerContext()) { >+ ASSERT(worldToUse != UseMainWorld); >+ if (WorkerContextExecutionProxy* proxy = static_cast<WorkerContext*>(context)->script()->proxy()) >+ return proxy->context(); >+#endif >+ } >+ return v8::Local<v8::Context>(); >+} >+ > V8PerContextData* perContextDataForCurrentWorld(Frame* frame) > { > V8DOMWindowShell* isolatedShell; >diff --git a/Source/WebCore/bindings/v8/V8Binding.h b/Source/WebCore/bindings/v8/V8Binding.h >index 19ba8bf2d8aa699713b2e807e2e6be4cb2e245d8..65fcc5c2e0e2113e151254736487fcbf1d340ca8 100644 >--- a/Source/WebCore/bindings/v8/V8Binding.h >+++ b/Source/WebCore/bindings/v8/V8Binding.h >@@ -43,6 +43,7 @@ > #include "V8StringResource.h" > #include "V8ThrowException.h" > #include "V8ValueCache.h" >+#include "WorldContextHandle.h" > #include <wtf/Noncopyable.h> > #include <wtf/text/AtomicString.h> > #include <v8.h> >@@ -51,7 +52,6 @@ namespace WebCore { > > class DOMStringList; > class ScriptExecutionContext; >- class WorldContextHandle; > > const int kMaxRecursionDepth = 22; > >@@ -374,6 +374,7 @@ namespace WebCore { > > // Returns the context associated with a ScriptExecutionContext. > v8::Local<v8::Context> toV8Context(ScriptExecutionContext*, const WorldContextHandle&); >+ v8::Local<v8::Context> toV8Context(ScriptExecutionContext*, WorldToUse); > > // Returns the frame object of the window object associated with > // a context, if the window is currently being displayed in the Frame. >diff --git a/Source/WebCore/bindings/v8/WorldContextHandle.h b/Source/WebCore/bindings/v8/WorldContextHandle.h >index 7565d15cd32325aaeaf131847f501777c356595b..8dd6b3ad7727943a3717990d77a073750d3dc55f 100644 >--- a/Source/WebCore/bindings/v8/WorldContextHandle.h >+++ b/Source/WebCore/bindings/v8/WorldContextHandle.h >@@ -44,7 +44,7 @@ enum WorldToUse { UseMainWorld, UseCurrentWorld, UseWorkerWorld }; > > class WorldContextHandle { > public: >- WorldContextHandle(WorldToUse); >+ explicit WorldContextHandle(WorldToUse); > v8::Local<v8::Context> adjustedContext(ScriptController*) const; > > private: >diff --git a/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp b/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp >index 46710e74568a74fac5fe5f50793ac2c9a9c2fb0f..23f540e270400d5bf7bcadf0d376f51114508ab3 100644 >--- a/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp >+++ b/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp >@@ -24,11 +24,18 @@ > */ > > #include "config.h" >+#include "Document.h" >+#include "Frame.h" >+#include "FrameTestHelpers.h" > #include "IDBBindingUtilities.h" > #include "IDBKey.h" > #include "IDBKeyPath.h" >+#include "V8Binding.h" > #include "V8PerIsolateData.h" > #include "V8Utilities.h" >+#include "WebFrame.h" >+#include "WebFrameImpl.h" >+#include "WebView.h" > > #include <gtest/gtest.h> > #include <wtf/Vector.h> >@@ -36,92 +43,106 @@ > #if ENABLE(INDEXED_DATABASE) > > using namespace WebCore; >+using namespace WebKit; > > namespace { > >-PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(const ScriptValue& value, const String& keyPath) >+PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(ScriptExecutionContext* context, const ScriptValue& value, const String& keyPath) > { > IDBKeyPath idbKeyPath(keyPath); > EXPECT_TRUE(idbKeyPath.isValid()); > >- return createIDBKeyFromScriptValueAndKeyPath(value, idbKeyPath); >+ return createIDBKeyFromScriptValueAndKeyPath(context, value, idbKeyPath); > } > >-void checkKeyPathNullValue(const ScriptValue& value, const String& keyPath) >+void checkKeyPathNullValue(ScriptExecutionContext* context, const ScriptValue& value, const String& keyPath) > { >- RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); >+ RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(context, value, keyPath); > ASSERT_FALSE(idbKey.get()); > } > >-bool injectKey(PassRefPtr<IDBKey> key, ScriptValue& value, const String& keyPath) >+bool injectKey(ScriptExecutionContext* context, PassRefPtr<IDBKey> key, ScriptValue& value, const String& keyPath) > { > IDBKeyPath idbKeyPath(keyPath); > EXPECT_TRUE(idbKeyPath.isValid()); >- return injectIDBKeyIntoScriptValue(key, value, idbKeyPath); >+ return injectIDBKeyIntoScriptValue(context, key, value, idbKeyPath); > } > >-void checkInjection(PassRefPtr<IDBKey> prpKey, ScriptValue& value, const String& keyPath) >+void checkInjection(ScriptExecutionContext* context, PassRefPtr<IDBKey> prpKey, ScriptValue& value, const String& keyPath) > { > RefPtr<IDBKey> key = prpKey; >- bool result = injectKey(key, value, keyPath); >+ bool result = injectKey(context, key, value, keyPath); > ASSERT_TRUE(result); >- RefPtr<IDBKey> extractedKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); >+ RefPtr<IDBKey> extractedKey = checkKeyFromValueAndKeyPathInternal(context, value, keyPath); > EXPECT_TRUE(key->isEqual(extractedKey.get())); > } > >-void checkInjectionFails(PassRefPtr<IDBKey> key, ScriptValue& value, const String& keyPath) >+void checkInjectionFails(ScriptExecutionContext* context, PassRefPtr<IDBKey> key, ScriptValue& value, const String& keyPath) > { >- EXPECT_FALSE(injectKey(key, value, keyPath)); >+ EXPECT_FALSE(injectKey(context, key, value, keyPath)); > } > >-void checkKeyPathStringValue(const ScriptValue& value, const String& keyPath, const String& expected) >+void checkKeyPathStringValue(ScriptExecutionContext* context, const ScriptValue& value, const String& keyPath, const String& expected) > { >- RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); >+ RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(context, value, keyPath); > ASSERT_TRUE(idbKey.get()); > ASSERT_EQ(IDBKey::StringType, idbKey->type()); > ASSERT_TRUE(expected == idbKey->string()); > } > >-void checkKeyPathNumberValue(const ScriptValue& value, const String& keyPath, int expected) >+void checkKeyPathNumberValue(ScriptExecutionContext* context, const ScriptValue& value, const String& keyPath, int expected) > { >- RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); >+ RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(context, value, keyPath); > ASSERT_TRUE(idbKey.get()); > ASSERT_EQ(IDBKey::NumberType, idbKey->type()); > ASSERT_TRUE(expected == idbKey->number()); > } > >+static ScriptExecutionContext* scriptExecutionContext() >+{ >+ static WebView* webView; >+ if (!webView) { >+ webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); >+ webView->setFocus(true); >+ } >+ return static_cast<WebFrameImpl*>(webView->mainFrame())->frame()->document(); >+} >+ > TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue) > { >+ ScriptExecutionContext* context = scriptExecutionContext(); > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(toV8Context(context, UseCurrentWorld)); > > v8::Local<v8::Object> object = v8::Object::New(); > object->Set(v8::String::New("foo"), v8::String::New("zoo")); > > ScriptValue scriptValue(object); > >- checkKeyPathStringValue(scriptValue, "foo", "zoo"); >- checkKeyPathNullValue(scriptValue, "bar"); >+ checkKeyPathStringValue(context, scriptValue, "foo", "zoo"); >+ checkKeyPathNullValue(context, scriptValue, "bar"); > } > > TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue) > { >+ ScriptExecutionContext* context = scriptExecutionContext(); > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(toV8Context(context, UseCurrentWorld)); > > v8::Local<v8::Object> object = v8::Object::New(); > object->Set(v8::String::New("foo"), v8::Number::New(456)); > > ScriptValue scriptValue(object); > >- checkKeyPathNumberValue(scriptValue, "foo", 456); >- checkKeyPathNullValue(scriptValue, "bar"); >+ checkKeyPathNumberValue(context, scriptValue, "foo", 456); >+ checkKeyPathNullValue(context, scriptValue, "bar"); > } > > TEST(IDBKeyFromValueAndKeyPathTest, SubProperty) > { >+ ScriptExecutionContext* context = scriptExecutionContext(); > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(toV8Context(context, UseCurrentWorld)); > > v8::Local<v8::Object> object = v8::Object::New(); > v8::Local<v8::Object> subProperty = v8::Object::New(); >@@ -130,29 +151,31 @@ TEST(IDBKeyFromValueAndKeyPathTest, SubProperty) > > ScriptValue scriptValue(object); > >- checkKeyPathStringValue(scriptValue, "foo.bar", "zee"); >- checkKeyPathNullValue(scriptValue, "bar"); >+ checkKeyPathStringValue(context, scriptValue, "foo.bar", "zee"); >+ checkKeyPathNullValue(context, scriptValue, "bar"); > } > > TEST(InjectIDBKeyTest, TopLevelPropertyStringValue) > { >+ ScriptExecutionContext* context = scriptExecutionContext(); > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(toV8Context(context, UseCurrentWorld)); > > v8::Local<v8::Object> object = v8::Object::New(); > object->Set(v8::String::New("foo"), v8::String::New("zoo")); > > ScriptValue foozoo(object); >- checkInjection(IDBKey::createString("myNewKey"), foozoo, "bar"); >- checkInjection(IDBKey::createNumber(1234), foozoo, "bar"); >+ checkInjection(context, IDBKey::createString("myNewKey"), foozoo, "bar"); >+ checkInjection(context, IDBKey::createNumber(1234), foozoo, "bar"); > >- checkInjectionFails(IDBKey::createString("key"), foozoo, "foo.bar"); >+ checkInjectionFails(context, IDBKey::createString("key"), foozoo, "foo.bar"); > } > > TEST(InjectIDBKeyTest, SubProperty) > { >+ ScriptExecutionContext* context = scriptExecutionContext(); > v8::HandleScope handleScope; >- v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext()); >+ v8::Context::Scope scope(toV8Context(context, UseCurrentWorld)); > > v8::Local<v8::Object> object = v8::Object::New(); > v8::Local<v8::Object> subProperty = v8::Object::New(); >@@ -160,15 +183,15 @@ TEST(InjectIDBKeyTest, SubProperty) > object->Set(v8::String::New("foo"), subProperty); > > ScriptValue scriptObject(object); >- checkInjection(IDBKey::createString("myNewKey"), scriptObject, "foo.baz"); >- checkInjection(IDBKey::createNumber(789), scriptObject, "foo.baz"); >- checkInjection(IDBKey::createDate(4567), scriptObject, "foo.baz"); >- checkInjection(IDBKey::createDate(4567), scriptObject, "bar"); >- checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "foo.baz"); >- checkInjection(IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "bar"); >- >- checkInjectionFails(IDBKey::createString("zoo"), scriptObject, "foo.bar.baz"); >- checkInjection(IDBKey::createString("zoo"), scriptObject, "foo.xyz.foo"); >+ checkInjection(context, IDBKey::createString("myNewKey"), scriptObject, "foo.baz"); >+ checkInjection(context, IDBKey::createNumber(789), scriptObject, "foo.baz"); >+ checkInjection(context, IDBKey::createDate(4567), scriptObject, "foo.baz"); >+ checkInjection(context, IDBKey::createDate(4567), scriptObject, "bar"); >+ checkInjection(context, IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "foo.baz"); >+ checkInjection(context, IDBKey::createArray(IDBKey::KeyArray()), scriptObject, "bar"); >+ >+ checkInjectionFails(context, IDBKey::createString("zoo"), scriptObject, "foo.bar.baz"); >+ checkInjection(context, IDBKey::createString("zoo"), scriptObject, "foo.xyz.foo"); > } > > } // namespace
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 99975
:
169867
|
170081
| 171035 |
171192
|
171437