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