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