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