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