41110921a8c0a0486f599986fca2390f3a9a443a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-13  Eric Penner  <epenner@google.com>
2
3         [chromium] Add 'self-managed' option to CCPrioritizedTexture to enable render-surface and canvas use cases.
4         https://bugs.webkit.org/show_bug.cgi?id=91177
5
6         Reviewed by Adrienne Walker.
7
8         This makes the render-surface memory use case generic as 'self-managed' textures,
9         as this use case is popping up in other places (eg. canvases). It's exactly the
10         same idea except we can have as many place-holders as we want at arbitrary
11         priorities.
12
13         This already tested by the render surface unit tests which now also use the 
14         generic placeholder.
15
16         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
17         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
18         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
19         (WebCore::CCLayerTreeHost::updateLayers):
20         (WebCore::CCLayerTreeHost::setPrioritiesForSurfaces):
21         (WebCore):
22         (WebCore::CCLayerTreeHost::setPrioritiesForLayers):
23         (WebCore::CCLayerTreeHost::prioritizeTextures):
24         (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
25         (WebCore::CCLayerTreeHost::paintLayerContents):
26         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
27         (CCLayerTreeHost):
28         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
29         (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
30         (WebCore::CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder):
31         * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
32         (CCPrioritizedTexture):
33         (WebCore::CCPrioritizedTexture::setIsSelfManaged):
34         (WebCore::CCPrioritizedTexture::isSelfManaged):
35         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
36         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
37         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
38         (WebCore::CCPrioritizedTextureManager::destroyBacking):
39         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
40         (CCPrioritizedTextureManager):
41         (WebCore::CCPrioritizedTextureManager::memoryForSelfManagedTextures):
42
43 2012-07-13  Kent Tamura  <tkent@chromium.org>
44
45         Internals: Clean up the mock PagePopupDriver correctly.
46         https://bugs.webkit.org/show_bug.cgi?id=91250
47
48         Unreviewed, a trivial testing code fix.
49
50         * testing/InternalSettings.cpp:
51         (WebCore::InternalSettings::Backup::restoreTo):
52         (WebCore::InternalSettings::reset):
53         Resetting PaePopupDriver here instead of Backup::restoreTo.
54         Also, close the mock popup before resetting PagePopupDriver by clearing m_pagePopupDriver.
55         * testing/MockPagePopupDriver.cpp:
56         (WebCore::MockPagePopupDriver::~MockPagePopupDriver):
57         Close the popup.
58
59 2012-07-13  Tony Payne  <tpayne@chromium.org>
60
61         Remove Widget from screenColorProfile
62         https://bugs.webkit.org/show_bug.cgi?id=91300
63
64         Reviewed by Adam Barth.
65
66         Chromium, the only platform implementing screenColorProfile, does not
67         need the Widget, so removing for simplicity.
68
69         Covered by existing tests.
70
71         * platform/PlatformScreen.h:
72         (WebCore): Updated comment to remove reference to type param that no
73         longer exists and removed Widget param.
74         * platform/blackberry/PlatformScreenBlackBerry.cpp:
75         (WebCore::screenColorProfile): Removed widget param.
76         * platform/chromium/PlatformScreenChromium.cpp:
77         (WebCore::screenColorProfile): Removed widget param.
78         * platform/efl/PlatformScreenEfl.cpp:
79         (WebCore::screenColorProfile): Removed widget param.
80         * platform/gtk/PlatformScreenGtk.cpp:
81         (WebCore::screenColorProfile): Removed widget param.
82         * platform/image-decoders/ImageDecoder.h:
83         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
84         match screenColorProfile()'s new spec.
85         * platform/mac/PlatformScreenMac.mm:
86         (WebCore::screenColorProfile): Removed widget param.
87         * platform/qt/PlatformScreenQt.cpp:
88         (WebCore::screenColorProfile): Removed widget param.
89         * platform/win/PlatformScreenWin.cpp:
90         (WebCore::screenColorProfile): Removed widget param.
91
92 2012-07-13  Brian Anderson  <brianderson@chromium.org>
93
94         [chromium] Add flushes to CCTextureUpdater::update
95         https://bugs.webkit.org/show_bug.cgi?id=89035
96
97         Reviewed by Adrienne Walker.
98
99         Automatic flushes are being removed from the command buffer, so
100         this moves the flushes into the CCTextureUpdater itself.
101
102         CCTextureUpdaterTest added to verify texture upload/flushing patterns.
103
104         * platform/graphics/chromium/cc/CCGraphicsContext.h:
105         (WebCore::CCGraphicsContext::flush):
106         (CCGraphicsContext):
107         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
108         (WebCore):
109         (WebCore::CCTextureUpdater::update): Manual flushes added here.
110
111 2012-07-13  Kiran Muppala  <cmuppala@apple.com>
112
113         REGRESSION: RenderInline boundingBox ignores relative position offset
114         https://bugs.webkit.org/show_bug.cgi?id=91168
115
116         Reviewed by Simon Fraser.
117
118         RenderGeometryMap, used for caching the transform to the view,
119         expects the first mapping pushed, to be that of the view itself.
120         RenderInline was instead pushing it's own offset first.  Besides
121         the offset of the view itself was not being pushed.
122
123         Relaxed the RenderGeometryMap restriction that the first pushed
124         step should be of the view.  It is sufficient that the view's mapping
125         is pushed in the first call to pushMappingsToAncestor.  Modified
126         RenderInline to push the offset of the view also to the geometry map.
127
128         Test: fast/inline/inline-relative-offset-boundingbox.html
129
130         * rendering/RenderGeometryMap.cpp:
131         (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to
132         check if mapping to view was pushed in first invocation.
133         (WebCore::RenderGeometryMap::pushView): Correct assertion that checks
134         if the view's mapping is the first one to be applied.
135         (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if
136         a mapping step belongs to a view instead of using mapping size.
137         (WebCore::RenderGeometryMap::stepRemoved): Ditto.
138         * rendering/RenderInline.cpp:
139         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
140         Push mappings all the way up to and including the view.
141
142 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
143
144         Move WebCore/platform/text/Base64 to WTF/wtf/text
145         https://bugs.webkit.org/show_bug.cgi?id=91162
146
147         Reviewed by Adam Barth.
148
149         No new tests. Files moving only.
150
151         * CMakeLists.txt:
152         * GNUmakefile.list.am:
153         * Modules/websockets/WebSocketHandshake.cpp:
154         (WebCore::generateSecWebSocketKey):
155         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
156         * Target.pri:
157         * WebCore.gypi:
158         * WebCore.order:
159         * WebCore.vcproj/WebCore.vcproj:
160         * WebCore.xcodeproj/project.pbxproj:
161         * fileapi/FileReaderLoader.cpp:
162         (WebCore::FileReaderLoader::convertToDataURL):
163         * inspector/DOMPatchSupport.cpp:
164         (WebCore::DOMPatchSupport::createDigest):
165         * inspector/InspectorFileSystemAgent.cpp:
166         (WebCore):
167         * inspector/InspectorPageAgent.cpp:
168         (WebCore::InspectorPageAgent::cachedResourceContent):
169         (WebCore::InspectorPageAgent::sharedBufferContent):
170         * loader/archive/mhtml/MHTMLArchive.cpp:
171         (WebCore::MHTMLArchive::generateMHTMLData):
172         * loader/archive/mhtml/MHTMLParser.cpp:
173         (WebCore::MHTMLParser::parseNextPart):
174         * page/DOMWindow.cpp:
175         (WebCore::DOMWindow::btoa):
176         (WebCore::DOMWindow::atob):
177         * page/Page.cpp:
178         (WebCore::Page::userStyleSheetLocationChanged):
179         * platform/graphics/cairo/ImageBufferCairo.cpp:
180         (WebCore::ImageBuffer::toDataURL):
181         * platform/graphics/cg/ImageBufferCG.cpp:
182         (WebCore::CGImageToDataURL):
183         * platform/graphics/gtk/ImageBufferGtk.cpp:
184         (WebCore::ImageBuffer::toDataURL):
185         * platform/graphics/skia/FontCustomPlatformData.cpp:
186         (WebCore::createUniqueFontName):
187         * platform/graphics/skia/ImageBufferSkia.cpp:
188         (WebCore::ImageBuffer::toDataURL):
189         (WebCore::ImageDataToDataURL):
190         * platform/graphics/win/FontCustomPlatformData.cpp:
191         (WebCore::createUniqueFontName):
192         * platform/graphics/wince/FontCustomPlatformData.cpp:
193         (WebCore::createUniqueFontName):
194         * platform/graphics/wince/ImageBufferWinCE.cpp:
195         * platform/graphics/wx/ImageBufferWx.cpp:
196         * platform/network/DataURL.cpp:
197         (WebCore::handleDataURL):
198         * platform/network/cf/ResourceHandleCFNet.cpp:
199         (WebCore::applyBasicAuthorizationHeader):
200         * platform/network/mac/ResourceHandleMac.mm:
201         (WebCore::applyBasicAuthorizationHeader):
202         * platform/network/soup/ResourceHandleSoup.cpp:
203         * platform/win/SSLKeyGeneratorWin.cpp:
204         (WebCore::WebCore::signedPublicKeyAndChallengeString):
205
206 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
207
208         [Chromium] Sometimes bottom of text is truncated when page has a fractional scale
209         https://bugs.webkit.org/show_bug.cgi?id=88684
210
211         Reviewed by Tony Chang.
212
213         When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
214         If the descent part is rounded down, the bottom of the text might be truncated when displayed
215         when subpixel text positioning is enabled.
216         To avoid that, borrow one unit from the ascent when possible.
217
218         Test: fast/text/descent-clip-in-scaled-page.html
219
220         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
221         (WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
222         (WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
223         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
224         (FontPlatformData):
225         (WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
226         * platform/graphics/skia/SimpleFontDataSkia.cpp:
227         (WebCore::SimpleFontData::platformInit):
228
229 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
230
231         Remove an assertion after r122637.
232
233         * dom/DynamicNodeList.h:
234         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
235
236 2012-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
237
238         [Qt] Improve the mobile theme slightly
239         https://bugs.webkit.org/show_bug.cgi?id=90806
240
241         Reviewed by Kenneth Rohde Christiansen.
242
243         Improve drawing of the mobile theme's controls' background.
244
245         Ensure the focus ring never appears with the mobile theme, since it
246         looks bad in combination with the highlights.
247
248         No new tests. The painting code from the mobile theme is still
249         not covered specifically (it will when we revive pixel tests).
250
251         * platform/qt/RenderThemeQtMobile.cpp:
252         (WebCore):
253         (WebCore::addPointToOctants): Added. This is simply a helper to avoid
254             doing too much duplicate work in drawControlBackground.
255         (WebCore::drawControlBackground): Rely on the octant logic added above
256             and take the opportunity to increase the granularity.
257         (WebCore::borderPen):
258         (WebCore::StylePainterMobile::findLineEdit):
259         (WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
260         * platform/qt/RenderThemeQtMobile.h:
261         (RenderThemeQtMobile):
262         (WebCore::RenderThemeQtMobile::supportsFocusRing):
263
264 2012-07-13  Julien Chaffraix  <jchaffraix@webkit.org>
265
266         Remove an always-failing table-wrapping check in RenderObject::addChild
267         https://bugs.webkit.org/show_bug.cgi?id=91286
268
269         Reviewed by Eric Seidel.
270
271         Due to the structure of the code, this test is always failing (newChild->isTableCell()
272         is true to get in the branch).
273
274         The changeset adding the code didn't add testing so I poundered adding the mentioned test,
275         which is passing. However the test would need to be blindly changed to be included in our
276         test harness. I would also expect this code to be exercised by other table tests anyway.
277
278         * rendering/RenderObject.cpp:
279         (WebCore::RenderObject::addChild):
280         Removed never-reached branch. While at it, removed a 'what' comment in the same file.
281
282 2012-07-13  Emil A Eklund  <eae@chromium.org>
283
284         Use LayoutBoxExtent for image outsets
285         https://bugs.webkit.org/show_bug.cgi?id=91166
286
287         Reviewed by Tony Chang.
288
289         Change RenderStyle and calling code to use LayoutBoxExtent for image
290         outsets and remove text direction and writing mode versions of the
291         outline getters from RenderStyle as LayoutBoxExtent provides the same
292         functionality.
293
294         No new tests, no change in functionality.
295
296         * platform/graphics/FractionalLayoutBoxExtent.h:
297         * platform/graphics/FractionalLayoutBoxExtent.cpp:
298         (WebCore::FractionalLayoutBoxExtent::logicalTop):
299         (WebCore::FractionalLayoutBoxExtent::logicalBottom):
300         Add logicalTop and logicalBottom methods to go with the existing
301         logicalLeft and logicalRight ones.
302
303         * platform/graphics/FractionalLayoutRect.h:
304         (WebCore::FractionalLayoutRect::expand):
305         Add FractionalLayoutBoxExtent version of expand method.
306
307         * rendering/InlineFlowBox.cpp:
308         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
309         Change implementation to use the new FractionalLayoutBoxExtent version of
310         borderImageOutsets and the logicalTop/Bottom/Left/Right methods.
311         
312         (WebCore::clipRectForNinePieceImageStrip):
313         Change implementation to use the new FractionalLayoutBoxExtent version of
314         borderImageOutsets.
315         
316         * rendering/RenderBox.cpp:
317         (WebCore::RenderBox::maskClipRect):
318         Change implementation to use the new FractionalLayoutBoxExtent version of
319         borderImageOutsets and the new FractionalLayoutRect::expand method.
320         
321         (WebCore::RenderBox::addVisualEffectOverflow):
322         Change implementation to use the new FractionalLayoutBoxExtent version of
323         borderImageOutsets.
324         
325         * rendering/RenderBoxModelObject.cpp:
326         (WebCore::RenderBoxModelObject::paintNinePieceImage):
327         Change implementation to use the new FractionalLayoutBoxExtent version of
328         borderImageOutsets and the new FractionalLayoutRect::expand method.
329
330         * rendering/style/RenderStyle.h:
331         * rendering/style/RenderStyle.cpp:
332         (WebCore::RenderStyle::imageOutsets):
333         Change getImageOutsets to return a FractionalLayoutBoxExtent object and
334         rename to imageOutsets to match the webkit naming convention for getters.
335
336         Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets,
337         getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets,
338         getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods
339         as the same functionality is provided by FractionalLayoutBoxExtent.
340
341 2012-07-13  David Hyatt  <hyatt@apple.com>
342
343         https://bugs.webkit.org/show_bug.cgi?id=91278
344         Improve block margin estimation function to account for not having a layout and for quirks mode
345         
346         Reviewed by Simon Fraser.
347
348         * rendering/RenderBlock.cpp:
349         (WebCore::RenderBlock::marginBeforeEstimateForChild):
350         Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before
351         recurring. This includes the quirks margin information as well. This ensures that the margins are
352         up-to-date when checked, even before the object has had its first layout.
353         
354         * rendering/RenderBlock.h:
355         (WebCore::RenderBlock::setMarginStartForChild):
356         (WebCore::RenderBlock::setMarginEndForChild):
357         (WebCore::RenderBlock::setMarginBeforeForChild):
358         (WebCore::RenderBlock::setMarginAfterForChild):
359         * rendering/RenderBox.cpp:
360         (WebCore::RenderBox::computeBlockDirectionMargins):
361         * rendering/RenderBox.h:
362         (RenderBox):
363         Add consts in order to compile.
364
365 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
366
367         NodeLists should not invalidate on irreleavnt attribute changes
368         https://bugs.webkit.org/show_bug.cgi?id=91277
369
370         Reviewed by Ojan Vafai.
371
372         Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
373         and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.
374
375         Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
376         as invalidateNodeListCachesInAncestors since they're almost identical after r122498.
377
378         In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
379         shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.
380
381         * dom/Attr.cpp:
382         (WebCore::Attr::setValue):
383         (WebCore::Attr::childrenChanged):
384         * dom/ContainerNode.cpp:
385         (WebCore::ContainerNode::childrenChanged):
386         * dom/Document.cpp:
387         (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
388         the value of NodeListRootType in order to prepare for the bug 80269.
389         (WebCore::Document::unregisterNodeListCache): Ditto.
390         (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
391         (WebCore::Document::shouldInvalidateNodeListCaches):
392         * dom/DynamicNodeList.h:
393         (DynamicNodeListCacheBase):
394         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
395         * dom/Element.cpp: 
396         (WebCore::Element::attributeChanged):
397         * dom/ElementRareData.h:
398         (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
399         the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
400         * dom/Node.cpp:
401         (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
402         invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
403         (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
404         node lists via shouldInvalidateTypeOnAttributeChange.
405         (WebCore):
406         * dom/Node.h:
407         (Node):
408         * dom/NodeRareData.h:
409         (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
410         (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
411         (NodeRareData):
412         * html/HTMLCollection.h:
413         (HTMLCollectionCacheBase):
414
415 2012-07-13  Arpita Bahuguna  <arpitabahuguna@gmail.com>
416
417         Refactor RenderTable to use the section's iteration functions.
418         https://bugs.webkit.org/show_bug.cgi?id=89751
419
420         Reviewed by Julien Chaffraix.
421
422         Removing anti-pattern wherever possible from RenderTable code. Also, modifying
423         RenderTable sections' iterations to use helper functions.
424
425         No new tests required for this change since no change in behavior is expected.
426
427         * rendering/RenderTable.cpp:
428         (WebCore::RenderTable::addOverflowFromChildren):
429         (WebCore::RenderTable::setCellLogicalWidths):
430         (WebCore::RenderTable::outerBorderStart):
431         (WebCore::RenderTable::outerBorderEnd):
432         Removed anti-patterns involving iterations over RenderObjects.
433
434         (WebCore::RenderTable::outerBorderAfter):
435         Modified RenderTable sections' iteration to use helper functions.
436
437 2012-07-13  Enrica Casucci  <enrica@apple.com>
438
439         Threadsafety issues in WebScriptObject
440         https://bugs.webkit.org/show_bug.cgi?id=90849
441
442         Reviewed by Geoff Garen.
443
444         Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
445
446         * bindings/objc/WebScriptObject.mm:
447         (-[WebScriptObject JSObject]):
448
449 2012-07-13  Raymond Toy  <rtoy@google.com>
450
451         DelayNode doesn't work if delayTime.value == delayTime.maxValue
452         https://bugs.webkit.org/show_bug.cgi?id=90357
453
454         Reviewed by Kenneth Russell.
455
456         Increase delay buffer size slightly so that the read and write
457         pointers don't become equal when the delay and the max delay are
458         the same.
459         
460         Tests: webaudio/delaynode-max-default-delay.html
461                webaudio/delaynode-max-nondefault-delay.html
462
463         * Modules/webaudio/DelayDSPKernel.cpp:
464         (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
465         (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
466         (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
467         * Modules/webaudio/DelayDSPKernel.h:
468         (DelayDSPKernel): Declare bufferLengthForDelay. 
469
470 2012-07-13  Benjamin Poulain  <bpoulain@apple.com>
471
472         Always aggressively preload on iOS
473         https://bugs.webkit.org/show_bug.cgi?id=91276
474
475         Reviewed by Simon Fraser.
476
477         * loader/cache/CachedResourceLoader.cpp:
478         (WebCore::CachedResourceLoader::preload):
479
480 2012-07-13  Vineet Chaudhary  <rgf748@motorola.com>
481
482         Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
483         https://bugs.webkit.org/show_bug.cgi?id=91208
484
485         Reviewed by Kentaro Hara.
486
487         We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
488         using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
489
490         No new test as just refactoring.
491         Existing tests under fast/dom/Window/window-* fast/dom/events/*
492         covers tests.
493
494         * bindings/v8/V8Utilities.cpp:
495         (WebCore::extractTransferables):
496
497 2012-07-13  Vincent Scheib  <scheib@chromium.org>
498
499         Pointer Lock handles disconnected DOM elements
500         https://bugs.webkit.org/show_bug.cgi?id=77029
501
502         Reviewed by Adrienne Walker.
503
504         Pointer Lock Controller now checks when elements or documents are
505         removed, and unlocks if the target element is being removed.
506
507         Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
508                pointer-lock/locked-element-removed-from-dom.html
509
510         * dom/Document.cpp:
511         (WebCore::Document::detach):
512         * dom/Element.cpp:
513         (WebCore::Element::removedFrom):
514         (WebCore::Element::webkitRequestPointerLock):
515         * page/PointerLockController.cpp:
516         (WebCore::PointerLockController::requestPointerLock):
517         (WebCore::PointerLockController::elementRemoved):
518         (WebCore):
519         (WebCore::PointerLockController::documentDetached):
520         (WebCore::PointerLockController::didLosePointerLock):
521         (WebCore::PointerLockController::enqueueEvent):
522         * page/PointerLockController.h:
523         (WebCore):
524         (PointerLockController):
525
526 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
527
528         HTMLCollection should use DynamicNodeList's invalidation model
529         https://bugs.webkit.org/show_bug.cgi?id=90326
530
531         Reviewed by Anders Carlsson.
532
533         Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
534         by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
535         document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
536         normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
537         ItemProperties and FormControls are more "traditional" users of the mechanism.
538
539         Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
540
541         * dom/Document.cpp:
542         (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
543         NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
544         InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
545         invalidated on id or name content attribute changes due to named getters.
546         (WebCore::Document::unregisterNodeListCache): Ditto.
547         (WebCore::shouldInvalidateNodeListForType):
548         (WebCore::Document::shouldInvalidateNodeListCaches):
549         (WebCore::Document::clearNodeListCaches):
550         * dom/Document.h:
551         (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
552         (Document):
553         * dom/DynamicNodeList.cpp:
554         (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
555         and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
556         all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
557         or its attributes are changed.
558         (WebCore):
559         * dom/DynamicNodeList.h:
560         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
561         instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
562         (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
563         invalidation types.
564         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
565         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
566         * dom/ElementRareData.h:
567         (ElementRareData):
568         (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
569         (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
570         * dom/Node.cpp:
571         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
572         node list caches.
573         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
574         * dom/NodeRareData.h:
575         (WebCore::NodeListsNodeData::adoptTreeScope):
576         * dom/TreeScopeAdopter.cpp:
577         (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
578         NodeRareData's.
579         * html/HTMLAllCollection.cpp:
580         (WebCore::HTMLAllCollection::namedItemWithIndex):
581         * html/HTMLCollection.cpp:
582         (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
583         as if rooted at document for convenience.
584         (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
585         invalidation on id and name content attribute changes, which is taken care by the special logic in
586         Document::registerNodeListCache, exclude those two attributes from consideration.
587         (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
588         (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
589         (WebCore::HTMLCollection::length):
590         (WebCore::HTMLCollection::item):
591         (WebCore::HTMLCollection::namedItem):
592         (WebCore::HTMLCollection::updateNameCache):
593         * html/HTMLCollection.h:
594         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
595         (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
596         (HTMLCollection):
597         * html/HTMLFormCollection.cpp:
598         (WebCore::HTMLFormCollection::namedItem):
599         (WebCore::HTMLFormCollection::updateNameCache):
600         * html/HTMLOptionsCollection.h:
601         (HTMLOptionsCollection):
602         * html/HTMLPropertiesCollection.cpp:
603         (WebCore::HTMLPropertiesCollection::updateNameCache):
604         * html/HTMLPropertiesCollection.h:
605         (WebCore::HTMLPropertiesCollection::invalidateCache):
606
607 2012-07-13  Shawn Singh  <shawnsingh@chromium.org>
608
609         [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
610         https://bugs.webkit.org/show_bug.cgi?id=91260
611
612         Reviewed by Adrienne Walker.
613
614         ASSERT(!clipped) was being triggered after skinny almost-degenerate
615         quads went through anti-aliasing inflation, and then were being
616         transformed back from device space to local space. It turns out
617         this assertion is too aggressive, and we don't yet have an obvious
618         need to change the behavior on the clipped==true case.
619
620         No new tests needed, this patch fixes only comments and debug code.
621
622         * platform/graphics/chromium/LayerRendererChromium.cpp:
623         (WebCore::LayerRendererChromium::drawRenderPassQuad):
624            fixed a comment.
625
626         (WebCore::LayerRendererChromium::drawTileQuad):
627            fixed a similar comment, removed unnecessary assertion.
628
629 2012-07-13  Philip Rogers  <pdr@google.com>
630
631         Remove assert in localCoordinateSpaceTransform()
632         https://bugs.webkit.org/show_bug.cgi?id=91189
633
634         Reviewed by Nikolas Zimmermann.
635
636         The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
637         to override the method but it is better to simply return the identity matrix.
638
639         This scenario can occur when we break the SVG content model, such as asking for
640         the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
641         tspan is not a subclass of SVGLocatable but both Firefox and Opera
642         implement this by returning the identity matrix.
643
644         Test: svg/custom/invalid-ctm.svg
645
646         * svg/SVGStyledElement.cpp:
647         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
648
649 2012-07-13  Kentaro Hara  <haraken@chromium.org>
650
651         [V8] String wrappers should be marked Independent
652         https://bugs.webkit.org/show_bug.cgi?id=91251
653
654         Reviewed by Adam Barth.
655
656         Currently V8 String wrappers are not marked Independent.
657         By marking them Independent, they can be reclaimed by the scavenger GC.
658
659         I tried to find some cases where this change reduces memory usage,
660         but couldn't due to sensitive behavior of GC.
661
662         No tests. No change in behavior.
663
664         * bindings/v8/V8Binding.cpp:
665         (WebCore::StringCache::v8ExternalStringSlow):
666
667 2012-07-13  Peter Beverloo  <peter@chromium.org>
668
669         [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
670         https://bugs.webkit.org/show_bug.cgi?id=91240
671
672         Reviewed by Adam Barth.
673
674         Disable the v8 internationalization API for Chromium Android, as it's
675         disabled and not always available in checkouts. Furthermore, disable
676         strict aliasing for the webkit_remaining target, similar to what
677         x11-based builds are doing (see the webcore_prerequisites target).
678
679         * WebCore.gyp/WebCore.gyp:
680
681 2012-07-13  Kentaro Hara  <haraken@chromium.org>
682
683         [CallWith=XXX] arguments should be placed at the head of method arguments
684         https://bugs.webkit.org/show_bug.cgi?id=91217
685
686         Reviewed by Adam Barth.
687
688         The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
689         because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
690         but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
691
692         Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
693         at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
694
695         Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
696         so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
697
698         Test: bindings/scripts/test/TestObj.idl
699
700         * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
701         (DataTransferItemFileSystem):
702         * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
703         (WebCore::HTMLInputElementFileSystem::webkitEntries):
704         * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
705         (HTMLInputElementFileSystem):
706         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
707         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
708
709         * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
710         (GenerateNormalAttrGetter):
711         (GenerateNormalAttrSetter):
712         (GenerateFunctionCallString):
713
714         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
715         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
716
717 2012-07-13  Mary Wu  <mary.wu@torchmobile.com.cn>
718
719         [BlackBerry] Some small changes in network code
720         https://bugs.webkit.org/show_bug.cgi?id=90974
721
722         Reviewed by Rob Buis.
723
724         1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
725         its wrapped stream can also query the stream result.
726         2. pass download attribute to NetworkRequest.
727
728         RIM PR# 171555
729         Reviewed internally by Lyon Chen and Joe Mason.
730
731         * platform/network/blackberry/NetworkJob.cpp:
732         (WebCore::NetworkJob::handleNotifyClose):
733         * platform/network/blackberry/NetworkJob.h:
734         (WebCore::NetworkJob::status):
735         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
736         (WebCore::platformTargetTypeForRequest):
737         * platform/network/blackberry/SocketStreamHandle.h:
738         (WebCore::SocketStreamHandle::status):
739         (SocketStreamHandle):
740         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
741         (WebCore::SocketStreamHandle::notifyStatusReceived):
742         (WebCore::SocketStreamHandle::notifyClose):
743
744 2012-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
745
746         Web Inspector: Remove uiSourceCode from Resource.
747         https://bugs.webkit.org/show_bug.cgi?id=91201
748
749         Reviewed by Pavel Feldman.
750
751         Removed Resource._uiSourceCode field as it is not used anymore.
752
753         * inspector/front-end/Resource.js:
754         (WebInspector.Resource.prototype.isHidden):
755         * inspector/front-end/UISourceCode.js:
756         (WebInspector.UISourceCode):
757
758 2012-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
759
760         Unreviewed, rolling out r122450 and r122580.
761         http://trac.webkit.org/changeset/122450
762         http://trac.webkit.org/changeset/122580
763         https://bugs.webkit.org/show_bug.cgi?id=91263
764
765         Caused multiple regressions on ClusterFuzz (Requested by
766         inferno-sec on #webkit).
767
768         * bindings/js/ScriptWrappable.h:
769         (WebCore::ScriptWrappable::reportMemoryUsage):
770         * bindings/v8/DOMDataStore.cpp:
771         (WebCore::DOMDataStore::reportMemoryUsage):
772         * bindings/v8/IntrusiveDOMWrapperMap.h:
773         (WebCore::ChunkedTable::reportMemoryUsage):
774         * bindings/v8/ScriptWrappable.h:
775         (WebCore::ScriptWrappable::reportMemoryUsage):
776         * bindings/v8/V8Binding.cpp:
777         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
778         (WebCore::StringCache::reportMemoryUsage):
779         * bindings/v8/V8DOMMap.h:
780         * css/PropertySetCSSStyleDeclaration.cpp:
781         (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
782         * css/StylePropertySet.cpp:
783         * css/StylePropertySet.h:
784         (WebCore::StylePropertySet::reportMemoryUsage):
785         * dom/CharacterData.cpp:
786         (WebCore::CharacterData::reportMemoryUsage):
787         * dom/ContainerNode.h:
788         (WebCore::ContainerNode::reportMemoryUsage):
789         * dom/Document.cpp:
790         (WebCore::Document::reportMemoryUsage):
791         * dom/Element.cpp:
792         (WebCore::Element::detachAttribute):
793         (WebCore::Element::removeAttribute):
794         (WebCore::Element::attributes):
795         (WebCore::Element::setAttributeInternal):
796         (WebCore::Element::parserSetAttributes):
797         (WebCore::Element::hasEquivalentAttributes):
798         (WebCore::Element::createAttributeData):
799         (WebCore):
800         (WebCore::Element::setAttributeNode):
801         (WebCore::Element::removeAttributeNode):
802         (WebCore::Element::getAttributeNode):
803         (WebCore::Element::getAttributeNodeNS):
804         (WebCore::Element::hasAttribute):
805         (WebCore::Element::hasAttributeNS):
806         (WebCore::Element::normalizeAttributes):
807         (WebCore::Element::cloneAttributesFromElement):
808         * dom/Element.h:
809         (WebCore::Element::attributeData):
810         (Element):
811         (WebCore::Element::reportMemoryUsage):
812         (WebCore::Element::ensureAttributeData):
813         (WebCore::Element::updatedAttributeData):
814         (WebCore::Element::ensureUpdatedAttributeData):
815         * dom/ElementAttributeData.cpp:
816         (WebCore::ElementAttributeData::attrIfExists):
817         (WebCore::ElementAttributeData::ensureAttr):
818         (WebCore::ElementAttributeData::setAttr):
819         (WebCore::ElementAttributeData::removeAttr):
820         (WebCore::ElementAttributeData::setClass):
821         (WebCore):
822         (WebCore::ElementAttributeData::ensureInlineStyle):
823         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
824         (WebCore::ElementAttributeData::destroyInlineStyle):
825         (WebCore::ElementAttributeData::addAttribute):
826         (WebCore::ElementAttributeData::removeAttribute):
827         (WebCore::ElementAttributeData::isEquivalent):
828         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
829         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
830         (WebCore::ElementAttributeData::cloneDataFrom):
831         (WebCore::ElementAttributeData::clearAttributes):
832         (WebCore::ElementAttributeData::replaceAttribute):
833         (WebCore::ElementAttributeData::getAttributeNode):
834         * dom/ElementAttributeData.h:
835         (WebCore::ElementAttributeData::create):
836         (ElementAttributeData):
837         (WebCore::ElementAttributeData::setIdForStyleResolution):
838         (WebCore::ElementAttributeData::setAttributeStyle):
839         (WebCore::ElementAttributeData::length):
840         (WebCore::ElementAttributeData::isEmpty):
841         (WebCore::ElementAttributeData::attributeItem):
842         (WebCore::ElementAttributeData::getAttributeItem):
843         (WebCore::ElementAttributeData::reportMemoryUsage):
844         (WebCore::ElementAttributeData::ElementAttributeData):
845         (WebCore::ElementAttributeData::attributeVector):
846         (WebCore::ElementAttributeData::clonedAttributeVector):
847         (WebCore::ElementAttributeData::removeAttribute):
848         (WebCore::ElementAttributeData::getAttributeItemIndex):
849         * dom/MemoryInstrumentation.h:
850         (MemoryInstrumentation):
851         (MemoryObjectInfo):
852         (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
853         (WebCore::MemoryObjectInfo::reportPointer):
854         (WebCore::MemoryObjectInfo::reportInstrumentedObject):
855         (WebCore::MemoryObjectInfo::reportObject):
856         (WebCore::MemoryObjectInfo::reportObjectInfo):
857         (WebCore::MemoryObjectInfo::reportHashMap):
858         (WebCore::MemoryObjectInfo::reportHashSet):
859         (WebCore::MemoryObjectInfo::reportListHashSet):
860         (WebCore::MemoryObjectInfo::reportVector):
861         (WebCore::MemoryObjectInfo::reportString):
862         (WebCore::MemoryObjectInfo::objectType):
863         (WebCore::MemoryObjectInfo::objectSize):
864         (WebCore::MemoryObjectInfo::memoryInstrumentation):
865         * dom/Node.cpp:
866         (WebCore::Node::reportMemoryUsage):
867         * dom/QualifiedName.h:
868         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
869         (WebCore::QualifiedName::reportMemoryUsage):
870         * dom/StyledElement.cpp:
871         (WebCore::StyledElement::style):
872         (WebCore::StyledElement::classAttributeChanged):
873         (WebCore::StyledElement::setInlineStyleProperty):
874         (WebCore::StyledElement::removeInlineStyleProperty):
875         (WebCore::StyledElement::addSubresourceAttributeURLs):
876         * dom/StyledElement.h:
877         (WebCore::StyledElement::ensureInlineStyle):
878         * html/parser/HTMLConstructionSite.cpp:
879         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
880         * platform/TreeShared.h:
881         (WebCore::TreeShared::reportMemoryUsage):
882         * xml/parser/XMLDocumentParserQt.cpp:
883         (WebCore::XMLDocumentParser::XMLDocumentParser):
884
885 2012-07-13  Huang Dongsung  <luxtella@company100.net>
886
887         Remove down-casting to BitmapImage in GraphicsContext::drawImage.
888         https://bugs.webkit.org/show_bug.cgi?id=90755
889
890         Reviewed by Simon Fraser.
891
892         Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
893         the last argument for CG. Then we can remove the conditional down-casting in
894         GraphicsContext::drawImage.
895
896         This change is needed for parallel image decoders. Because parallel image
897         decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
898         down-casting above causes the loss of RespectImageOrientationEnum which must be
899         passed to BitmapImage.
900
901         No new tests, no behavior change.
902
903         * platform/graphics/BitmapImage.cpp:
904         * platform/graphics/BitmapImage.h:
905         * platform/graphics/GraphicsContext.cpp:
906         (WebCore::GraphicsContext::drawImage):
907         * platform/graphics/Image.cpp:
908         (WebCore::Image::draw):
909         (WebCore):
910         * platform/graphics/Image.h:
911         (Image):
912
913 2012-07-13  Lauro Neto  <lauro.neto@openbossa.org>
914
915         Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
916         https://bugs.webkit.org/show_bug.cgi?id=91156
917
918         Reviewed by Noam Rosenthal.
919
920         Adds several build fixes.
921
922         * platform/graphics/GraphicsContext3D.h:
923             Use E3DOpenGLES instead of previously removed E3DQt.
924
925         * platform/graphics/OpenGLESShims.h:
926             Enable defines for Qt.
927
928         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
929         (WebCore::Extensions3DOpenGLES::blitFramebuffer):
930         (WebCore):
931         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
932         (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
933             Added pure virtual stubs.
934
935         (WebCore::Extensions3DOpenGLES::supportsExtension):
936             Remove PROC suffix. See bug #91130.
937
938         * platform/graphics/opengl/Extensions3DOpenGLES.h:
939         (Extensions3DOpenGLES):
940             Added pure virtual stubs.
941
942         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
943         (WebCore::GraphicsContext3D::reshapeFBOs):
944             Readded missing function after removed in r122250.
945
946         (WebCore):
947             Use PLATFORM(BLACKBERRY) guard around port-specific include.
948
949         * platform/graphics/qt/GraphicsContext3DQt.cpp:
950             Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
951
952
953 2012-07-13  Keishi Hattori  <keishi@webkit.org>
954
955         Form of FormAssociatedElement is not updated when id target changes.
956         https://bugs.webkit.org/show_bug.cgi?id=91042
957
958         Reviewed by Kent Tamura.
959
960         Test: fast/forms/update-form-attribute-element.html
961
962         This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
963         They can be used to be notified when the element that an id is pointing to (the id target)
964         changes.
965
966         * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
967         * GNUmakefile.list.am: Ditto.
968         * Target.pri: Ditto.
969         * WebCore.gypi: Ditto.
970         * WebCore.vcproj/WebCore.vcproj: Ditto.
971         * WebCore.xcodeproj/project.pbxproj: Ditto.
972         * dom/DOMAllInOne.cpp:
973         * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
974         (WebCore):
975         (WebCore::IdTargetObserver::IdTargetObserver):
976         (WebCore::IdTargetObserver::~IdTargetObserver):
977         * dom/IdTargetObserver.h: Added.
978         (WebCore):
979         (IdTargetObserver):
980         * dom/IdTargetObserverRegistry.cpp: Added.
981         (WebCore):
982         (WebCore::IdTargetObserverRegistry::create):
983         (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
984         (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
985         (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
986         * dom/IdTargetObserverRegistry.h: Added.
987         (WebCore):
988         (IdTargetObserverRegistry):
989         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
990         (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
991         * dom/TreeScope.cpp:
992         (WebCore::TreeScope::TreeScope):
993         (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
994         (WebCore::TreeScope::removeElementById): Ditto.
995         * dom/TreeScope.h:
996         (WebCore):
997         (WebCore::TreeScope::idTargetObserverRegistry):
998         (TreeScope):
999         * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
1000         (WebCore::FormAssociatedElement::didMoveToNewDocument):
1001         (WebCore::FormAssociatedElement::insertedInto):
1002         (WebCore::FormAssociatedElement::removedFrom):
1003         (WebCore::FormAssociatedElement::formAttributeChanged):
1004         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
1005         (WebCore):
1006         (WebCore::FormAssociatedElement::formAttributeTargetChanged):
1007         (WebCore::FormAttributeTargetObserver::create):
1008         (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
1009         (WebCore::FormAttributeTargetObserver::idTargetChanged):
1010         * html/FormAssociatedElement.h:
1011         (FormAssociatedElement):
1012         * html/FormController.cpp:
1013         * html/FormController.h:
1014         (FormController):
1015         * html/HTMLFormElement.cpp:
1016         (WebCore::HTMLFormElement::removedFrom):
1017         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
1018         scans the range and returns the index to insert the element in m_associatedElement.
1019         (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
1020         m_associatedElement that precede and follow the form element.
1021         * html/HTMLFormElement.h:
1022         (HTMLFormElement):
1023
1024 2012-07-13  Gabor Rapcsanyi  <rgabor@webkit.org>
1025
1026         Optimizing blend filter to ARM-NEON with intrinsics
1027         https://bugs.webkit.org/show_bug.cgi?id=90949
1028
1029         Reviewed by Zoltan Herczeg.
1030
1031         The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
1032         we are able to calculate with 2 pixels (8 channels) at the same time.
1033         The code is written with NEON intrinsics and it doesn't affect the
1034         general - it has the same behaviour as the original algorithm.
1035         With this NEON optimization the calculation is ~4.5 times faster for each mode.
1036
1037         Existing tests cover this issue.
1038
1039         * CMakeLists.txt:
1040         * GNUmakefile.list.am:
1041         * Target.pri:
1042         * WebCore.gypi:
1043         * WebCore.vcproj/WebCore.vcproj:
1044         * WebCore.xcodeproj/project.pbxproj:
1045         * platform/graphics/filters/FEBlend.cpp:
1046         (WebCore::FEBlend::platformApplyGeneric):
1047         (WebCore):
1048         (WebCore::FEBlend::platformApplySoftware):
1049         * platform/graphics/filters/FEBlend.h:
1050         (FEBlend):
1051         * platform/graphics/filters/arm/FEBlendNEON.h: Added.
1052         (WebCore):
1053         (FEBlendUtilitiesNEON):
1054         (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
1055         (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
1056         (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
1057         (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
1058         (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
1059         (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
1060         (WebCore::FEBlend::platformApplyNEON):
1061
1062 2012-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
1063
1064         Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
1065         https://bugs.webkit.org/show_bug.cgi?id=91227
1066
1067         Reviewed by Pavel Feldman.
1068
1069         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1070         {
1071             MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
1072             info.visitBaseClass<ScriptWrappable>(this);
1073
1074             info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
1075             info.addInstrumentedMember(m_next);
1076             info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
1077             info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
1078             info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
1079         }
1080
1081         The change is covered by existing tests for native memory snapshot.
1082
1083         * bindings/v8/DOMDataStore.cpp:
1084         (WebCore::DOMDataStore::reportMemoryUsage):
1085         * bindings/v8/IntrusiveDOMWrapperMap.h:
1086         (WebCore::ChunkedTable::reportMemoryUsage):
1087         * bindings/v8/ScriptWrappable.h:
1088         (WebCore::ScriptWrappable::reportMemoryUsage):
1089         * bindings/v8/V8Binding.cpp:
1090         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1091         (WebCore::StringCache::reportMemoryUsage):
1092         * bindings/v8/V8DOMMap.h:
1093         * css/StylePropertySet.h:
1094         (WebCore::StylePropertySet::reportMemoryUsage):
1095         * dom/CharacterData.cpp:
1096         (WebCore::CharacterData::reportMemoryUsage):
1097         * dom/ContainerNode.h:
1098         (WebCore::ContainerNode::reportMemoryUsage):
1099         * dom/Document.cpp:
1100         (WebCore::Document::reportMemoryUsage):
1101         * dom/Element.h:
1102         (WebCore::Element::reportMemoryUsage):
1103         * dom/ElementAttributeData.h:
1104         (WebCore::ElementAttributeData::reportMemoryUsage):
1105         * dom/MemoryInstrumentation.h:
1106         (MemoryInstrumentation):
1107         (WebCore::MemoryObjectInfo::objectType):
1108         (WebCore::MemoryObjectInfo::objectSize):
1109         (WebCore::MemoryObjectInfo::memoryInstrumentation):
1110         (MemoryObjectInfo):
1111         (WebCore::MemoryObjectInfo::reportObjectInfo):
1112         (WebCore):
1113         (MemoryClassInfo):
1114         (WebCore::MemoryClassInfo::MemoryClassInfo):
1115         (WebCore::MemoryClassInfo::visitBaseClass):
1116         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
1117         (WebCore::MemoryClassInfo::reportInstrumentedObject):
1118         (WebCore::MemoryClassInfo::reportPointer):
1119         (WebCore::MemoryClassInfo::reportObject):
1120         (WebCore::MemoryClassInfo::reportHashMap):
1121         (WebCore::MemoryClassInfo::reportHashSet):
1122         (WebCore::MemoryClassInfo::reportListHashSet):
1123         (WebCore::MemoryClassInfo::reportVector):
1124         (WebCore::MemoryClassInfo::reportString):
1125         * dom/Node.cpp:
1126         (WebCore::Node::reportMemoryUsage):
1127         * dom/QualifiedName.h:
1128         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1129         (WebCore::QualifiedName::reportMemoryUsage):
1130         * platform/TreeShared.h:
1131         (WebCore::TreeShared::reportMemoryUsage):
1132
1133 2012-07-13  Pavel Feldman  <pfeldman@chromium.org>
1134
1135         Web Inspector: align scope filters
1136         https://bugs.webkit.org/show_bug.cgi?id=91213
1137
1138         Reviewed by Vsevolod Vlasov.
1139
1140         * inspector/front-end/elementsPanel.css:
1141         (.crumbs):
1142         * inspector/front-end/inspector.css:
1143         (.status-bar > div):
1144         (.scope-bar):
1145         (.scope-bar li):
1146         (.scope-bar li.all):
1147         * inspector/front-end/networkLogView.css:
1148
1149 2012-07-13  Peter Rybin  <peter.rybin@gmail.com>
1150
1151         Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
1152         https://bugs.webkit.org/show_bug.cgi?id=89198
1153
1154         Reviewed by Yury Semikhatsky.
1155
1156         Instead of generating error message string on every call (mostly for nothing),
1157         error message is generated deeper inside the handler and only command name
1158         is passed every time.
1159
1160         * inspector/CodeGeneratorInspector.py:
1161         (Generator.process_command):
1162
1163 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
1164
1165         [BlackBerry] Update about:* pages
1166         https://bugs.webkit.org/show_bug.cgi?id=91121
1167
1168         Reviewed by Yong Li.
1169
1170         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
1171
1172         No new tests, because there is no new funtionality.
1173
1174         * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
1175
1176 2012-07-13  Olivier Blin  <olivier.blin@softathome.com>
1177
1178         Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
1179         https://bugs.webkit.org/show_bug.cgi?id=91225
1180
1181         Reviewed by Steve Block.
1182
1183         This issue comes from r105036
1184
1185         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1186         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1187
1188 2012-07-13  Andrei Bucur  <abucur@adobe.com>
1189         [CSS Regions] Fix build for bug 89000
1190         https://bugs.webkit.org/show_bug.cgi?id=91215
1191
1192         Reviewed by Kentaro Hara.
1193
1194         Remove the unused variable m_state that was a leftover from a previous version of the patch.
1195
1196         Tests: No new tests, build fix.
1197
1198         * dom/WebKitNamedFlow.cpp:
1199         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1200         * dom/WebKitNamedFlow.h:
1201         (WebKitNamedFlow):
1202
1203 2012-07-13  Kenichi Ishibashi  <bashi@chromium.org>
1204
1205         [Chromium] Fix bugs in HarfBuzzShaper
1206         https://bugs.webkit.org/show_bug.cgi?id=90951
1207
1208         Reviewed by Tony Chang.
1209
1210         The current implementation has following problems:
1211         - Cannot render RTL text if the TextRun is divided into more than two
1212           HarfBuzzRun.
1213         - Script handling in TextRun partitioning is incorrect.
1214         - Inaccurate calculation of selection rect.
1215         - Wrong rendering position when the first glyph of the TextRun have
1216           non-zero offsets in terms of HarfBuzz.
1217
1218         To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
1219         - Divide the whole range of TextRun first, then shape them in visual
1220           order.
1221         - Divide TextRun in the same way of old-harfbuzz's
1222           hb_utf16_script_run_next().
1223         - Prefer float than int when calculating selection.
1224         - Adjust the drawing point after shaping.
1225
1226         Added tests covers the fix except for the last problem. The last problem will be covered
1227         by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
1228         to use HarfBuzzShaper.
1229
1230         Tests: fast/text/shaping/shaping-script-order.html
1231                fast/text/shaping/shaping-selection-rect.html
1232
1233         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
1234         (WebCore::Font::drawComplexText): Adjusts point after shaping.
1235         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1236         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1237         (WebCore):
1238         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
1239         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
1240         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
1241         (WebCore::normalizeCharacters): Added.
1242         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1243         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1244         (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
1245         (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
1246         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
1247         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
1248         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
1249         (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
1250         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
1251         (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
1252         (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
1253         (HarfBuzzRun):
1254         (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
1255         (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
1256         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
1257         (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
1258
1259 2012-07-13  Kentaro Hara  <haraken@chromium.org>
1260
1261         Unreviewed, rolling out r122545.
1262         http://trac.webkit.org/changeset/122545
1263         https://bugs.webkit.org/show_bug.cgi?id=91185
1264
1265         We found that this was a wrong fix
1266
1267         * bindings/scripts/CodeGeneratorJS.pm:
1268         (GenerateImplementation):
1269
1270 2012-07-13  Kentaro Hara  <haraken@chromium.org>
1271
1272         Unreviewed, rolling out r122553.
1273         http://trac.webkit.org/changeset/122553
1274         https://bugs.webkit.org/show_bug.cgi?id=91198
1275
1276         We found that this was a wrong fix
1277
1278         * bindings/scripts/CodeGeneratorJS.pm:
1279         (GenerateImplementation):
1280
1281 2012-07-13  Kent Tamura  <tkent@chromium.org>
1282
1283         Change the timing of form state restore
1284         https://bugs.webkit.org/show_bug.cgi?id=89962
1285
1286         Reviewed by Hajime Morita.
1287
1288         For a preparation to fix a form identification problem (Bug 91209),
1289         restore controls states when the parsing of their owner forms is
1290         completed. For controls without owners, their states are restored when
1291         their parsing is completed as ever.
1292
1293         No new tests. This doesn't change observable behavior.
1294
1295         * html/FormController.cpp:
1296         (WebCore::ownerFormForState):
1297         Added. This code was used in formKey(), and restoreControlState*() use it.
1298         (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
1299         (WebCore::FormController::restoreControlStateFor):
1300         Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
1301         The difference is we don't resotre state if this control is owned by a form.
1302         (WebCore::FormController::restoreControlStateIn):
1303         Restore states of associated controls. This is called from
1304         finishParsingChildren() for <form>.
1305         * html/FormController.h:
1306         (FormController):
1307         - Declare restoreControlStateFor() and restoreControlStateIn().
1308         - Make takeStateForFormElement() private.
1309
1310         * html/FormAssociatedElement.cpp:
1311         (WebCore::FormAssociatedElement::isFormControlElementWithState):
1312         Added. The default implementation returns false.
1313         * html/FormAssociatedElement.h:
1314         (FormAssociatedElement):
1315         Added isFormControlElementWithState() for FormController::restoreControlStateIn().
1316         * html/HTMLFormControlElementWithState.cpp:
1317         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
1318         Some code was moved to FormController:restoreControlStateFor().
1319         (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
1320         Added. Returns true.
1321         * html/HTMLFormControlElementWithState.h:
1322         (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
1323         * html/HTMLFormElement.cpp:
1324         (WebCore::HTMLFormElement::finishParsingChildren):
1325         Added. Calls FormController::restoreControlStateIn().
1326         * html/HTMLFormElement.h:
1327         (HTMLFormElement): Declare finishParsingChildren().
1328
1329 2012-07-13  Kent Tamura  <tkent@chromium.org>
1330
1331         Make calendar pickers testable
1332         https://bugs.webkit.org/show_bug.cgi?id=84827
1333
1334         Reviewed by Hajime Morita.
1335
1336         WebCore:
1337         - Add PagePopupDriver, an interface to open/close a PagePopup.
1338         - Add setPagePopupDriver() to ChromeClient in order to inject a
1339         PagePopupDriver for testing.
1340
1341         Internals:
1342         Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
1343         normal <iframe> in the top-level document, and load the popup content on
1344         it. MockPagePopupDriver is enabled by
1345         internals.settings.setEnableMockPagePopup(true).
1346
1347         Test: fast/forms/date/calendar-picker-appearance.html
1348
1349         * WebCore.gypi: Add new files.
1350         * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
1351         * page/ChromeClient.h:
1352         (ChromeClient): Add function for PagePopupDriver.
1353         * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
1354         * page/PagePopupDriver.h: Added.
1355         (PagePopupDriver):
1356         (WebCore::PagePopupDriver::~PagePopupDriver):
1357
1358         * testing/InternalSettings.cpp:
1359         (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
1360         (WebCore::InternalSettings::setEnableMockPagePopup):
1361         Register MockPagePopupDriver to ChromeClient.
1362         * testing/InternalSettings.h:
1363         (InternalSettings): Declare setEnableMockPagePopup().
1364         * testing/InternalSettings.idl: ditto.
1365         * testing/MockPagePopupDriver.cpp: Added.
1366         (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
1367         (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
1368         (WebCore::MockPagePopupDriver::create): Added.
1369         (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
1370         (WebCore::MockPagePopupDriver::openPagePopup):
1371         Added. An override of PagePopupDriver function. This creates a MockPagePopup.
1372         (WebCore::MockPagePopupDriver::closePagePopup):
1373         Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
1374         * testing/MockPagePopupDriver.h:
1375         (MockPagePopupDriver): Added.
1376
1377         * testing/v8/WebCoreTestSupport.cpp:
1378         (WebCoreTestSupport::injectPagePopupController):
1379         Added. Production code uses per-Page context feature framework. However
1380         MockPagePopup uses the same page as the host page. So we can't use the
1381         framework and need to inject window.pagePopupController manually.
1382         * testing/v8/WebCoreTestSupport.h:
1383         (WebCoreTestSupport): Add injectPagePopupController().
1384
1385 2012-07-12  Pavel Feldman  <pfeldman@chromium.org>
1386
1387         Web Inspector: mute the native looks of the selects in the console.
1388         https://bugs.webkit.org/show_bug.cgi?id=91120
1389
1390         Reviewed by Vsevolod Vlasov.
1391
1392         This is necessary for Mac now that we don't use border images for select.
1393
1394         * inspector/front-end/ConsoleView.js:
1395         (WebInspector.ConsoleView.prototype.get statusBarItems):
1396         (WebInspector.ConsoleView.prototype.addContext):
1397         (WebInspector.ConsoleView.prototype.removeContext):
1398         (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1399         (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
1400         (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1401         (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
1402         * inspector/front-end/StatusBarButton.js:
1403         (WebInspector.StatusBarComboBox):
1404         (WebInspector.StatusBarComboBox.prototype.addOption):
1405         (WebInspector.StatusBarComboBox.prototype.removeOption):
1406         (WebInspector.StatusBarComboBox.prototype.removeOptions):
1407         (WebInspector.StatusBarComboBox.prototype.selectedOption):
1408         * inspector/front-end/inspector.css:
1409         (.status-bar-select-container):
1410         (select.status-bar-item):
1411         (.console-context):
1412
1413 2012-07-13  Andrei Bucur  <abucur@adobe.com>
1414
1415         [CSS Regions] Fix the lifecycle for the flow objects and their renderers
1416         https://bugs.webkit.org/show_bug.cgi?id=89000
1417
1418         Reviewed by Eric Seidel.
1419
1420         This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
1421         all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
1422         all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
1423         the NULL flows are only cached, they should be destructible.
1424         Two named flows are considered to be equal if they have the same name.
1425         I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
1426         A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
1427         NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
1428         so when they go back to the CREATED state, the listeners would still be there.
1429
1430         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1431
1432         Tests: The old tests have been modified to take into account the new behavior
1433
1434         * CMakeLists.txt:
1435         * GNUmakefile.list.am:
1436         * Target.pri:
1437         * WebCore.gypi:
1438         * WebCore.vcproj/WebCore.vcproj:
1439         * WebCore.xcodeproj/project.pbxproj:
1440         * dom/DOMAllInOne.cpp:
1441         * dom/Document.cpp:
1442         (WebCore::Document::~Document):
1443         (WebCore):
1444         (WebCore::Document::webkitGetFlowByName):
1445         (WebCore::Document::namedFlows):
1446         * dom/Document.h:
1447         (WebCore):
1448         (Document):
1449         * dom/WebKitNamedFlow.cpp:
1450         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1451         (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
1452         (WebCore::WebKitNamedFlow::create):
1453         (WebCore):
1454         (WebCore::WebKitNamedFlow::name):
1455         (WebCore::WebKitNamedFlow::overset):
1456         (WebCore::nodeInFlowThread):
1457         (WebCore::WebKitNamedFlow::getRegionsByContentNode):
1458         (WebCore::WebKitNamedFlow::getContent):
1459         (WebCore::WebKitNamedFlow::setRenderer):
1460         * dom/WebKitNamedFlow.h:
1461         (WebCore):
1462         (WebKitNamedFlow):
1463         (WebCore::WebKitNamedFlow::getFlowState):
1464         (WebCore::WebKitNamedFlow::switchFlowState):
1465         * dom/WebKitNamedFlowCollection.cpp: Added.
1466         (WebCore):
1467         (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
1468         (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
1469         (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
1470         (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
1471         (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
1472         (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
1473         (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
1474         (WebCore::WebKitNamedFlowCollection::documentDestroyed):
1475         (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
1476         (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
1477         (WebKitNamedFlowCollection::NamedFlowHashFunctions):
1478         (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
1479         (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
1480         * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
1481         (WebCore):
1482         (WebKitNamedFlowCollection):
1483         (WebCore::WebKitNamedFlowCollection::create):
1484         (WebCore::WebKitNamedFlowCollection::document):
1485         * rendering/FlowThreadController.cpp:
1486         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
1487         (WebCore::FlowThreadController::removeFlowThread):
1488         (WebCore):
1489         * rendering/FlowThreadController.h:
1490         (FlowThreadController):
1491         * rendering/RenderNamedFlowThread.cpp:
1492         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1493         (WebCore):
1494         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1495         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1496         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
1497         (WebCore::RenderNamedFlowThread::flowThreadName):
1498         (WebCore::RenderNamedFlowThread::willBeDestroyed):
1499         * rendering/RenderNamedFlowThread.h:
1500         (RenderNamedFlowThread):
1501         (WebCore::RenderNamedFlowThread::contentNodes):
1502         (WebCore::RenderNamedFlowThread::canBeDestroyed):
1503
1504 2012-07-13  Vineet Chaudhary  <rgf748@motorola.com>
1505
1506         [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
1507         https://bugs.webkit.org/show_bug.cgi?id=91056
1508
1509         Reviewed by Kentaro Hara.
1510
1511         Currently the V8 implementation validates that the passed object is a sequence type only
1512         for MessagePort in V8Utilities::extractTransferables().
1513         There should be generalised method for other types too.
1514         Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
1515
1516         No new test, Just refactoring. There should be no behavioral changes.
1517
1518         * bindings/v8/V8Binding.h:
1519         (WebCore::toV8Sequence): Added implementation of toV8Sequence().
1520
1521 2012-07-13  Zeno Albisser  <zeno@webkit.org>
1522
1523         [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
1524         https://bugs.webkit.org/show_bug.cgi?id=90881
1525
1526         Add a GLX based GraphicsSurface implementation for Linux.
1527         Native X windows are being used for exchanging textures
1528         with the UIProcess.
1529
1530         Reviewed by Noam Rosenthal.
1531
1532         * Target.pri:
1533         * WebCore.pri:
1534         * platform/graphics/surfaces/GraphicsSurface.cpp:
1535         (WebCore::GraphicsSurface::create):
1536             Move creating GraphicsSurface instance into
1537             platformCreate/platformImport functions to allow
1538             platform specific creation based on the provided flags.
1539         (WebCore::GraphicsSurface::GraphicsSurface):
1540         (WebCore::GraphicsSurface::~GraphicsSurface):
1541             Call platformDestroy when destroying a GraphicsSurface.
1542         (WebCore):
1543         * platform/graphics/surfaces/GraphicsSurface.h:
1544             Make platformCreate/platformImport functions static
1545             to be able to call these from the static create function.
1546             Add Destructor prototype and add GraphicsSurfacePrivate member.
1547         (WebCore):
1548         (GraphicsSurface):
1549         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1550         (WebCore):
1551         (WebCore::GraphicsSurface::platformCreate):
1552         (WebCore::GraphicsSurface::platformImport):
1553             Insert creation of GraphicsSurface instance.
1554             This allows having a platform specific creation mechanism
1555             for GLX.
1556         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
1557         (WebCore):
1558         (OffScreenRootWindow):
1559         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1560         (WebCore::OffScreenRootWindow::get):
1561         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1562             Add an OffScreenRootWindow singelton that is being used
1563             as a parent for all native offscreen windows.
1564         (GraphicsSurfacePrivate):
1565             This class is used to manage all the X related resources
1566             such as opening a display or creating XPixmaps etc.
1567         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1568             Open a connection to the X server and create a
1569             QOpenGLContext that can be used to resolve GL functions.
1570         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1571             Properly cleanup and release all the X resources again.
1572         (WebCore::GraphicsSurfacePrivate::createSurface):
1573             Create a surface that is placed off screen and can be
1574             used as a rendering target by the WebProcess.
1575         (WebCore::GraphicsSurfacePrivate::createPixmap):
1576             Create a GLXPixmap from the XWindow that was previously
1577             redirected by the WebProcess. This GLXPixmap can then be
1578             bound to a texture and being painted on screen by the
1579             UIProcess.
1580         (WebCore::GraphicsSurfacePrivate::makeCurrent):
1581         (WebCore::GraphicsSurfacePrivate::swapBuffers):
1582         (WebCore::GraphicsSurfacePrivate::display):
1583         (WebCore::GraphicsSurfacePrivate::glxPixmap):
1584         (WebCore::GraphicsSurfacePrivate::size):
1585         (WebCore::GraphicsSurfacePrivate::glContext):
1586         (WebCore::resolveGLMethods):
1587             Initialize all the function pointers for the GL functions used.
1588         (WebCore::GraphicsSurface::platformExport):
1589         (WebCore::GraphicsSurface::platformGetTextureID):
1590             Bind the GLXPixmap to a texture.
1591         (WebCore::GraphicsSurface::platformCopyToGLTexture):
1592             Not beeing implemented for GLX.
1593         (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1594             Blit origin fbo onto the GraphicsSurface's backing.
1595         (WebCore::GraphicsSurface::platformCreate):
1596         (WebCore::GraphicsSurface::platformImport):
1597         (WebCore::GraphicsSurface::platformLock):
1598         (WebCore::GraphicsSurface::platformUnlock):
1599         (WebCore::GraphicsSurface::platformDestroy):
1600
1601 2012-07-13  Dongwoo Im  <dw.im@samsung.com>
1602
1603         CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
1604         https://bugs.webkit.org/show_bug.cgi?id=91198
1605
1606         Reviewed by Kentaro Hara.
1607
1608         'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
1609
1610         No new tests. Covered by existing tests.
1611
1612         * bindings/scripts/CodeGeneratorJS.pm:
1613         (GenerateImplementation):
1614
1615 2012-07-13  Yoshifumi Inoue  <yosin@chromium.org>
1616
1617         REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
1618         https://bugs.webkit.org/show_bug.cgi?id=91197
1619
1620         Reviewed by Kent Tamura.
1621
1622         This patch fixes implementation of Decimal::ceiling() and floor().
1623         They return wrong value for small fractional numbers.
1624
1625         The bug is occurred when:
1626           - Step-able input type, e.g. number, date, datetime, and so on.
1627           - Current value is step mismatched
1628           - Current value is smaller than step
1629           - Step up/down by spin button
1630         because spin button up/down actions are implemented in InputType::setpUpFromRenderer
1631         which calls Decimal::ceiling() and floor() for step mismatched case.
1632
1633         Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
1634                WebKit/chromium/tests/DecimalTest.cpp: Added test cases
1635
1636         * platform/Decimal.cpp:
1637         (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
1638         (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
1639
1640 2012-07-13  Dominic Mazzoni  <dmazzoni@google.com>
1641
1642         Should be possible to focus elements within canvas fallback content
1643         https://bugs.webkit.org/show_bug.cgi?id=87898
1644
1645         Reviewed by Chris Fleizach.
1646
1647         Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
1648         to make elements focusable if they're a descendent of a canvas element
1649         if they would otherwise have been focusable but just didn't have
1650         a renderer. Adds a bit to ElementRareData to efficiently keep track
1651         of elements in a canvas subtree.
1652
1653         Test: fast/canvas/fallback-content.html
1654
1655         * dom/Element.cpp:
1656         (WebCore::Element::attach):
1657         (WebCore::Element::detach):
1658         (WebCore::Element::setIsInCanvasSubtree):
1659         (WebCore):
1660         (WebCore::Element::isInCanvasSubtree):
1661         * dom/Element.h:
1662         (Element):
1663         * dom/ElementRareData.h:
1664         (ElementRareData):
1665         (WebCore::ElementRareData::ElementRareData):
1666         * dom/Node.cpp:
1667         (WebCore::Node::isFocusable):
1668         * html/HTMLCanvasElement.cpp:
1669         (WebCore::HTMLCanvasElement::attach):
1670         (WebCore):
1671         * html/HTMLCanvasElement.h:
1672         (HTMLCanvasElement):
1673         * html/HTMLFormControlElement.cpp:
1674         (WebCore::HTMLFormControlElement::isFocusable):
1675
1676 2012-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1677
1678         [GTK] Add API to get HTTPS status to WebKit2 GTK+
1679         https://bugs.webkit.org/show_bug.cgi?id=91100
1680
1681         Reviewed by Martin Robinson.
1682
1683         * platform/network/soup/ResourceResponse.h:
1684         (WebCore::ResourceResponse::soupMessageCertificate): Return the
1685         certificate.
1686         (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
1687         certificate.
1688         (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
1689         errors.
1690         (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
1691         errors.
1692         * platform/network/soup/ResourceResponseSoup.cpp:
1693         (WebCore::ResourceResponse::toSoupMessage): Set the certificate
1694         and TLS errors to the newly created SoupMessage.
1695         (WebCore::ResourceResponse::updateFromSoupMessage): Get the
1696         certificate and TLS errors from the SoupMessage.
1697
1698 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
1699
1700         RadioNodeList is not updated upon input type change
1701         https://bugs.webkit.org/show_bug.cgi?id=91178
1702
1703         Reviewed by Alexey Proskuryakov.
1704
1705         Invalidate the radio node lists when type content attribute changes since it excludes
1706         image type input elements.
1707
1708         Test: fast/forms/radionodelist-image-type.html
1709
1710         * dom/Document.cpp:
1711         (WebCore::shouldInvalidateNodeListForType):
1712         * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
1713         since listing all attribute name isn't useful at this point.
1714         * html/RadioNodeList.cpp:
1715         (WebCore::RadioNodeList::RadioNodeList):
1716
1717 2012-07-12  Dongwoo Im  <dw.im@samsung.com>
1718
1719         CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
1720         https://bugs.webkit.org/show_bug.cgi?id=91185
1721
1722         Reviewed by Kentaro Hara.
1723
1724         When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
1725
1726         No new tests. Covered by existing tests.
1727
1728         * bindings/scripts/CodeGeneratorJS.pm:
1729         (GenerateImplementation):
1730
1731 2012-07-12  Yoshifumi Inoue  <yosin@chromium.org>
1732
1733         REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
1734         https://bugs.webkit.org/show_bug.cgi?id=91062
1735
1736         Reviewed by Kent Tamura.
1737
1738         This patch changes value of StepRange::acceptableError to zero for
1739         integer restricted step value.
1740
1741         No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
1742
1743         * html/StepRange.cpp:
1744         (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
1745
1746 2012-07-12  Dan Bernstein  <mitz@apple.com>
1747
1748         Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
1749         terminate the search at the last word boundary before the given index.
1750
1751         Reviewed by Adele Peterson.
1752
1753         No test, because the current version of Core Foundation ignores the options parameter.
1754
1755         * platform/text/cf/HyphenationCF.cpp:
1756         (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
1757
1758 2012-07-12  Eric Seidel  <eric@webkit.org>
1759
1760         Incorrect behaviour calling Range setStart or setEnd with boundary in different document
1761         https://bugs.webkit.org/show_bug.cgi?id=42517
1762
1763         Reviewed by Ojan Vafai.
1764
1765         Added a new static inline "checkForDifferentRootContainer" to share some code
1766         and made setStart/setEnd do the right thing in the x-document case.  I removed
1767         the bogus checks in set*After/set*Before functions, and since they just call
1768         through to setStart/setEnd, they also now do the right thing.
1769
1770         Test: fast/dom/Range/set-wrong-document-err.html
1771
1772         * dom/Range.cpp:
1773         (WebCore::checkForDifferentRootContainer):
1774         (WebCore):
1775         (WebCore::Range::setStart):
1776         (WebCore::Range::setEnd):
1777         (WebCore::Range::setStartAfter):
1778         (WebCore::Range::setEndBefore):
1779         (WebCore::Range::setEndAfter):
1780         (WebCore::Range::setStartBefore):
1781
1782 2012-07-12  Erik Arvidsson  <arv@chromium.org>
1783
1784         [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
1785         https://bugs.webkit.org/show_bug.cgi?id=91165
1786
1787         Reviewed by Nate Chapin.
1788
1789         The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
1790
1791         No new tests. No change in functionality.
1792
1793         * bindings/scripts/CodeGeneratorV8.pm:
1794         (GenerateNormalAttrSetter):
1795
1796 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1797
1798         Build fix. Initialize unused const member variables to make compilers happy.
1799
1800         * dom/DynamicNodeList.h:
1801         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1802
1803 2012-07-12  Konrad Piascik  <kpiascik@rim.com>
1804
1805         Web Inspector: Geolocation override
1806         https://bugs.webkit.org/show_bug.cgi?id=89365
1807
1808         Reviewed by Pavel Feldman.
1809
1810         Reverted original patch.
1811         Change has not been reviewed by the right people. It declares
1812         public protocol methods and is wrong in several ways.
1813
1814         * Modules/geolocation/GeolocationController.cpp:
1815         (WebCore::GeolocationController::GeolocationController):
1816         (WebCore::GeolocationController::positionChanged):
1817         * Modules/geolocation/GeolocationController.h:
1818         (GeolocationController):
1819         * inspector/Inspector.json:
1820         * inspector/InspectorInstrumentation.cpp:
1821         (WebCore):
1822         * inspector/InspectorInstrumentation.h:
1823         (WebCore):
1824         (InspectorInstrumentation):
1825         * inspector/InspectorPageAgent.cpp:
1826         (WebCore::InspectorPageAgent::InspectorPageAgent):
1827         * inspector/InspectorPageAgent.h:
1828         * inspector/front-end/Settings.js:
1829         * inspector/front-end/SettingsScreen.js:
1830         (WebInspector.UserAgentSettingsTab):
1831         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1832         * inspector/front-end/UserAgentSupport.js:
1833
1834 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1835
1836         Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
1837         https://bugs.webkit.org/show_bug.cgi?id=91164
1838
1839         Reviewed by Anders Carlsson.
1840
1841         Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
1842
1843         Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
1844         all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
1845         should include descendents that are not direct children of base().
1846
1847         In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
1848
1849         * dom/DynamicNodeList.h:
1850         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1851         (DynamicNodeListCacheBase):
1852         (WebCore::DynamicNodeListCacheBase::type):
1853         (WebCore::DynamicNodeListCacheBase::hasNameCache):
1854         (WebCore::DynamicNodeListCacheBase::setHasNameCache):
1855         (WebCore::DynamicNodeListCacheBase::clearCache):
1856         * html/HTMLCollection.cpp:
1857         (WebCore::shouldOnlyIncludeDirectChildren):
1858         (WebCore::HTMLCollection::HTMLCollection):
1859         (WebCore::HTMLCollection::isAcceptableElement):
1860         (WebCore::nextNode):
1861         (WebCore::HTMLCollection::itemAfter):
1862         * html/HTMLCollection.h:
1863         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1864         (HTMLCollectionCacheBase):
1865         (WebCore::HTMLCollectionCacheBase::clearCache):
1866
1867 2012-07-12  Shinya Kawanaka  <shinyak@chromium.org>
1868
1869         Needs callback before AuthorShadowRoot is added.
1870         https://bugs.webkit.org/show_bug.cgi?id=91167
1871
1872         Reviewed by Hajime Morita.
1873
1874         This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
1875         They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
1876         AuthorShadowRoot before adding UserAgentShadowRoot.
1877
1878         This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
1879         for those elements. See also Bug 77936, Bug 77937, Bug 90532.
1880
1881         * dom/Element.h:
1882         (WebCore::Element::willAddAuthorShadowRoot):
1883         * dom/ElementShadow.cpp:
1884         (WebCore::ElementShadow::addShadowRoot):
1885         * dom/ElementShadow.h:
1886         (ElementShadow):
1887         * dom/ShadowRoot.cpp:
1888         (WebCore::ShadowRoot::create):
1889
1890 2012-07-12  Dana Jansens  <danakj@chromium.org>
1891
1892         [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
1893         https://bugs.webkit.org/show_bug.cgi?id=91023
1894
1895         Reviewed by Adrienne Walker.
1896
1897         Removes the RenderPass pointer and keeps only an integer id in the
1898         quad to refer back to the RenderPass the quad reads from.
1899
1900         Covered by existing tests.
1901
1902         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1903         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1904         (WebCore::findRenderPassById):
1905         (WebCore):
1906         (WebCore::removeRenderPassesRecursive):
1907         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1908         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1909         (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1910         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1911         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1912         (FrameData):
1913         (CullRenderPassesWithCachedTextures):
1914         (CullRenderPassesWithNoQuads):
1915         (CCLayerTreeHostImpl):
1916         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1917         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1918         * platform/graphics/chromium/cc/CCRenderPass.h:
1919         (WebCore):
1920         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
1921         (WebCore::CCRenderPassDrawQuad::create):
1922         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
1923         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
1924         (CCRenderPassDrawQuad):
1925         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1926         (WebCore::CCRenderSurface::appendQuads):
1927         * platform/graphics/chromium/cc/CCRenderSurface.h:
1928         (CCRenderSurface):
1929
1930 2012-07-12  Elliott Sprehn  <esprehn@gmail.com>
1931
1932         Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
1933         https://bugs.webkit.org/show_bug.cgi?id=89900
1934
1935         Reviewed by Eric Seidel and Abhishek Arya.
1936
1937         Previously we would walk the all children a renderer whenever adding
1938         or removing a child renderer from its RenderObjectChildList to look for 
1939         RenderQuote and RenderCounter instances to update. This patch introduces 
1940         a counter in RenderView for the number of RenderQuote and RenderCounter 
1941         instances in that document so we can avoid these traversals.
1942
1943         No tests needed since this is just a short circuiting of logic and the existing
1944         tests should cover it.
1945
1946         * rendering/RenderCounter.cpp:
1947         (WebCore::RenderCounter::RenderCounter): Increment instance counter.
1948         (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
1949         (WebCore):
1950         (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
1951         (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
1952         * rendering/RenderCounter.h:
1953         (RenderCounter):
1954         * rendering/RenderObjectChildList.cpp:
1955         (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
1956         * rendering/RenderQuote.cpp:
1957         (WebCore::RenderQuote::RenderQuote):
1958         (WebCore::RenderQuote::willBeDestroyed):
1959         (WebCore):
1960         (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
1961         (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
1962         * rendering/RenderQuote.h:
1963         (RenderQuote):
1964         * rendering/RenderView.cpp:
1965         (WebCore::RenderView::RenderView):
1966         * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
1967         (RenderView):
1968         (WebCore::RenderView::addRenderQuote):
1969         (WebCore::RenderView::removeRenderQuote):
1970         (WebCore::RenderView::hasRenderQuotes):
1971         (WebCore::RenderView::addRenderCounter):
1972         (WebCore::RenderView::removeRenderCounter):
1973         (WebCore::RenderView::hasRenderCounters):
1974
1975 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
1976
1977         Merge HTMLCollectionWithArrayStorage into HTMLCollection
1978         https://bugs.webkit.org/show_bug.cgi?id=91144
1979
1980         Reviewed by Anders Carlsson.
1981
1982         Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
1983         HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
1984         and merged itemInArrayAfter and itemAfter.
1985
1986         In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
1987         Instead of always computing the length from the beginning, we start the search from the cached item
1988         so that if we're near end of the collection, we avoid significant portion of the node traversal.
1989
1990         Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
1991         set the length cache when it reaches the end of the collection to avoid redundant length calculations.
1992
1993         * dom/DynamicNodeList.h:
1994         (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
1995         * html/HTMLCollection.cpp:
1996         (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
1997         assert that offsetInArray is always 0.
1998         (WebCore): Removed calcLength.
1999         (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
2000         When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
2001         then it must have set the length cache so bail out. If the previous step didn't bail out, then
2002         the item cache is valid and not null (see above), so count the number of remaining items in collection
2003         starting at the cached item's offset + 1.
2004         (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
2005         set the length cache instead.
2006         (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
2007         (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
2008         used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
2009         this function.
2010         (WebCore::HTMLCollection::updateNameCache): Ditto.
2011         * html/HTMLCollection.h:
2012         (HTMLCollection):
2013         (WebCore):
2014         * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
2015         the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
2016         regressing any performance here.
2017         (WebCore::HTMLFormCollection::HTMLFormCollection):
2018         (WebCore::HTMLFormCollection::itemAfter):
2019         * html/HTMLFormCollection.h:
2020         (HTMLFormCollection):
2021         * html/HTMLNameCollection.cpp:
2022         (WebCore::HTMLNameCollection::itemAfter):
2023         * html/HTMLNameCollection.h:
2024         (HTMLNameCollection):
2025         * html/HTMLPropertiesCollection.cpp: Removed calcLength().
2026         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2027         (WebCore::HTMLPropertiesCollection::itemAfter):
2028         (WebCore):
2029         * html/HTMLPropertiesCollection.h:
2030         (HTMLPropertiesCollection):
2031         * html/HTMLTableRowsCollection.cpp:
2032         (WebCore::HTMLTableRowsCollection::itemAfter):
2033         * html/HTMLTableRowsCollection.h:
2034         (HTMLTableRowsCollection):
2035
2036 2012-07-12  Pravin D  <pravind.2k4@gmail.com>
2037
2038         Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
2039         https://bugs.webkit.org/show_bug.cgi?id=16811
2040
2041         Reviewed by Julien Chaffraix.
2042
2043         The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
2044         a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
2045         rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
2046         "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
2047         the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
2048         while calculating the height of this row.
2049         Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
2050         However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
2051         is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
2052         Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row. 
2053
2054         Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
2055
2056         * rendering/RenderTableSection.cpp:
2057         (WebCore::RenderTableSection::calcRowLogicalHeight):
2058         Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
2059
2060 2012-07-12  Joshua Bell  <jsbell@chromium.org>
2061
2062         IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
2063         https://bugs.webkit.org/show_bug.cgi?id=90310
2064
2065         Reviewed by Tony Chang.
2066
2067         Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
2068         other two IDBFactory methods for use by workers as well.
2069
2070         Test: storage/indexeddb/factory-basics-workers.html
2071
2072         * Modules/indexeddb/IDBFactory.cpp:
2073         (isContextValid): Helper function consolidating checks that context is usable.
2074         (getIndexedDBDatabasePath): Helper function for accessing group settings.
2075         (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
2076         (WebCore::IDBFactory::open): Ditto.
2077         (WebCore::IDBFactory::deleteDatabase): Ditto.
2078         (WebCore::IDBFactory::cmp): Whitespace.
2079         * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
2080         (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
2081         (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
2082         (WebCore::IDBFactoryBackendImpl::open): Signature updated.
2083         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2084         (IDBFactoryBackendImpl):
2085         * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
2086         and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
2087         accessed from context) but on the real back end the context is null (as Frame was previously).
2088         (IDBFactoryBackendInterface):
2089         * inspector/InspectorIndexedDBAgent.cpp:
2090         (WebCore):
2091         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
2092         (WebCore::InspectorIndexedDBAgent::requestDatabase):
2093         (WebCore::InspectorIndexedDBAgent::requestData):
2094
2095 2012-07-12  Dana Jansens  <danakj@chromium.org>
2096
2097         [chromium] The root layer should not try create a second RenderSurface for itself
2098         https://bugs.webkit.org/show_bug.cgi?id=91124
2099
2100         Reviewed by Adrienne Walker.
2101
2102         Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
2103
2104         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2105         (WebCore::subtreeShouldRenderToSeparateSurface):
2106
2107 2012-07-12  Adam Barth  <abarth@webkit.org>
2108
2109         Regression (r122359) Layout Test html5lib/runner.html is failing
2110         https://bugs.webkit.org/show_bug.cgi?id=91047
2111
2112         Reviewed by Tony Chang.
2113
2114         This ASSERT is bogus because doctypes can be removed from the DOM and
2115         then re-added.
2116
2117         Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
2118
2119         * dom/Document.cpp:
2120         (WebCore::Document::setDocType):
2121
2122 2012-07-12  Ojan Vafai  <ojan@chromium.org>
2123
2124         Implied minimum size of flex items is min-content
2125         https://bugs.webkit.org/show_bug.cgi?id=87546
2126
2127         Reviewed by Tony Chang.
2128
2129         http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
2130         In the main axis direction, min-size of auto means min-content.
2131
2132         Test: css3/flexbox/flex-item-min-size.html
2133
2134         * rendering/RenderBox.cpp:
2135         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2136         (WebCore::RenderBox::computeContentLogicalHeightUsing):
2137         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2138         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2139         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2140         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2141         It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
2142
2143         * rendering/RenderFlexibleBox.cpp:
2144         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2145         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2146
2147 2012-07-12  Eric Penner  <epenner@google.com>
2148
2149         [chromium] Use CCTexture/TextureAllocator and remove TextureManager
2150         https://bugs.webkit.org/show_bug.cgi?id=91001
2151
2152         Reviewed by Adrienne Walker.
2153
2154         Use CCTexture to clean up CCPrioritizedTexture::Backing.
2155         Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
2156         Minor move/refactoring of link/unlink in CCPrioritizedTexture.
2157         Remove double initialization of the default memory limit.
2158
2159         Covered by existing tests (refactoring).
2160
2161         * WebCore.gypi:
2162         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2163         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2164         (WebCore):
2165         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2166         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2167         (WebCore):
2168         * platform/graphics/chromium/ImageLayerChromium.cpp:
2169         * platform/graphics/chromium/LayerRendererChromium.cpp:
2170         (WebCore::LayerRendererChromium::initialize):
2171         * platform/graphics/chromium/ManagedTexture.cpp: Removed.
2172         * platform/graphics/chromium/ManagedTexture.h: Removed.
2173         * platform/graphics/chromium/RenderSurfaceChromium.h:
2174         (WebCore):
2175         * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
2176         (WebCore):
2177         (TextureAllocator):
2178         (WebCore::TextureAllocator::~TextureAllocator):
2179         * platform/graphics/chromium/TextureManager.cpp: Removed.
2180         * platform/graphics/chromium/TextureManager.h: Removed.
2181         * platform/graphics/chromium/TiledLayerChromium.cpp:
2182         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
2183         (WebCore::TrackingTextureAllocator::createTexture):
2184         (WebCore::TrackingTextureAllocator::deleteTexture):
2185         * platform/graphics/chromium/TrackingTextureAllocator.h:
2186         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2187         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2188         (WebCore::CCLayerTreeHost::prioritizeTextures):
2189         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2190         (WebCore):
2191         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2192         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2193         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
2194         (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
2195         (WebCore::CCPrioritizedTexture::setDimensions):
2196         (WebCore::CCPrioritizedTexture::textureId):
2197         (WebCore::CCPrioritizedTexture::bindTexture):
2198         (WebCore::CCPrioritizedTexture::framebufferTexture2D):
2199         (WebCore::CCPrioritizedTexture::link):
2200         (WebCore):
2201         (WebCore::CCPrioritizedTexture::unlink):
2202         * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
2203         (WebCore):
2204         (WebCore::CCPrioritizedTexture::bytes):
2205         (CCPrioritizedTexture):
2206         (WebCore::CCPrioritizedTexture::haveBackingTexture):
2207         (WebCore::CCPrioritizedTexture::Backing::Backing):
2208         (WebCore::CCPrioritizedTexture::Backing::~Backing):
2209         (WebCore::CCPrioritizedTexture::Backing::owner):
2210         (Backing):
2211         (WebCore::CCPrioritizedTexture::backing):
2212         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
2213         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
2214         (WebCore::CCPrioritizedTextureManager::requestLate):
2215         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
2216         (WebCore::CCPrioritizedTextureManager::reduceMemory):
2217         (WebCore::CCPrioritizedTextureManager::clearAllMemory):
2218         (WebCore::CCPrioritizedTextureManager::registerTexture):
2219         (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
2220         (WebCore::CCPrioritizedTextureManager::createBacking):
2221         (WebCore::CCPrioritizedTextureManager::destroyBacking):
2222         (WebCore::CCPrioritizedTextureManager::assertInvariants):
2223         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
2224         (CCPrioritizedTextureManager):
2225         (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
2226         (WebCore::CCPrioritizedTextureManager::compareBackings):
2227         * platform/graphics/chromium/cc/CCPriorityCalculator.h:
2228         * platform/graphics/chromium/cc/CCScopedTexture.cpp:
2229         * platform/graphics/chromium/cc/CCScopedTexture.h:
2230         * platform/graphics/chromium/cc/CCTexture.h:
2231         (WebCore::CCTexture::CCTexture):
2232         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2233         (WebCore):
2234         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2235
2236 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
2237
2238         Let XCode have its own way.
2239
2240         * WebCore.xcodeproj/project.pbxproj:
2241
2242 2012-07-12  Julien Chaffraix  <jchaffraix@webkit.org>
2243
2244         ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content
2245         https://bugs.webkit.org/show_bug.cgi?id=91003
2246
2247         Reviewed by Abhishek Arya.
2248
2249         Tests: fast/flexbox/assert-generated-deprecated-flexbox.html
2250                fast/flexbox/assert-generated-new-flexbox.html
2251
2252         The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would
2253         make us update the wrong children (and not propagate the style updates properly).
2254
2255         * rendering/RenderObjectChildList.cpp:
2256         (WebCore::findBeforeAfterParent):
2257         Added a check for flex boxes (both deprecated and new).
2258
2259 2012-07-12  Pravin D  <pravind.2k4@gmail.com>
2260
2261         Percentage width replaced element in zero percent/fixed width container block incorrectly rendered.
2262         https://bugs.webkit.org/show_bug.cgi?id=9493
2263
2264         Reviewed by Andy Estes.
2265
2266         When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero.
2267
2268         Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html
2269
2270         * rendering/RenderBox.cpp:
2271         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2272           When the containing block's available width is zero there can be two cases.
2273           The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width.
2274           On the other hand if the width of the container is specified to be either zero percent or fixed value then the width of the
2275           replaced elment must be zero.
2276
2277 2012-07-11  Ryosuke Niwa  <rniwa@webkit.org>
2278
2279         invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
2280         https://bugs.webkit.org/show_bug.cgi?id=91046
2281
2282         Reviewed by Anders Carlsson.
2283
2284         Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
2285         to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
2286         registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
2287         which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
2288         attribute change should result in node list invalidations.
2289
2290         Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.
2291
2292         * dom/ChildNodeList.cpp:
2293         (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
2294         * dom/ClassNodeList.cpp:
2295         (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
2296         * dom/Document.cpp:
2297         (WebCore::Document::Document): Initialize m_nodeListCounts.
2298         (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
2299         m_collections are all empty.
2300         (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
2301         to just ones rooted at the document in order to increment the counter for each invalidation type.
2302         (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
2303         (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
2304         (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
2305         type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
2306         then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
2307         "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
2308         to share logic and detect future addition of values to NodeListInvalidationType.
2309         * dom/Document.h:
2310         (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
2311         NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
2312         now contains 6 values instead of 2.
2313         * dom/DynamicNodeList.cpp:
2314         (WebCore):
2315         * dom/DynamicNodeList.h:
2316         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): 
2317         (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
2318         (WebCore::DynamicNodeListCacheBase::rootType): Added.
2319         (WebCore::DynamicNodeListCacheBase::invalidationType): Added.
2320         (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
2321         (WebCore::DynamicNodeList::DynamicNodeList):
2322         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
2323         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
2324         * dom/MicroDataItemList.cpp:
2325         (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
2326         * dom/NameNodeList.cpp:
2327         (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
2328         * dom/Node.cpp:
2329         (WebCore::Node::clearRareData):
2330         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
2331         to shouldInvalidateDynamicSubtreeNodeList.
2332         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
2333         (WebCore::Node::getElementsByTagName):
2334         (WebCore::Node::getElementsByTagNameNS):
2335         (WebCore::Node::getElementsByName):
2336         (WebCore::Node::getElementsByClassName):
2337         (WebCore::Node::radioNodeList):
2338         (WebCore::NodeRareData::createNodeLists):
2339         * dom/NodeRareData.h:
2340         (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
2341         need to be accounted in m_nodeListCounts.
2342         (WebCore::NodeRareData::ensureNodeLists):
2343         (NodeRareData):
2344         * dom/TagNodeList.cpp:
2345         (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
2346         * dom/TreeScope.cpp:
2347         (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
2348         * dom/TreeScope.h:
2349         (TreeScope): Removed m_numNodeListCaches.
2350         * dom/TreeScopeAdopter.cpp:
2351         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2352         * html/HTMLCollection.h:
2353         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
2354         it's never used in HTMLCollections.
2355         * html/LabelableElement.cpp:
2356         (WebCore::LabelableElement::labels):
2357         * html/LabelsNodeList.cpp:
2358         (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
2359         (WebCore::LabelsNodeList::~LabelsNodeList):
2360         * html/RadioNodeList.cpp:
2361         (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
2362         (WebCore::RadioNodeList::~RadioNodeList):
2363
2364 2012-07-12  Gavin Barraclough  <barraclough@apple.com>
2365
2366         Threadsafety issues in WebScriptObject
2367         https://bugs.webkit.org/show_bug.cgi?id=90849
2368
2369         Reviewed by Filip Pizlo & Oliver Hunt.
2370
2371         Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
2372         may not be safe; better to just guard the JSWrapperCache with its own spinlock.
2373
2374         * bindings/objc/WebScriptObject.mm:
2375         (WebCore::getJSWrapper):
2376             - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
2377               to wait for the caller to do so, due to a race condition vs release removing
2378               the wrapper from the map.
2379         (WebCore::addJSWrapper):
2380             - Take the spinlock guarding the cache.
2381         (WebCore::removeJSWrapper):
2382             - Take the spinlock guarding the cache.
2383         (WebCore::removeJSWrapperIfRetainCountOne):
2384             - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
2385         (WebCore::createJSWrapper):
2386             - Remove the API lock; this method no longer needs to retain/autorelease (this is
2387               done by getJSWrapper).
2388         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2389             - Remove the API lock.
2390         (-[WebScriptObject release]):
2391             - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.
2392
2393 2012-07-11  David Hyatt  <hyatt@apple.com>
2394
2395         https://bugs.webkit.org/show_bug.cgi?id=91000
2396         REGRESSION (r122244): Overflow elements don't shrink as much as they should.
2397
2398         Reviewed by Simon Fraser.
2399
2400         This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646.
2401
2402         I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back
2403         in an incorrect minimum width check from long ago.
2404         
2405         What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue 
2406         with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn
2407         exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't
2408         actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins.
2409
2410         The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their
2411         positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means
2412         that you can need to lay out again despite not actually having to move.
2413         
2414         To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if
2415         the logical top estimate matches the final position.
2416         
2417         No new tests required, since the test in fast/block/float is now correctly covering the issue.
2418
2419         * rendering/RenderBlock.cpp:
2420         (WebCore::RenderBlock::layoutBlockChild):
2421         (WebCore::RenderBlock::getClearDelta):
2422         * rendering/RenderBox.cpp:
2423         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2424
2425 2012-07-12  James Weatherall  <wez@chromium.org>
2426
2427         storage tests are flaky (crashing) on windows
2428         https://bugs.webkit.org/show_bug.cgi?id=90469
2429
2430         Reviewed by Kentaro Hara.
2431
2432         Add a missing check that the underlying V8 object reference in a V8 NPObject is valid, and zero the NPObject's rootObject member when disposing it, to ensure that it won't be mistakenly touched after that point.
2433
2434         This patch is intended to resolve flakiness in the storage tests including:
2435           storage/indexeddb/mozilla/indexes.html
2436           storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
2437           storage/websql/multiple-databases-garbage-collection.html
2438
2439         * bindings/v8/NPV8Object.cpp:
2440         (WebCore::disposeUnderlyingV8Object):
2441         Zero the NPObject's underlying rootObject.
2442         (_NPN_EvaluateHelper):
2443         Add check that the underlying V8 object reference is valid.
2444
2445 2012-07-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
2446
2447         Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
2448         https://bugs.webkit.org/show_bug.cgi?id=91111
2449
2450         Reviewed by Kenneth Rohde Christiansen.
2451
2452         TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want
2453         to use them for other purposes as well. Moving them to platform/graphics would make that
2454         more explicit.
2455
2456         No new tests, moving files around.
2457
2458         * GNUmakefile.list.am:
2459         * Target.pri:
2460         * WebCore.gypi:
2461         * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
2462         * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
2463         * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp.
2464         * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h.
2465         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2466         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2467         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2468         (GraphicsLayerTextureMapper):
2469         * platform/graphics/texmap/TextureMapperLayer.h:
2470         (TextureMapperLayer):
2471         (WebCore::TextureMapperLayer::setAnimatedTransform):
2472         (WebCore::TextureMapperLayer::setAnimatedOpacity):
2473
2474 2012-07-12  Vsevolod Vlasov  <vsevik@chromium.org>
2475
2476         Web Inspector: Simplify UISourceCode code after moving revisions support inside it.
2477         https://bugs.webkit.org/show_bug.cgi?id=91118
2478
2479         Reviewed by Pavel Feldman.
2480
2481         * inspector/front-end/UISourceCode.js:
2482         (WebInspector.UISourceCode.prototype._setContent):
2483         (WebInspector.UISourceCode.prototype.revertToOriginal):
2484         (WebInspector.UISourceCode.prototype.revertAndClearHistory):
2485         (WebInspector.UISourceCode.prototype.contentChanged):
2486         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2487         (WebInspector.Revision.prototype.revertToThis):
2488
2489 2012-07-12  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2490
2491         Unreviewed. Build fix for r122462.
2492
2493         * platform/qt/MemoryUsageSupportQt.cpp:
2494
2495 2012-07-12  Vsevolod Vlasov  <vsevik@chromium.org>
2496
2497         Web Inspector: Remove resources panel edited resources search support.
2498         https://bugs.webkit.org/show_bug.cgi?id=91101
2499
2500         Reviewed by Pavel Feldman.
2501
2502         * inspector/front-end/ResourcesPanel.js:
2503         (WebInspector.ResourcesPanel.prototype.performSearch.callback):
2504         (WebInspector.ResourcesPanel.prototype.performSearch):
2505
2506 2012-07-12  Vsevolod Vlasov  <vsevik@chromium.org>
2507
2508         Unreviewed r122460 inspector closure compilation fix follow up.
2509
2510         * inspector/front-end/RevisionHistoryView.js:
2511         (WebInspector.RevisionHistoryView):
2512
2513 2012-07-12  Ilya Tikhonovsky  <loislo@chromium.org>
2514
2515         Web Inspector: fix native memory instrumentation code for the bindings instrumentation.
2516         https://bugs.webkit.org/show_bug.cgi?id=91096
2517
2518         The instrumented class has to have instrumentation method which reports class size and type and
2519         the member objects and pointers.
2520
2521         Sample:
2522         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2523         {
2524             memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type.
2525             TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2526             ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2527             memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer.
2528             memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer.
2529             memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object.
2530         }
2531
2532         Reviewed by Pavel Feldman.
2533
2534         Existing tests for native memory instrumentation.
2535
2536         * bindings/v8/DOMDataStore.cpp:
2537         (WebCore::DOMDataStore::reportMemoryUsage):
2538         * bindings/v8/DOMDataStore.h:
2539         (WebCore):
2540         (DOMDataStore):
2541         * bindings/v8/IntrusiveDOMWrapperMap.h:
2542         (WebCore::ChunkedTable::reportMemoryUsage):
2543         * bindings/v8/ScriptProfiler.cpp:
2544         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2545         * bindings/v8/V8Binding.cpp:
2546         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2547         (WebCore::StringCache::reportMemoryUsage):
2548         * bindings/v8/V8Binding.h:
2549         (WebCore):
2550         (StringCache):
2551         (V8BindingPerIsolateData):
2552         * bindings/v8/V8DOMMap.h:
2553         (WebCore):
2554         (AbstractWeakReferenceMap):
2555         * inspector/InspectorMemoryAgent.cpp:
2556         (WebCore):
2557
2558 2012-07-12  Pavel Feldman  <pfeldman@chromium.org>
2559
2560         Web Inspector: beautify find bar looks, simplify search update routines.
2561         https://bugs.webkit.org/show_bug.cgi?id=91087
2562
2563         Reviewed by Vsevolod Vlasov.
2564
2565         This change updates the looks to the one on the screenshots and simplifies match count update routines.
2566
2567         * inspector/front-end/SearchController.js:
2568         (WebInspector.SearchController.onMatchesMouseDown):
2569         (WebInspector.SearchController):
2570         (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
2571         (WebInspector.SearchController.prototype.activePanelChanged):
2572         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2573         (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
2574         (WebInspector.SearchController.prototype._onKeyDown):
2575         (WebInspector.SearchController.prototype._onInput):
2576         (WebInspector.SearchController.prototype._onNextButtonSearch):
2577         (WebInspector.SearchController.prototype._onPrevButtonSearch):
2578         (WebInspector.SearchController.prototype._performSearch):
2579         * inspector/front-end/inspector.css:
2580         (#search):
2581         (#search:focus):
2582         (.toolbar-search-navigation-controls):
2583         (.toolbar-search-navigation):
2584         (.toolbar-search-navigation.enabled:hover):
2585         (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active):
2586         (.toolbar-search):
2587         (.toolbar-search-control):
2588         (.search-results-matches):
2589         (.inspector-footer):
2590
2591 2012-07-12  Joshua Bell  <jsbell@chromium.org>
2592
2593         IndexedDB: ASSERT hit calling open from callback in Worker
2594         https://bugs.webkit.org/show_bug.cgi?id=90832
2595
2596         Reviewed by Kentaro Hara.
2597
2598         GroupSettings are used to provide the backing store path in some
2599         ports. Accessing those settings from a Worker was added, but the
2600         access referenced thread startup data that is cleared before the
2601         run loop, so an IDBFactory.open() call executed asynchronously
2602         would dereference a null pointer. Plumb the settings startup
2603         data into the context itself, like all of the other properties.
2604
2605         Test: storage/indexeddb/open-twice-workers.html
2606
2607         * Modules/indexeddb/IDBFactory.cpp:
2608         (WebCore::IDBFactory::open):
2609         * workers/DedicatedWorkerContext.cpp:
2610         (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2611         * workers/DedicatedWorkerContext.h:
2612         (WebCore::DedicatedWorkerContext::create):
2613         (DedicatedWorkerContext):
2614         * workers/DedicatedWorkerThread.cpp:
2615         (WebCore::DedicatedWorkerThread::createWorkerContext):
2616         * workers/DedicatedWorkerThread.h:
2617         (DedicatedWorkerThread):
2618         * workers/SharedWorkerContext.cpp:
2619         (WebCore::SharedWorkerContext::SharedWorkerContext):
2620         * workers/SharedWorkerContext.h:
2621         (WebCore::SharedWorkerContext::create):
2622         (SharedWorkerContext):
2623         * workers/SharedWorkerThread.cpp:
2624         (WebCore::SharedWorkerThread::createWorkerContext):
2625         * workers/SharedWorkerThread.h:
2626         (SharedWorkerThread):
2627         * workers/WorkerContext.cpp:
2628         (WebCore::WorkerContext::WorkerContext):
2629         * workers/WorkerContext.h:
2630         (WebCore::WorkerContext::groupSettings):
2631         (WorkerContext):
2632         * workers/WorkerThread.cpp:
2633         (WebCore::WorkerThread::workerThread):
2634         * workers/WorkerThread.h:
2635         (WorkerThread):
2636
2637 2012-07-12  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2638
2639         [Qt] Implement MemoryUsageSupport
2640         https://bugs.webkit.org/show_bug.cgi?id=91094
2641
2642         Reviewed by Adam Barth.
2643
2644         Implements Qt versions of the memory-usage functions using the information we have available
2645         from the various memory systems used in WebKit.
2646
2647         Also gets rid of a redundant indirection in V8GCController.
2648
2649         * Target.pri:
2650         * bindings/v8/V8GCController.cpp:
2651         (WebCore::V8GCController::gcEpilogue):
2652         (WebCore::V8GCController::checkMemoryUsage):
2653         * platform/qt/MemoryUsageSupportQt.cpp: Added.
2654         (WebCore::mallocMemoryUsage):
2655         (WebCore::memoryUsageKB):
2656         (WebCore::actualMemoryUsageKB):
2657         (WebCore::MemoryUsageSupport::memoryUsageMB):
2658         (WebCore::MemoryUsageSupport::actualMemoryUsageMB):
2659         (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2660         (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2661         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2662         (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
2663         * platform/qt/PlatformSupport.h:
2664         (PlatformSupport):
2665
2666 2012-07-12  Vsevolod Vlasov  <vsevik@chromium.org>
2667
2668         Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced.
2669         https://bugs.webkit.org/show_bug.cgi?id=91095
2670
2671         Reviewed by Pavel Feldman.
2672
2673         RevisionHistoryView is now reset in WorkspaceReset event handler.
2674         UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace.
2675
2676         * inspector/front-end/RevisionHistoryView.js:
2677         (WebInspector.RevisionHistoryView):
2678         (WebInspector.RevisionHistoryView.prototype._clearHistory):
2679         (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2680         (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced):
2681         * inspector/front-end/ScriptsPanel.js:
2682         (WebInspector.ScriptsPanel.prototype._reset):
2683
2684 2012-07-12  Dongwoo Im  <dw.im@samsung.com>
2685
2686         InspectorFileSystemAgent.cpp have to include File.h explicitly
2687         https://bugs.webkit.org/show_bug.cgi?id=91078
2688
2689         Reviewed by Vsevolod Vlasov.
2690
2691         Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly.
2692
2693         No new tests. Covered by existing tests.
2694
2695         * inspector/InspectorFileSystemAgent.cpp: Include File.h
2696
2697 2012-07-12  Vsevolod Vlasov  <vsevik@chromium.org>
2698
2699         Web Inspector: [Regression] Stale revisions should be removed on navigation.
2700         https://bugs.webkit.org/show_bug.cgi?id=91080
2701
2702         Reviewed by Pavel Feldman.
2703
2704         Moved all the code responsible for script mapping resetting to Workspace.
2705         Stale revisions are removed in Workspace._reset now.
2706
2707         * inspector/front-end/ScriptSnippetModel.js:
2708         (WebInspector.ScriptSnippetModel):
2709         * inspector/front-end/StylesPanel.js:
2710         (WebInspector.StylesUISourceCodeProvider):
2711         (WebInspector.StylesUISourceCodeProvider.prototype._populate):
2712         (WebInspector.StylesUISourceCodeProvider.prototype.reset):
2713         * inspector/front-end/UISourceCode.js:
2714         (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
2715         * inspector/front-end/Workspace.js:
2716         (WebInspector.Workspace):
2717         (WebInspector.Workspace.prototype._reset):
2718
2719 2012-07-12  Andreas Kling  <kling@webkit.org>
2720
2721         Make ElementAttributeData a variable-sized object to reduce memory use.
2722         <http://webkit.org/b/88240>
2723
2724         Reviewed by Antti "Obi-Wan" Koivisto.
2725
2726         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2727         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2728         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2729         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2730
2731         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2732         that nothing tries to mutate an element with a raw attribute array.
2733
2734         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2735         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2736
2737         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2738         That is a ~35% reduction in DOM attribute memory use.
2739
2740         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2741         adding of "class" attributes. For more static pages, savings are even greater.
2742
2743         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2744         needed. Not a big deal but avoids double lookup of attributes when removing them.
2745
2746         * css/PropertySetCSSStyleDeclaration.cpp:
2747         (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2748
2749             Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with.
2750             May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's
2751             attribute data.
2752
2753         * css/StylePropertySet.cpp:
2754         (WebCore::StylePropertySet::adoptCSSOMWrapperFrom):
2755
2756             Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper
2757             identity (web facing behavior.)
2758
2759         * dom/Element.cpp:
2760         (WebCore::Element::detachAttribute):
2761         (WebCore::Element::removeAttribute):
2762         (WebCore::Element::attributes):
2763         (WebCore::Element::setAttributeInternal):
2764         (WebCore::Element::parserSetAttributes):
2765         (WebCore::Element::hasEquivalentAttributes):
2766         (WebCore::Element::setAttributeNode):
2767         (WebCore::Element::removeAttributeNode):
2768         (WebCore::Element::getAttributeNode):
2769         (WebCore::Element::getAttributeNodeNS):
2770         (WebCore::Element::hasAttribute):
2771         (WebCore::Element::hasAttributeNS):
2772         (WebCore::Element::normalizeAttributes):
2773         (WebCore::Element::cloneAttributesFromElement):
2774         (WebCore::Element::createMutableAttributeData):
2775         * dom/Element.h:
2776         (WebCore::Element::attributeData):
2777         (Element):
2778         (WebCore::Element::updatedAttributeData):
2779         (WebCore::Element::ensureAttributeData):
2780         (WebCore::Element::ensureUpdatedAttributeData):
2781         (WebCore::Element::mutableAttributeData):
2782         (WebCore):
2783         * dom/ElementAttributeData.cpp:
2784         (WebCore::ElementAttributeData::createImmutable):
2785         (WebCore):
2786         (WebCore::ElementAttributeData::ElementAttributeData):
2787         (WebCore::ElementAttributeData::~ElementAttributeData):
2788         (WebCore::ElementAttributeData::attrIfExists):
2789         (WebCore::ElementAttributeData::ensureAttr):
2790         (WebCore::ElementAttributeData::setAttr):
2791         (WebCore::ElementAttributeData::removeAttr):
2792         (WebCore::ElementAttributeData::ensureInlineStyle):
2793         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2794         (WebCore::ElementAttributeData::destroyInlineStyle):
2795         (WebCore::ElementAttributeData::addAttribute):
2796         (WebCore::ElementAttributeData::removeAttribute):
2797         (WebCore::ElementAttributeData::isEquivalent):
2798         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2799         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2800         (WebCore::ElementAttributeData::cloneDataFrom):
2801         (WebCore::ElementAttributeData::clearAttributes):
2802         (WebCore::ElementAttributeData::replaceAttribute):
2803         (WebCore::ElementAttributeData::getAttributeNode):
2804         * dom/ElementAttributeData.h:
2805         (WebCore::ElementAttributeData::create):
2806         (ElementAttributeData):
2807         (WebCore::ElementAttributeData::setClass):
2808         (WebCore::ElementAttributeData::setIdForStyleResolution):
2809         (WebCore::ElementAttributeData::inlineStyle):
2810         (WebCore::ElementAttributeData::setAttributeStyle):
2811         (WebCore::ElementAttributeData::reportMemoryUsage):
2812         (WebCore::ElementAttributeData::isMutable):
2813         (WebCore::ElementAttributeData::makeMutable):
2814         (WebCore::ElementAttributeData::length):
2815         (WebCore):
2816         (WebCore::ElementAttributeData::isEmpty):
2817         (WebCore::ElementAttributeData::array):
2818         (WebCore::ElementAttributeData::removeAttribute):
2819         (WebCore::ElementAttributeData::getAttributeItem):
2820         (WebCore::ElementAttributeData::getAttributeItemIndex):
2821         (WebCore::ElementAttributeData::attributeItem):
2822         * dom/StyledElement.cpp:
2823         (WebCore::StyledElement::style):
2824         (WebCore::StyledElement::classAttributeChanged):
2825         (WebCore::StyledElement::setInlineStyleProperty):
2826         (WebCore::StyledElement::removeInlineStyleProperty):
2827         (WebCore::StyledElement::addSubresourceAttributeURLs):
2828         * dom/StyledElement.h:
2829         (WebCore::StyledElement::ensureInlineStyle):
2830         * html/parser/HTMLConstructionSite.cpp:
2831         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2832         * xml/parser/XMLDocumentParserQt.cpp:
2833         (WebCore::XMLDocumentParser::XMLDocumentParser):
2834
2835 2012-07-12  Florin Malita  <fmalita@chromium.org>
2836
2837         Incorrect handling of chained pending resources in SVGUseElement
2838         https://bugs.webkit.org/show_bug.cgi?id=89686
2839
2840         Reviewed by Nikolas Zimmermann.
2841
2842         Currently SVGUseElement builds the shadow tree when the target first
2843         becomes available. This is normally OK, but if the target itself (or
2844         one of its children) is a <use> element with pending resources, then
2845         the shadow expansion only captures the current state of the tree and
2846         never gets updated when the pending resource becomes available.
2847
2848         In order to support arbitrary <use>-on-<use> constructs, this patch
2849         tracks nested <use> dependencies and rebuilds the dependent trees
2850         whenever the target gets updated.
2851
2852
2853         Tests: svg/custom/use-nested-expected.svg
2854                svg/custom/use-nested.svg
2855
2856         * svg/SVGElement.cpp:
2857         (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
2858         before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
2859         element being removed as a valid target in SVGUseElement::buildInstanceTree because its
2860         InDocument flag is not cleared yet.
2861         * svg/SVGUseElement.cpp:
2862         (WebCore::SVGUseElement::~SVGUseElement):
2863         (WebCore::SVGUseElement::clearResourceReferences):
2864         (WebCore::SVGUseElement::buildPendingResource):
2865         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2866         (WebCore::SVGUseElement::buildInstanceTree):
2867         * svg/SVGUseElement.h:
2868         (SVGUseElement):
2869         Track <use> -> <use> dependencies using SVGDocumentExtensions'
2870         m_elementDependencies framework and ensure dependent trees are rebuilt
2871         when the target itself gets rebuilt.
2872
2873 2012-07-12  MORITA Hajime  <morrita@google.com>
2874
2875         Typo: ParentTranversalDetails should be ParentTraversalDetails
2876         https://bugs.webkit.org/show_bug.cgi?id=91059
2877
2878         Reviewed by Andreas Kling.
2879
2880         Did a bare rename from ParentTranversalDetails to ParentTraversalDetails
2881
2882         No new tests, just a rename.
2883
2884         * dom/ComposedShadowTreeWalker.cpp:
2885         (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
2886         (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
2887         (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
2888         (WebCore::ComposedShadowTreeWalker::findParent):
2889         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2890         (WebCore::ComposedShadowTreeWalker::traverseParent):
2891         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2892         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2893         * dom/ComposedShadowTreeWalker.h:
2894         (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
2895         (ComposedShadowTreeWalker):
2896         * dom/NodeRenderingContext.h:
2897         (NodeRenderingContext):
2898
2899 2012-07-11  Antti Koivisto  <antti@apple.com>
2900
2901         Failure to dispatch didFinishLoadForFrame if font load fails synchronously 
2902         https://bugs.webkit.org/show_bug.cgi?id=91018
2903
2904         Reviewed by Enrica Casucci.
2905
2906         New font loads may be triggered by layout after the document load is complete but before we have dispatched
2907         didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke 
2908         FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
2909         
2910         Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
2911
2912         * css/CSSFontSelector.cpp:
2913         (WebCore::CSSFontSelector::beginLoadTimerFired):
2914
2915 2012-07-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2916
2917         Register protocol handler files should be in Modules/protocolhandler
2918         https://bugs.webkit.org/show_bug.cgi?id=90766
2919
2920         Reviewed by Hajime Morita.
2921
2922         The register protocol handler files are now self-contained. This patch is moved to the Modules.
2923
2924         No new tests. Covered by existing tests.
2925
2926         * CMakeLists.txt:
2927         * GNUmakefile.am:
2928         * GNUmakefile.list.am:
2929         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp.
2930         (WebCore):
2931         (WebCore::initProtocolHandlerWhitelist):
2932         (WebCore::verifyCustomHandlerURL):
2933         (WebCore::isProtocolWhitelisted):
2934         (WebCore::verifyProtocolHandlerScheme):
2935         (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
2936         (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler):
2937         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
2938         (WebCore::customHandlersStateString):
2939         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
2940         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
2941         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h.
2942         (WebCore):
2943         (NavigatorRegisterProtocolHandler):
2944         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl.
2945         * Target.pri:
2946         * WebCore.gyp/WebCore.gyp:
2947         * WebCore.gypi:
2948         * WebCore.pri:
2949         * WebCore.vcproj/WebCore.vcproj:
2950         * WebCore.vcproj/WebCoreCommon.vsprops:
2951         * WebCore.vcproj/copyForwardingHeaders.cmd:
2952         * WebCore.xcodeproj/project.pbxproj:
2953
2954 2012-07-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2955
2956         [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
2957         https://bugs.webkit.org/show_bug.cgi?id=91054
2958
2959         Reviewed by George Staikos.
2960
2961         Added an interface function syncProxyCredential() in class
2962         PageClientBlackBerry, which is responsible to notify WebPageClient
2963         to synchronize proxy credential to the chrome process.
2964
2965         Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
2966
2967         No new tests since there's no functional change.
2968
2969         * platform/blackberry/PageClientBlackBerry.h:
2970         * platform/network/blackberry/NetworkJob.cpp:
2971         (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
2972         credential and notify webpage client to synchronize it.
2973
2974 2012-07-12  Xingnan Wang  <xingnan.wang@intel.com>
2975
2976         [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()
2977         https://bugs.webkit.org/show_bug.cgi?id=90867
2978
2979         Reviewed by Tony Chang.
2980
2981         In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which
2982         we should keep aligned with.
2983
2984         No new tests - updated storage/indexeddb/keyrange.html to match new behavior.
2985
2986         * Modules/indexeddb/IDBKeyRange.cpp:
2987         (WebCore::IDBKeyRange::lowerBound):
2988         (WebCore::IDBKeyRange::upperBound):
2989
2990 2012-07-12  MORITA Hajime  <morrita@google.com>
2991
2992         [Shadow DOM] <video> with <shadow> crashes
2993         https://bugs.webkit.org/show_bug.cgi?id=91055
2994
2995         Reviewed by Kent Tamura.
2996
2997         This is similar to Bug 90480, where an undesired renderer is created by
2998         locating an insertion point on the shadow boundary.
2999
3000         This change adds a guard for such case by cheking whether the
3001         source node of each to-be-created renderer comes from the UA shadow
3002         tree, which is allowed to have a renderer.
3003
3004         Test: fast/dom/shadow/insertion-point-video-crash.html
3005
3006         * html/HTMLMediaElement.cpp:
3007         (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
3008         (WebCore::HTMLMediaElement::mediaControls): Added const.
3009         (WebCore::HTMLMediaElement::hasMediaControls): Added const.
3010         * html/HTMLMediaElement.h:
3011         (HTMLMediaElement):
3012
3013 2012-07-12  Yoshifumi Inoue  <yosin@chromium.org>
3014
3015         REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object. 
3016         https://bugs.webkit.org/show_bug.cgi?id=91057
3017
3018         Reviewed by Kent Tamura.
3019
3020         This patch changes NSLocale object of LocaleMac::m_locale variable to
3021         current NSLocale object rather than newly created NSLocale object from
3022         locale identifier.
3023
3024         No new tests. We don't have way to change system preferences from
3025         test scripts and restoring them. To test this patch, we need to do so.
3026
3027         * platform/text/mac/LocaleMac.h:
3028         (LocaleMac): Added a constructor which takes NSLocale object.
3029         * platform/text/mac/LocaleMac.mm:
3030         (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object.
3031         (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier.
3032
3033 2012-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3034
3035         [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
3036         https://bugs.webkit.org/show_bug.cgi?id=83016
3037
3038         Reviewed by Martin Robinson.
3039
3040         * platform/network/soup/CookieStorageSoup.cpp:
3041         (WebCore::soupCookiesChanged): Do not notify about changes in
3042         other cookie jars than the current one.
3043
3044 2012-07-12  Philip Rogers  <pdr@google.com>
3045
3046         Refactor RenderSVGShape bounding box code
3047         https://bugs.webkit.org/show_bug.cgi?id=90655
3048
3049         Reviewed by Nikolas Zimmermann.
3050
3051         RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
3052         not caching the object bounding box and instead computing it on each call. For consistency and
3053         performance objectBoundingBox has been refactored to return a cached value.
3054
3055         createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
3056         now updates the internal state of the shape (bounding boxes, etc) from the associated element.
3057         RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
3058         RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.
3059
3060         After this change all bounding box computation is now handled in updateShapeFromElement. Because
3061         subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
3062         code there (as will happen for RenderSVGPath in a followup patch).
3063
3064         strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
3065         in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.
3066
3067         Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
3068         m_strokeBoundingBox of RenderSVGShape instead of having their own.
3069
3070         This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.
3071
3072         No new tests, just a refactoring.
3073
3074         * rendering/svg/RenderSVGEllipse.cpp:
3075         (WebCore::RenderSVGEllipse::updateShapeFromElement):
3076         (WebCore):
3077         (WebCore::RenderSVGEllipse::fillShape):
3078         (WebCore::RenderSVGEllipse::strokeShape):
3079         (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
3080         * rendering/svg/RenderSVGEllipse.h:
3081         (RenderSVGEllipse):
3082         (WebCore::RenderSVGEllipse::isEmpty):
3083         * rendering/svg/RenderSVGRect.cpp:
3084         (WebCore::RenderSVGRect::updateShapeFromElement):
3085         (WebCore):
3086         (WebCore::RenderSVGRect::fillShape):
3087         (WebCore::RenderSVGRect::strokeShape):
3088         (WebCore::RenderSVGRect::shapeDependentStrokeContains):
3089         (WebCore::RenderSVGRect::shapeDependentFillContains):
3090         * rendering/svg/RenderSVGRect.h:
3091         (RenderSVGRect):
3092         (WebCore::RenderSVGRect::isEmpty):
3093         * rendering/svg/RenderSVGShape.cpp:
3094         (WebCore::RenderSVGShape::updateShapeFromElement):
3095         (WebCore):
3096         (WebCore::RenderSVGShape::layout):
3097         (WebCore::RenderSVGShape::calculateObjectBoundingBox):
3098         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
3099         (WebCore::RenderSVGShape::updateRepaintBoundingBox):
3100         * rendering/svg/RenderSVGShape.h:
3101         (RenderSVGShape):
3102         (WebCore::RenderSVGShape::objectBoundingBox):
3103         (WebCore::RenderSVGShape::strokeBoundingBox):
3104
3105 2012-07-12  Kent Tamura  <tkent@chromium.org>
3106
3107         Do not save the form state signature if nothing is saved
3108         https://bugs.webkit.org/show_bug.cgi?id=91050
3109
3110         Reviewed by Hajime Morita.
3111
3112         This change will reduce the size of HistoyItem.
3113
3114         Test: fast/forms/state-restore-empty-state.html
3115
3116         * html/FormController.cpp:
3117         (WebCore::FormController::formElementsState):
3118         If stateVector has only the signature string, clear it.
3119
3120 2012-07-11  Mark Rowe  <mrowe@apple.com>
3121
3122         <http://webkit.org/b/91051> Fix the Qt Mac build after r122400.
3123
3124         Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
3125         BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
3126         that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
3127         and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
3128         which revealed that the code made assumptions about which headers had already been included.
3129
3130         * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
3131         a declaration of UpdateSystemActivity when targeting Leopard.
3132
3133 2012-07-11  Matt Falkenhagen  <falken@chromium.org>
3134
3135         Add dialog element feature toggle to InternalSettings
3136         https://bugs.webkit.org/show_bug.cgi?id=90934
3137
3138         Reviewed by Hajime Morita.
3139
3140         This enables layout tests to be written for dialog although the feature is disabled by default.
3141
3142         Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
3143                fast/dom/HTMLDialogElement/dialog-enabled.html
3144
3145         * WebCore.exp.in: Added newly exported symbol.
3146         * testing/InternalSettings.cpp:
3147         (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
3148         (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
3149         (WebCore::InternalSettings::setDialogElementEnabled): Added.
3150         (WebCore):
3151         * testing/InternalSettings.h: Added support for dialog.
3152         (Backup):
3153         (InternalSettings):
3154         * testing/InternalSettings.idl: Added support for dialog.
3155
3156 2012-07-11  Kent Tamura  <tkent@chromium.org>
3157
3158         Accessing width or height of a detached image input element causes crash
3159         https://bugs.webkit.org/show_bug.cgi?id=90885
3160
3161         Reviewed by Kentaro Hara.
3162
3163         Test: fast/forms/image/width-and-height-of-detached-input.html
3164
3165         * html/ImageInputType.cpp:
3166         (WebCore::ImageInputType::height): Add null check for m_imageLoader.
3167         (WebCore::ImageInputType::width): ditto.
3168
3169 2012-07-11  Kent Tamura  <tkent@chromium.org>
3170
3171         Do not save state of stateless form controls
3172         https://bugs.webkit.org/show_bug.cgi?id=90964
3173
3174         Reviewed by Hajime Morita.
3175
3176         By Bug 89409, we started to store unmodified form control
3177         state. However we don't need to make such state for the following
3178         types.
3179         - password
3180         - submit
3181         - reset
3182         - button
3183         - keygen
3184
3185         Test: fast/forms/state-restore-skip-stateless.html
3186
3187         * html/BaseButtonInputType.cpp:
3188         (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
3189         Added. Disable saving state for submit, reset, and button types.
3190         * html/BaseButtonInputType.h:
3191         (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
3192         * html/HTMLFormControlElementWithState.h:
3193         (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
3194         * html/HTMLInputElement.cpp:
3195         (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
3196         Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
3197         * html/HTMLInputElement.h:
3198         (HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
3199         * html/HTMLKeygenElement.cpp:
3200         (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
3201         Added. Disable saving state for <keygen>.:
3202         * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
3203         * html/InputType.cpp:
3204         (WebCore::InputType::shouldSaveAndRestoreFormControlState):
3205         Added. Enable saving state for all types by default.
3206         * html/InputType.h:
3207         (InputType): Add shouldSaveAndRestoreFormControlState.
3208         * html/PasswordInputType.cpp:
3209         (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
3210         Added. Disabled saving state.
3211         (WebCore::PasswordInputType::saveFormControlState):
3212         Because shouldSaveAndRestoreFormControlState() returns false,
3213         saveFormControlState should be never called.
3214         * html/PasswordInputType.h:
3215         (PasswordInputType): Override shouldSaveAndRestoreFormControlState.
3216
3217 2012-07-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
3218
3219         Compilation error with GLES2 when using gl2ext.h from ANGLE.
3220         https://bugs.webkit.org/show_bug.cgi?id=91030
3221
3222         Reviewed by Kenneth Russell.
3223
3224         gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
3225         PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
3226         but we should work around it until fixed headers are integrated.
3227
3228
3229         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3230         (Extensions3DOpenGLES):
3231             Removed the "PROC" suffix to work around the header bug.
3232
3233 2012-07-11  Mark Rowe  <mrowe@apple.com>
3234
3235         Attempt to fix the Chromium Mac build after r122400.
3236
3237         * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
3238         building for a new enough version of OS X.
3239
3240 2012-07-11  Kent Tamura  <tkent@chromium.org>
3241
3242         [Mac] Sort project.pbxproj
3243
3244         * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file
3245
3246 2012-07-11  Dan Bernstein  <mitz@apple.com>
3247
3248         When a table row height grows because of pagination, not all cells’ heights are adjusted
3249         https://bugs.webkit.org/show_bug.cgi?id=91043
3250
3251         Reviewed by Sam Weinig.
3252
3253         The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
3254         rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
3255         side effects: earlier cells on the row would not grow by the same amount, and later cells on
3256         the row would factor the existing growth into their intrinsic padding.
3257
3258         Test: fast/multicol/table-row-height-increase.html
3259
3260         * rendering/RenderTableSection.cpp:
3261         (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
3262         the additional height needed is recorded, and the cell is shrunk back to row height. Then
3263         after finishing the row, all cells occurring on the row (including cells spanning it but not
3264         starting on it) are grown by the same amount.
3265
3266 2012-07-11  Mark Rowe  <mrowe@apple.com>
3267
3268         <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
3269
3270         Reviewed by Dan Bernstein.
3271
3272         The deployment target is already set to the version that we're targeting, and it's that setting
3273         which determines which functionality from the SDK is available to us.
3274
3275         * Configurations/Base.xcconfig:
3276
3277 2012-07-11  Mark Rowe  <mrowe@apple.com>
3278
3279         Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
3280
3281         Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3282
3283         Reviewed by Filip Pizlo.
3284
3285         * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
3286         * platform/mac/EmptyProtocolDefinitions.h:  The SDK we're building against determines whether the protocols are declared.
3287         * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
3288         available.
3289         * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
3290
3291 2012-07-11  Mark Rowe  <mrowe@apple.com>
3292
3293         <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3294
3295         This removal was handled by a script that translates the relevant macros in to the equivalent checks
3296         using the system availability macros.
3297
3298         Reviewed by Filip Pizlo.
3299
3300         * WebCore.exp.in:
3301         * accessibility/AccessibilityList.h:
3302         * accessibility/AccessibilityTable.h:
3303         * accessibility/mac/AXObjectCacheMac.mm:
3304         * editing/mac/EditorMac.mm:
3305         * loader/MainResourceLoader.cpp:
3306         * loader/MainResourceLoader.h:
3307         * page/AlternativeTextClient.h:
3308         * page/ContextMenuController.cpp:
3309         * page/mac/SettingsMac.mm:
3310         * platform/LocalizedStrings.cpp:
3311         * platform/MemoryPressureHandler.cpp:
3312         * platform/audio/mac/AudioBusMac.mm:
3313         * platform/graphics/Gradient.h:
3314         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3315         * platform/graphics/ca/GraphicsLayerCA.cpp:
3316         * platform/graphics/ca/PlatformCALayer.h:
3317         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3318         * platform/graphics/ca/mac/TileCache.mm:
3319         * platform/graphics/cg/GraphicsContextCG.cpp:
3320         * platform/graphics/cg/ImageBufferCG.cpp:
3321         * platform/graphics/cg/ImageBufferDataCG.cpp:
3322         * platform/graphics/cg/ImageBufferDataCG.h:
3323         * platform/graphics/cg/ImageCG.cpp:
3324         * platform/graphics/cg/ImageSourceCG.cpp:
3325         * platform/graphics/cg/PathCG.cpp:
3326         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3327         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3328         * platform/graphics/mac/ComplexTextController.cpp:
3329         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3330         * platform/graphics/mac/FontCacheMac.mm:
3331         * platform/graphics/mac/FontCustomPlatformData.cpp:
3332         * platform/graphics/mac/FontMac.mm:
3333         * platform/graphics/mac/GraphicsContextMac.mm:
3334         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3335         * platform/graphics/mac/SimpleFontDataMac.mm:
3336         * platform/graphics/mac/WebLayer.h:
3337         * platform/graphics/mac/WebLayer.mm:
3338         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3339         * platform/mac/CursorMac.mm:
3340         * platform/mac/DisplaySleepDisabler.cpp:
3341         * platform/mac/DisplaySleepDisabler.h:
3342         * platform/mac/EmptyProtocolDefinitions.h:
3343         * platform/mac/HTMLConverter.h:
3344         * platform/mac/HTMLConverter.mm:
3345         * platform/mac/MemoryPressureHandlerMac.mm:
3346         * platform/mac/NSScrollerImpDetails.h:
3347         * platform/mac/PlatformEventFactoryMac.mm:
3348         * platform/mac/PopupMenuMac.mm:
3349         * platform/mac/ScrollAnimatorMac.mm:
3350         * platform/mac/ScrollElasticityController.mm:
3351         * platform/mac/SharedTimerMac.mm:
3352         * platform/mac/SuddenTermination.mm:
3353         * platform/mac/WebCoreFullScreenWindow.mm:
3354         * platform/mac/WebCoreNSCellExtras.h:
3355         * platform/mac/WebCoreSystemInterface.h:
3356         * platform/mac/WebCoreSystemInterface.mm:
3357         * platform/mac/WebFontCache.mm:
3358         * platform/mac/WebVideoFullscreenController.mm:
3359         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
3360         * platform/network/Credential.h:
3361         * platform/network/ResourceHandle.h:
3362         * platform/network/cf/DNSCFNet.cpp:
3363         * platform/network/cf/ProxyServerCFNet.cpp:
3364         * platform/network/cf/ResourceRequest.h:
3365         * platform/network/cf/ResourceRequestCFNet.cpp:
3366         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3367         * platform/network/mac/AuthenticationMac.mm:
3368         * platform/network/mac/CookieStorageMac.mm:
3369         * platform/network/mac/ResourceHandleMac.mm:
3370         * platform/network/mac/ResourceRequestMac.mm:
3371         * platform/network/mac/WebCoreURLResponse.mm:
3372         * platform/text/TextChecking.h:
3373         * platform/text/cf/HyphenationCF.cpp:
3374         * platform/text/mac/HyphenationMac.mm:
3375         * rendering/RenderLayerBacking.cpp:
3376         * rendering/RenderLayerCompositor.cpp:
3377         * rendering/RenderThemeMac.mm:
3378
3379 2012-07-11  Robert Kroeger  <rjkroege@chromium.org>
3380
3381         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
3382         https://bugs.webkit.org/show_bug.cgi?id=89580
3383
3384         WebKit GTK and Chromium Linux force vertical wheel events to
3385         scroll horizontally when over horizontal scroll bars.  This is
3386         undesirable for touchpad scrolling with
3387         hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
3388         to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
3389
3390         Reviewed by Adam Barth.
3391
3392         Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html
3393
3394         * page/EventHandler.cpp:
3395         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 
3396         (WebCore::EventHandler::handleWheelEvent):
3397         * page/EventHandler.h:
3398         (EventHandler):
3399         * page/chromium/EventHandlerChromium.cpp:
3400         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3401         * page/gtk/EventHandlerGtk.cpp:
3402         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
3403
3404 2012-07-11  Hayato Ito  <hayato@chromium.org>