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