[GTK] avoid unneeded object creation when calling Vector::append
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-26  Arnaud Renevier  <arno@renevier.net>
2
3         [GTK] avoid unneeded object creation when calling Vector::append
4         https://bugs.webkit.org/show_bug.cgi?id=88805
5
6         Reviewed by Alexey Proskuryakov.
7
8         No new tests: no change in functionality.
9
10         * platform/gtk/ContextMenuGtk.cpp:
11         (WebCore::contextMenuItemVector):
12         * platform/gtk/KeyBindingTranslator.h:
13         (WebCore::KeyBindingTranslator::addPendingEditorCommand):
14
15 2012-07-26  Benjamin Poulain  <bpoulain@apple.com>
16
17         Initialize the Event Names' strings from read only memory
18         https://bugs.webkit.org/show_bug.cgi?id=92435
19
20         Reviewed by Anders Carlsson.
21
22         Similarily to r123689, we can initialize the event names' strings from memory without copying the data.
23         This saves us memory and initialization time.
24
25         * dom/EventNames.cpp:
26         (WebCore):
27
28 2012-07-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
29
30         constructing TypedArray from another TypedArray is slow
31         https://bugs.webkit.org/show_bug.cgi?id=90838
32
33         Reviewed by Kenneth Russell.
34
35         When constructing a typed array from an array like element, try to
36         determine if the argument is a typed array. If so, cast the argument
37         to a typed array, and read each element with .item() method. That
38         avoid reading the value as a JSValue, and speedups construction by
39         approximatively 3x (even 30x if TypedArrays are both the same type).
40
41         In order to achieve that, we use virtual getType method. We can use
42         this information to cast the TypedArray to the actual type, and then
43         read the values from the source.
44
45         Introduce constructArrayBufferViewWithTypedArrayArgument template
46         function which returns a new typed array if first argument is a typed
47         array, or 0 otherwise.
48
49         This patch also replaces previous is<Type>Array() calls with new
50         getType method.
51
52         * bindings/js/JSArrayBufferViewHelper.h:
53         (WebCore::constructArrayBufferViewWithTypedArrayArgument):
54         (WebCore):
55         (WebCore::constructArrayBufferView):
56         * bindings/v8/SerializedScriptValue.cpp:
57         * html/canvas/DataView.h:
58         (DataView):
59         (WebCore::DataView::getType):
60         * html/canvas/WebGLRenderingContext.cpp:
61         (WebCore):
62         (WebCore::WebGLRenderingContext::readPixels):
63         (WebCore::WebGLRenderingContext::validateTexFuncData):
64         * page/Crypto.cpp:
65
66 2012-07-26  Max Vujovic  <mvujovic@adobe.com>
67
68         Added binding and updated chromium tests.
69
70         [CSS Filters] Add V8 binding for WebKitCSSFilterValue
71         https://bugs.webkit.org/show_bug.cgi?id=92391
72
73         Reviewed by Adam Barth.
74
75         No new tests. This fixes test cases in:
76             platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt
77             platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt
78             platform/chromium/css3/filters/filter-property-computed-style-expected.txt
79             platform/chromium/css3/filters/filter-property-parsing-expected.txt
80
81         * bindings/v8/custom/V8CSSValueCustom.cpp:
82         (WebCore::toV8):
83
84 2012-07-26  Nayan Kumar K  <nayankk@motorola.com>
85
86         [WebGL] Initial size of canvas can be larger than MAX_VIEWPORT_DIMS.
87         https://bugs.webkit.org/show_bug.cgi?id=91976
88
89         Reviewed by Kenneth Russell.
90
91         From section 2.2 of the spec the WebGL implementation says initial size of
92         the canvas can be larger than MAX_VIEWPORT_DIMS. With the current WebGL
93         implementation, we get error when initial size if greater than MAX_VIEWPORT_DIMS.
94         This change limits the width and height of drawingbuffer to MAX_VIEWPORT_DIMS
95         when given initial size exceeds it.
96
97         Added tests to LayoutTests/fast/canvas/webgl/drawingbuffer-test.html
98
99         * html/canvas/WebGLRenderingContext.cpp:
100         (WebCore):
101         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
102         (WebCore::WebGLRenderingContext::initializeNewContext):
103         (WebCore::WebGLRenderingContext::markContextChanged):
104
105 2012-07-26  Adrienne Walker  <enne@google.com>
106
107         [chromium] When computing surface content scale, use top level device scale
108         https://bugs.webkit.org/show_bug.cgi?id=92328
109
110         Reviewed by Kenneth Russell.
111
112         Previously, surface scale was calculated with layer->contentsScale(),
113         however this value is 1 for any layer that is not ContentLayerChromium
114         because of layer->needsContentsScale(). This would cause any surface
115         created with a non-content owner layer to look fuzzy on a high DPI
116         device. Fix by using the top level device scale.
117
118         Additionally, remove contentsScale from CCLayerImpl as it is no longer
119         used.
120
121         * platform/graphics/chromium/LayerChromium.cpp:
122         (WebCore::LayerChromium::pushPropertiesTo):
123         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
124         (WebCore::CCLayerImpl::CCLayerImpl):
125         * platform/graphics/chromium/cc/CCLayerImpl.h:
126         (CCLayerImpl):
127         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
128         (WebCore::calculateDrawTransformsInternal):
129         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
130
131 2012-07-26  Anders Carlsson  <andersca@apple.com>
132
133         HTMLAppletElement should inherit from HTMLPlugInImageElement
134         https://bugs.webkit.org/show_bug.cgi?id=92320
135
136         Reviewed by Eric Seidel.
137
138         In order to simplify the class hierarchy and eventually merge HTMLPlugInImageElement and HMTLPlugInElement,
139         make HTMLAppletElement inherit from HTMLPlugInImageElement. While this does mean that HTMLAppletElement will grow by
140         a couple of words, in practice it won't matter.
141
142         Also, make RenderApplet inherit from RenderEmbeddedObject and move the plug-in instantiation to HTMLAppletElement which matches
143         both HTMLEmbedElement and HTMLObjectElement.
144
145         * html/HTMLAppletElement.cpp:
146         (WebCore::HTMLAppletElement::HTMLAppletElement):
147         (WebCore::HTMLAppletElement::create):
148         (WebCore::HTMLAppletElement::parseAttribute):
149         (WebCore::HTMLAppletElement::rendererIsNeeded):
150         (WebCore::HTMLAppletElement::createRenderer):
151         (WebCore):
152         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
153         (WebCore::HTMLAppletElement::updateWidget):
154         * html/HTMLAppletElement.h:
155         (HTMLAppletElement):
156         * html/HTMLTagNames.in:
157         * loader/SubframeLoader.cpp:
158         (WebCore::SubframeLoader::createJavaAppletWidget):
159         * loader/SubframeLoader.h:
160         (SubframeLoader):
161         * page/FrameView.cpp:
162         (WebCore::FrameView::updateWidget):
163         * rendering/RenderApplet.cpp:
164         (WebCore::RenderApplet::RenderApplet):
165         * rendering/RenderApplet.h:
166         (RenderApplet):
167         * rendering/RenderEmbeddedObject.h:
168         (WebCore::toRenderEmbeddedObject):
169         * rendering/RenderLayer.cpp:
170         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
171         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
172         * rendering/RenderLayerBacking.cpp:
173         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
174         * rendering/RenderLayerCompositor.cpp:
175         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
176         * rendering/RenderObject.cpp:
177         (WebCore::RenderObject::setStyle):
178         * rendering/RenderObject.h:
179
180 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
181
182         Unreviewed, rolling out r123799.
183         http://trac.webkit.org/changeset/123799
184         https://bugs.webkit.org/show_bug.cgi?id=92431
185
186         broke the Apple Mac build (Requested by bweinstein on
187         #webkit).
188
189         * CMakeLists.txt:
190         * GNUmakefile.list.am:
191         * Target.pri:
192         * WebCore.gypi:
193         * dom/EventNames.h:
194         (WebCore):
195         * dom/GestureEvent.cpp: Removed.
196         * dom/GestureEvent.h: Removed.
197         * dom/Node.cpp:
198         * dom/Node.h:
199         (WebCore):
200         (Node):
201         * page/EventHandler.cpp:
202         (WebCore::EventHandler::clear):
203         (WebCore::EventHandler::handleGestureEvent):
204         * page/EventHandler.h:
205
206 2012-07-26  Nima Ghanavatian  <nghanavatian@rim.com>
207
208         [BlackBerry] Support async spellcheck for the blackberry port
209         https://bugs.webkit.org/show_bug.cgi?id=92160
210
211         Set USE_UNIFIED_TEXT_CHECKING for PLATFORM(BLACKBERRY) to use the
212         asynchronous spellchecking code path.
213
214         Reviewed by Rob Buis.
215
216         Internally reviewed by Mike Fenton.
217
218         * platform/text/TextChecking.h:
219         (WebCore):
220
221 2012-07-26  Huang Dongsung  <luxtella@company100.net>
222
223         Gather the duplicated timer code into CachedResource.
224         https://bugs.webkit.org/show_bug.cgi?id=92332
225
226         Reviewed by Nate Chapin.
227
228         Internal review by Jae Hyun Park.
229
230         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
231         start the timer to destroy decoded data. Those three classes have their own
232         timer.
233         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
234         stop the timer. This change does not have any side effect because
235         CachedResource::didAddClient only stops the timer in this case.
236
237         No new tests - no new testable functionality.
238
239         * loader/cache/CachedCSSStyleSheet.cpp:
240         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
241         (WebCore::CachedCSSStyleSheet::didAddClient):
242         * loader/cache/CachedCSSStyleSheet.h:
243         (CachedCSSStyleSheet):
244         * loader/cache/CachedImage.cpp:
245         (WebCore::CachedImage::CachedImage):
246         (WebCore::CachedImage::didAddClient):
247         (WebCore::CachedImage::allClientsRemoved):
248         * loader/cache/CachedImage.h:
249         (CachedImage):
250         * loader/cache/CachedResource.cpp:
251         (WebCore::CachedResource::CachedResource):
252         (WebCore::CachedResource::didAddClient):
253         (WebCore::CachedResource::removeClient):
254         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
255         (WebCore):
256         (WebCore::CachedResource::decodedDataDeletionTimerFired):
257         * loader/cache/CachedResource.h:
258         (CachedResource):
259         * loader/cache/CachedScript.cpp:
260         (WebCore::CachedScript::CachedScript):
261         * loader/cache/CachedScript.h:
262         (CachedScript):
263
264 2012-07-26  Benjamin Poulain  <bpoulain@apple.com>
265
266         Use the constant count of Tags/Attributes names instead of getting the size when obtaining the tags/attributes
267         https://bugs.webkit.org/show_bug.cgi?id=92411
268
269         Reviewed by Julien Chaffraix.
270
271         Since r123582, the number of tags and attributes per "namespace" is exposed in a constant in the header file.
272         This makes it possible to access this value through two ways:
273         1) The constant.
274         2) The first parameter of the tags/attributes getter function.
275
276         Having two ways to access the value is error prone. This patches changes the code to have all accesses done
277         through the constant.
278
279         * dom/make_names.pl:
280         (printNamesHeaderFile):
281         (printNamesCppFile):
282         Change the code generator to not provide the size in the getter function.
283
284         * html/HTMLObjectElement.cpp:
285         (WebCore::isRecognizedTagName):
286         * html/parser/HTMLTreeBuilder.cpp:
287         (WebCore::adjustSVGTagNameCase):
288         (WebCore):
289         (WebCore::adjustAttributes):
290         (WebCore::adjustSVGAttributes):
291         (WebCore::adjustMathMLAttributes):
292         (WebCore::adjustForeignAttributes):
293
294 2012-07-26  Chang Shu  <cshu@webkit.org>
295
296         Support constructor-type static readonly attribute for CodeGenerator.
297         https://bugs.webkit.org/show_bug.cgi?id=92413.
298
299         Reviewed by Adam Barth.
300
301         Added support for constructor-type static readonly attribute for CodeGenerator.
302         This is achieved by putting the attribute entry in the table where static properties
303         belong to but leave the implementation same as a non-static constructor-type attribute.
304
305         Tested by running run-bindings-tests.
306
307         * bindings/scripts/CodeGeneratorJS.pm:
308         (GenerateImplementation):
309         * bindings/scripts/test/JS/JSTestInterface.cpp:
310         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
311         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
312         * bindings/scripts/test/JS/JSTestObj.cpp:
313         (WebCore):
314         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
315         (WebCore::jsTestObjConstructorStaticStringAttr):
316         (WebCore::jsTestObjConstructorTestSubObj):
317         * bindings/scripts/test/JS/JSTestObj.h:
318         (WebCore):
319         * bindings/scripts/test/TestObj.idl:
320         * bindings/scripts/test/V8/V8TestObj.cpp:
321         (WebCore):
322
323 2012-07-26  Sadrul Habib Chowdhury  <sadrul@chromium.org>
324
325         Propagate gesture events to plugins.
326         https://bugs.webkit.org/show_bug.cgi?id=92281
327
328         Reviewed by Adam Barth.
329
330         Propagate gesture events to plugins. This change does not expose the gesture events
331         to JavaScript, since there is no spec for that at the moment. Exposing gesture events
332         to JavaScript will be done separately, once there is a spec for it.
333
334         Test: platform/chromium/plugins/gesture-events.html
335
336         * CMakeLists.txt:
337         * GNUmakefile.list.am:
338         * Target.pri:
339         * WebCore.gypi:
340         * dom/EventNames.h:
341         (WebCore):
342         (WebCore::EventNames::isGestureEventType):
343         (EventNames):
344         * dom/GestureEvent.cpp: Added.
345         (WebCore):
346         (WebCore::GestureEvent::create):
347         (WebCore::GestureEvent::initGestureEvent):
348         (WebCore::GestureEvent::interfaceName):
349         (WebCore::GestureEvent::GestureEvent):
350         (WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
351         (WebCore::GestureEventDispatchMediator::event):
352         (WebCore::GestureEventDispatchMediator::dispatchEvent):
353         * dom/GestureEvent.h: Added.
354         (WebCore):
355         (GestureEvent):
356         (WebCore::GestureEvent::~GestureEvent):
357         (WebCore::GestureEvent::deltaX):
358         (WebCore::GestureEvent::deltaY):
359         (WebCore::GestureEvent::GestureEvent):
360         (GestureEventDispatchMediator):
361         (WebCore::GestureEventDispatchMediator::create):
362         * dom/Node.cpp:
363         (WebCore):
364         (WebCore::Node::dispatchGestureEvent):
365         * dom/Node.h:
366         (WebCore):
367         (Node):
368         * page/EventHandler.cpp:
369         (WebCore::EventHandler::clear):
370         (WebCore::EventHandler::handleGestureEvent):
371         * page/EventHandler.h:
372
373 2012-07-26  Gavin Peters  <gavinp@chromium.org>
374
375         Guard Prerenderer against inserting prerenders into detached documents.
376         https://bugs.webkit.org/show_bug.cgi?id=92401
377
378         Reviewed by Adam Barth.
379
380         If the document is detached, we should not launch a prerender.
381
382         Test: fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
383
384         * loader/Prerenderer.cpp:
385         (WebCore::Prerenderer::render):
386
387 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
388
389         Unreviewed, rolling out r123525.
390         http://trac.webkit.org/changeset/123525
391         https://bugs.webkit.org/show_bug.cgi?id=92421
392
393         it needed to be rolled out after r123779 too (Requested by
394         jchaffraix on #webkit).
395
396         * rendering/RenderObjectChildList.cpp:
397         (WebCore::RenderObjectChildList::insertChildNode):
398
399 2012-07-26  Pravin D  <pravind.2k4@gmail.com>
400
401         Outline is always painted on the first table row regardless of the row it's set on
402         https://bugs.webkit.org/show_bug.cgi?id=92389
403
404         Reviewed by Eric Seidel.
405
406         The outlines of all the rows are drawn on the row instead of their respective rows.
407         The paint offset for the outlines does not take the row location into account.
408
409         Test: fast/table/table-row-outline-paint.html
410
411         * rendering/RenderTableRow.cpp:
412         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
413         The row's location is taken into account for calculating the correct paint offset
414         for its outline.
415
416 2012-07-26  Antoine Labour  <piman@chromium.org>
417
418         [chromium] Combine color matrix filters and apply them in a single pass.
419         https://bugs.webkit.org/show_bug.cgi?id=92059
420
421         Reviewed by Stephen White.
422
423         Sequential color matrix filters can easily be combined, by simply
424         multiplying the color matrices and applying it in a single pass. This
425         helps dramatically with performance (bandwidth savings by avoiding extra
426         copy & clear, also saves fragment shader processing).
427
428         Covered by css3/filters layout tests, added effect-brightness-clamping
429         and effect-brightness-clamping-hw.
430
431         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
432         (WebCore::CCRenderSurfaceFilters::apply):
433
434 2012-07-26  Ryosuke Niwa  <rniwa@webkit.org>
435
436         Href attribute with javascript protocol is stripped when content is pasted into a XML doucment
437         https://bugs.webkit.org/show_bug.cgi?id=92310
438
439         Reviewed by Adam Barth.
440
441         The bug was caused by setAttributeNS's stripping attributes for which isAttributeToRemove
442         return true instead of setting an empty string. Changing this in setAttributeNS is problematic
443         because it will trigger a logic, in HTMLAnchorElement for example, to resolve the URL.
444
445         Fixed the bug by making XML parsers call parserSetAttributes instead of setAttributeNS.
446         After this patch, handleNamespaceAttributes and handleElementAttributes simply fills up a Vector
447         with which startElementNs (or parseStartElement in Qt) calls parserSetAttributes.
448
449         * dom/Element.cpp:
450         (WebCore::Element::parserSetAttributes): Sets emptyAtom instead of nullAtom as nullAtom can be
451         turned into "null".
452         (WebCore::Element::parseAttributeName): Extracted from setAttributeNS.
453         (WebCore::Element::setAttributeNS): No longer takes FragmentScriptingPermission.
454         * dom/Element.h:
455         (Element):
456         * editing/markup.cpp:
457         (WebCore::completeURLs): Don't resolve URLs when it's empty since empty attribute has a canonical
458         meaning in some cases. e.g. <frame src=""></iframe>
459         * xml/parser/XMLDocumentParserLibxml2.cpp:
460         (WebCore::handleNamespaceAttributes): Renamed from handleElementNamespaces. Call
461         parserSetAttributes even when exiting early to be maintain the same behavior.
462         (WebCore::handleElementAttributes):
463         (WebCore::XMLDocumentParser::startElementNs):
464         * xml/parser/XMLDocumentParserQt.cpp:
465         (WebCore::handleNamespaceAttributes): Use XMLNSNames::xmlnsNamespaceURI. Call parserSetAttributes
466         even when exiting early to be maintain the same behavior.
467         (WebCore::handleElementAttributes):
468         (WebCore::XMLDocumentParser::parseStartElement):
469
470 2012-07-26  Dan Bernstein  <mitz@apple.com>
471
472         <svg> element with no intrinsic size and max-width gets sized incorrectly
473         https://bugs.webkit.org/show_bug.cgi?id=92410
474
475         Reviewed by Dean Jackson.
476
477         Test: svg/css/max-width-2.html
478
479         * rendering/RenderReplaced.cpp:
480         (WebCore::RenderReplaced::computeReplacedLogicalWidth): The rule for computing the width for
481         elements whose computed width and height are both auto and which have no intrinsic size, but
482         have an intrinsic ratio was applied only to elements with a content renderer (such as <img>
483         with an SVG source). Removed the requirement to have a content renderer, so that it will
484         apply to all elements including <svg>.
485
486 2012-07-26  Tony Chang  <tony@chromium.org>
487
488         Regression: r123696 made css3/flexbox tests failing
489         https://bugs.webkit.org/show_bug.cgi?id=92352
490
491         Reviewed by Levi Weintraub.
492
493         Use roundedLayoutUnit so ports without subpixel layout still pass existing tests.
494
495         Covered by css3/flexbox/flex-algorithm-min-max.html which should pass again.
496
497         * rendering/RenderFlexibleBox.cpp:
498         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
499
500 2012-07-26  Emil A Eklund  <eae@chromium.org>
501
502         Contained div with right 0 sometimes overlaps parent div
503         https://bugs.webkit.org/show_bug.cgi?id=91521
504
505         Reviewed by Levi Weintraub.
506
507         Due to unnecessary rounding in clientLogicalWidth and clientLogicalHeight
508         we lost precision when computing the width and position of render boxes.
509         Change clientLogicalWidth/Height to return values with subpixel precision
510         to avoid this.
511
512         Test: fast/sub-pixel/position-right-aligns-with-container.html
513
514         * rendering/RenderBox.h:
515         (WebCore::RenderBox::clientLogicalWidth):
516         (WebCore::RenderBox::clientLogicalHeight):
517         Remove unnecessary rounding.
518
519 2012-07-26  Chang Shu  <cshu@webkit.org>
520
521         Build broken when svg is disabled.
522         https://bugs.webkit.org/show_bug.cgi?id=92393.
523
524         Reviewed by Laszlo Gombos.
525
526         Need to surpress unused parameters warning.
527
528         * rendering/FilterEffectRenderer.cpp:
529         (WebCore::FilterEffectRenderer::buildReferenceFilter):
530
531 2012-07-25  Jer Noble  <jer.noble@apple.com>
532
533         Add diagnostic messages when media and plugins load or fail to load.
534         https://bugs.webkit.org/show_bug.cgi?id=92341
535
536         Reviewed by Anders Carlsson.
537
538         Send diagnostic messages when a media or plugin element loads or fails to load. Include in
539         the trace the media engine description, error code, or plugin mime type.
540
541         * html/HTMLEmbedElement.cpp:
542         (WebCore::HTMLEmbedElement::updateWidget): Send a diagnostic message.
543         * html/HTMLMediaElement.cpp:
544         (WebCore::stringForNetworkState): Added convenience function to stringify network states.
545         (WebCore::HTMLMediaElement::mediaLoadingFailed): Send a diagnostic message.
546         (WebCore::HTMLMediaElement::setReadyState): Send a diagnostic message.
547         * html/HTMLObjectElement.cpp:
548         (WebCore::HTMLObjectElement::updateWidget): Send a diagnostic message.
549
550 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
551
552         Unreviewed, rolling out r123159, r123165, r123168, r123492,
553         and r123650.
554         http://trac.webkit.org/changeset/123159
555         http://trac.webkit.org/changeset/123165
556         http://trac.webkit.org/changeset/123168
557         http://trac.webkit.org/changeset/123492
558         http://trac.webkit.org/changeset/123650
559         https://bugs.webkit.org/show_bug.cgi?id=92406
560
561         allowing inline-table anonymous wrappers is a bad idea due to
562         tons of corner cases that should be properly handled
563         (Requested by jchaffraix on #webkit).
564
565         * rendering/RenderInline.cpp:
566         (WebCore::RenderInline::addChildIgnoringContinuation):
567         * rendering/RenderTable.cpp:
568         (WebCore::RenderTable::createAnonymousWithParentRenderer):
569
570 2012-07-26  Jer Noble  <jer.noble@apple.com>
571
572         Add a ChromeClient method to send diagnostic logging messages from WebCore to the client.
573         https://bugs.webkit.org/show_bug.cgi?id=92340
574
575         Reviewed by Anders Carlsson.
576
577         Add a new ChromeClient menthod, to be implemented by WebKit and WebKit2, which sends
578         a diagnostic logging message up to the client.
579
580         * page/ChromeClient.h:
581         (WebCore::ChromeClient::logDiagnosticMessage):
582         * page/ChromeClient.h:
583         (WebCore::ChromeClient::logDiagnosticMessage):
584         (ChromeClient):
585         * page/DiagnosticLoggingKeys.cpp: Added.
586         (WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
587         (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
588         (WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
589         (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
590         (WebCore::DiagnosticLoggingKeys::passKey):
591         (WebCore::DiagnosticLoggingKeys::failKey):
592         (WebCore::DiagnosticLoggingKeys::noopKey):
593         * page/DiagnosticLoggingKeys.h: Added.
594         (DiagnosticLoggingKeys):
595
596         Add the new files DiagnosticLoggingKeys.cpp,h to the project:
597         * CMakeLists.txt:
598         * GNUmakefile.list.am:
599         * Target.pri:
600         * WebCore.gypi:
601         * WebCore.vcproj/WebCore.vcproj:
602         * WebCore.xcodeproj/project.pbxproj:
603
604 2012-07-25  Jer Noble  <jer.noble@apple.com>
605
606         Add setting to enable and disable diagnostic logging.
607         https://bugs.webkit.org/show_bug.cgi?id=92337
608
609         Reviewed by Anders Carlsson.
610
611         Add a new entry in Settings, defaulting to false.
612
613         * page/Settings.cpp:
614         (WebCore::Settings::Settings): Default the new setting to false.
615         * page/Settings.h:
616         (WebCore::Settings::setDiagnosticLoggingEnabled): Simple accessor.
617         (WebCore::Settings::diagnosticLoggingEnabled): Ditto.
618
619 2012-07-26  Olivier Blin  <olivier.blin@softathome.com>
620
621         Add FastMalloc statistics in window.internals
622         https://bugs.webkit.org/show_bug.cgi?id=91274
623
624         Reviewed by Ryosuke Niwa.
625
626         Test: fast/harness/fastmallocstatistics-object.html
627
628         * CMakeLists.txt:
629         * DerivedSources.make:
630         * DerivedSources.pri:
631         * GNUmakefile.list.am:
632         * Target.pri:
633         * WebCore.gyp/WebCore.gyp:
634         * WebCore.gypi:
635         * WebCore.vcproj/WebCoreTestSupport.vcproj:
636         * WebCore.xcodeproj/project.pbxproj:
637         * testing/FastMallocStatistics.h: Added.
638         (WebCore):
639         (FastMallocStatistics):
640         (WebCore::FastMallocStatistics::create):
641         (WebCore::FastMallocStatistics::reservedVMBytes):
642         (WebCore::FastMallocStatistics::committedVMBytes):
643         (WebCore::FastMallocStatistics::freeListBytes):
644         (WebCore::FastMallocStatistics::FastMallocStatistics):
645         * testing/FastMallocStatistics.idl: Added.
646         * testing/Internals.cpp:
647         (WebCore::Internals::fastMallocStatistics):
648         (WebCore):
649         * testing/Internals.h:
650         (WebCore):
651         (Internals):
652         * testing/Internals.idl:
653
654 2012-07-26  Adrienne Walker  <enne@google.com>
655
656         [chromium] Remove redundant surface origin transforms
657         https://bugs.webkit.org/show_bug.cgi?id=91815
658
659         Reviewed by Stephen White.
660
661         Bug 91417 changed draw transforms to become equivalent to origin
662         transforms for surfaces. This change removes them as they are no
663         longer needed for anything.
664
665         No new tests. Just a refactoring.
666
667         * platform/graphics/chromium/RenderSurfaceChromium.h:
668         (RenderSurfaceChromium):
669         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
670         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
671         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
672         (WebCore::computeScrollCompensationMatrixForChildren):
673         (WebCore::calculateDrawTransformsInternal):
674         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
675         (WebCore::::leaveToRenderTarget):
676         (WebCore::::unoccludedContributingSurfaceContentRect):
677         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
678         (WebCore::CCRenderPassDrawQuad::create):
679         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
680         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
681         (CCRenderPassDrawQuad):
682         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
683         (WebCore::CCRenderSurface::createSharedQuadState):
684         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
685         (WebCore::CCRenderSurface::appendQuads):
686         * platform/graphics/chromium/cc/CCRenderSurface.h:
687         (CCRenderSurface):
688
689 2012-07-25  Andrey Kosyakov  <caseq@chromium.org>
690
691         Web Inspector: simplify handling of status bar items
692         https://bugs.webkit.org/show_bug.cgi?id=92143
693
694         Reviewed by Pavel Feldman.
695
696         - split status bars into "global" (always in the bottom) and "panel"
697             (on top of the drawer when drawer is shown)
698         - use "inner" status bar section in global status bar to display either
699             panel status bar items or drawer view items (depending on drawer visibility)
700         - let panels/views manage their counters as part of their status bar
701             items, not through special interface members;
702         - get rid of absolute positioning in the status bars where possible;
703
704         * inspector/front-end/AdvancedSearchController.js:
705         (WebInspector.SearchView.prototype.get statusBarItems):
706         * inspector/front-end/Drawer.js:
707         (WebInspector.Drawer):
708         (WebInspector.Drawer.prototype.show.animationFinished):
709         (WebInspector.Drawer.prototype.show):
710         (WebInspector.Drawer.prototype.hide.animationFinished):
711         (WebInspector.Drawer.prototype.hide):
712         (WebInspector.Drawer.prototype._startStatusBarDragging):
713         * inspector/front-end/Panel.js:
714         (WebInspector.Panel.prototype.wasShown):
715         * inspector/front-end/TimelinePanel.js:
716         (WebInspector.TimelinePanel.prototype.get statusBarItems):
717         (WebInspector.TimelinePanel.prototype.willHide):
718         * inspector/front-end/elementsPanel.css:
719         (.crumbs):
720         * inspector/front-end/inspector.css:
721         (#main):
722         (body.drawer-visible #main-panels):
723         (.status-bar):
724         (.status-bar-item):
725         (#panel-status-bar-placeholder):
726         (body.drawer-visible #panel-status-bar-placeholder):
727         (#panel-status-bar-resizer):
728         (#panel-status-bar):
729         (#panel-status-bar > div):
730         (#error-warning-count):
731         (#drawer):
732         (#drawer-contents):
733         (.status-bar-items):
734         (.drawer-header):
735         (#inner-status-bar):
736         (.search-status-bar-item):
737         (.search-status-bar-message):
738         (.search-status-bar-progress):
739         (body:not(.platform-mac) .search-status-bar-progress):
740         (body.platform-mac .search-status-bar-progress):
741         (.search-status-bar-stop-button-item):
742         (.search-status-bar-stop-button .glyph):
743         (.search-results-status-bar-message):
744         * inspector/front-end/inspector.html:
745         * inspector/front-end/inspector.js:
746         (WebInspector._createGlobalStatusBarItems):
747         (WebInspector.showViewInDrawer):
748         (WebInspector._closePreviousDrawerView):
749         * inspector/front-end/timelinePanel.css:
750         (.timeline-records-counter):
751
752 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
753
754         [EFL][WK2] Implement Network Information provider
755         https://bugs.webkit.org/show_bug.cgi?id=92343
756
757         Reviewed by Kenneth Rohde Christiansen.
758
759         Moved Network Information provider code from WebKit1
760         to WebCore so that it can be shared with WebKit2.
761
762         No new tests, no behavior change.
763
764         * PlatformEfl.cmake:
765         * platform/efl/NetworkInfoProviderEfl.cpp: Copied from Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp.
766         (WebCore):
767         (WebCore::NetworkInfoProviderEfl::NetworkInfoProviderEfl):
768         (WebCore::NetworkInfoProviderEfl::startUpdating):
769         (WebCore::NetworkInfoProviderEfl::stopUpdating):
770         (WebCore::NetworkInfoProviderEfl::bandwidth):
771         * platform/efl/NetworkInfoProviderEfl.h: Added.
772         (WebCore):
773         (NetworkInfoProviderEfl):
774
775 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
776
777         Web Inspector: SASS source mapping straw man (behind experiment)
778         https://bugs.webkit.org/show_bug.cgi?id=92265
779
780         Reviewed by Vsevolod Vlasov.
781
782         This change introduces SASS mapping support (behind the experiment).
783
784         * WebCore.gypi:
785         * WebCore.vcproj/WebCore.vcproj:
786         * inspector/compile-front-end.py:
787         * inspector/front-end/CSSStyleModel.js:
788         (WebInspector.CSSStyleModel):
789         (WebInspector.CSSStyleModel.prototype.resourceBinding):
790         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
791         (WebInspector.CSSStyleModel.prototype.resetSourceMappings):
792         (WebInspector.CSSStyleModel.prototype._rawLocationToUILocation):
793         (WebInspector.CSSLocation):
794         (WebInspector.CSSRule):
795         (WebInspector.CSSRule.prototype.get isRegular):
796         (WebInspector.CSSRule.prototype.uiLocation):
797         * inspector/front-end/ContentProviders.js:
798         (WebInspector.StaticContentProvider.prototype.contentType):
799         * inspector/front-end/SASSSourceMapping.js: Added.
800         (WebInspector.SASSSourceMapping):
801         (WebInspector.SASSSourceMapping.prototype._populate):
802         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
803         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
804         (rawLocationToUILocation):
805         (uiLocationToRawLocation):
806         (uiSourceCodes):
807         (reset):
808         (WebInspector.SASSSource):
809         (WebInspector.SASSSource.prototype.isEditable):
810         * inspector/front-end/ScriptsPanel.js:
811         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
812         * inspector/front-end/Settings.js:
813         (WebInspector.ExperimentsSettings):
814         * inspector/front-end/StylesPanel.js:
815         (WebInspector.StylesUISourceCodeProvider):
816         (WebInspector.StylesUISourceCodeProvider.prototype.rawLocationToUILocation):
817         (WebInspector.StylesUISourceCodeProvider.prototype.uiLocationToRawLocation):
818         (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded):
819         (WebInspector.StylesUISourceCodeProvider.prototype.reset):
820         * inspector/front-end/StylesSidebarPane.js:
821         (WebInspector.StylePropertyTreeElement.prototype):
822         * inspector/front-end/UISourceCode.js:
823         (WebInspector.UILocation.prototype.uiLocationToRawLocation):
824         (WebInspector.UILocation.prototype.url):
825         * inspector/front-end/Workspace.js:
826         (WebInspector.Workspace):
827         * inspector/front-end/inspector.html:
828
829 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
830
831         Unreviewed r123761 follow-up, inspector closure compilation fix.
832
833         * inspector/front-end/Script.js:
834         (WebInspector.Script.Location.prototype.uiLocation):
835         * inspector/front-end/ScriptSnippetModel.js:
836
837 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
838
839         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
840         https://bugs.webkit.org/show_bug.cgi?id=92113
841
842         Reviewed by Simon Hausmann.
843
844         Cleanup the definition of the two methods across different ports and
845         replace the calls to them with LocalWindowsContext where possible.
846
847         * platform/graphics/GraphicsContext.h:
848         (GraphicsContext):
849         * platform/win/ScrollbarThemeWin.cpp:
850         (WebCore::ScrollbarThemeWin::paintThumb):
851
852 2012-07-27 Chris Fleizach <cfleizach@apple.com>
853
854         WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation
855         https://bugs.webkit.org/show_bug.cgi?id=91911
856
857         Reviewed by Anders Carlsson.
858
859         The ARIA spec states that the title attribute should be used as the last resort for a description of an element. WebKit needs to honor that.
860
861         Test: platform/mac/accessibility/title-attribute-used-as-last-resort.html
862
863         * accessibility/AccessibilityRenderObject.cpp:
864         (WebCore::AccessibilityRenderObject::helpText):
865         (WebCore::AccessibilityRenderObject::accessibilityDescription):
866
867 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
868
869         Unreviewed r123761 follow-up, inspector closure compilation fix.
870
871         * inspector/front-end/Script.js:
872         (WebInspector.Script.Location.prototype.uiLocation):
873         * inspector/front-end/ScriptSnippetModel.js:
874
875 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
876
877         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
878         https://bugs.webkit.org/show_bug.cgi?id=92113
879
880         Reviewed by Simon Hausmann.
881
882         Cleanup the definition of the two methods across different ports and
883         replace the calls to them with LocalWindowsContext where possible.
884
885         * platform/graphics/GraphicsContext.h:
886         (GraphicsContext):
887         * platform/win/ScrollbarThemeWin.cpp:
888         (WebCore::ScrollbarThemeWin::paintThumb):
889
890 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
891
892         Unreviewed r123761 follow-up, inspector closure compilation fix.
893
894         * inspector/front-end/Script.js:
895         (WebInspector.Script.Location.prototype.uiLocation):
896         * inspector/front-end/ScriptSnippetModel.js:
897
898 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
899
900         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
901         https://bugs.webkit.org/show_bug.cgi?id=92113
902
903         Reviewed by Simon Hausmann.
904
905         Cleanup the definition of the two methods across different ports and
906         replace the calls to them with LocalWindowsContext where possible.
907
908         * platform/graphics/GraphicsContext.h:
909         (GraphicsContext):
910         * platform/win/ScrollbarThemeWin.cpp:
911         (WebCore::ScrollbarThemeWin::paintThumb):
912
913 2012-07-26  Olivier Blin  <olivier.blin@softathome.com>
914
915         Add FastMalloc statistics in window.internals
916         https://bugs.webkit.org/show_bug.cgi?id=91274
917
918         Reviewed by Ryosuke Niwa.
919
920         Test: fast/harness/fastmallocstatistics-object.html
921
922         * CMakeLists.txt:
923         * DerivedSources.make:
924         * DerivedSources.pri:
925         * GNUmakefile.list.am:
926         * Target.pri:
927         * WebCore.gyp/WebCore.gyp:
928         * WebCore.gypi:
929         * WebCore.vcproj/WebCoreTestSupport.vcproj:
930         * WebCore.xcodeproj/project.pbxproj:
931         * testing/FastMallocStatistics.h: Added.
932         (WebCore):
933         (FastMallocStatistics):
934         (WebCore::FastMallocStatistics::create):
935         (WebCore::FastMallocStatistics::reservedVMBytes):
936         (WebCore::FastMallocStatistics::committedVMBytes):
937         (WebCore::FastMallocStatistics::freeListBytes):
938         (WebCore::FastMallocStatistics::FastMallocStatistics):
939         * testing/FastMallocStatistics.idl: Added.
940         * testing/Internals.cpp:
941         (WebCore::Internals::fastMallocStatistics):
942         (WebCore):
943         * testing/Internals.h:
944         (WebCore):
945         (Internals):
946         * testing/Internals.idl:
947
948 2012-07-26  Adrienne Walker  <enne@google.com>
949
950         [chromium] Remove redundant surface origin transforms
951         https://bugs.webkit.org/show_bug.cgi?id=91815
952
953         Reviewed by Stephen White.
954
955         Bug 91417 changed draw transforms to become equivalent to origin
956         transforms for surfaces. This change removes them as they are no
957         longer needed for anything.
958
959         No new tests. Just a refactoring.
960
961         * platform/graphics/chromium/RenderSurfaceChromium.h:
962         (RenderSurfaceChromium):
963         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
964         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
965         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
966         (WebCore::computeScrollCompensationMatrixForChildren):
967         (WebCore::calculateDrawTransformsInternal):
968         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
969         (WebCore::::leaveToRenderTarget):
970         (WebCore::::unoccludedContributingSurfaceContentRect):
971         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
972         (WebCore::CCRenderPassDrawQuad::create):
973         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
974         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
975         (CCRenderPassDrawQuad):
976         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
977         (WebCore::CCRenderSurface::createSharedQuadState):
978         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
979         (WebCore::CCRenderSurface::appendQuads):
980         * platform/graphics/chromium/cc/CCRenderSurface.h:
981         (CCRenderSurface):
982
983 2012-07-25  Andrey Kosyakov  <caseq@chromium.org>
984
985         Web Inspector: simplify handling of status bar items
986         https://bugs.webkit.org/show_bug.cgi?id=92143
987
988         Reviewed by Pavel Feldman.
989
990         - split status bars into "global" (always in the bottom) and "panel"
991             (on top of the drawer when drawer is shown)
992         - use "inner" status bar section in global status bar to display either
993             panel status bar items or drawer view items (depending on drawer visibility)
994         - let panels/views manage their counters as part of their status bar
995             items, not through special interface members;
996         - get rid of absolute positioning in the status bars where possible;
997
998         * inspector/front-end/AdvancedSearchController.js:
999         (WebInspector.SearchView.prototype.get statusBarItems):
1000         * inspector/front-end/Drawer.js:
1001         (WebInspector.Drawer):
1002         (WebInspector.Drawer.prototype.show.animationFinished):
1003         (WebInspector.Drawer.prototype.show):
1004         (WebInspector.Drawer.prototype.hide.animationFinished):
1005         (WebInspector.Drawer.prototype.hide):
1006         (WebInspector.Drawer.prototype._startStatusBarDragging):
1007         * inspector/front-end/Panel.js:
1008         (WebInspector.Panel.prototype.wasShown):
1009         * inspector/front-end/TimelinePanel.js:
1010         (WebInspector.TimelinePanel.prototype.get statusBarItems):
1011         (WebInspector.TimelinePanel.prototype.willHide):
1012         * inspector/front-end/elementsPanel.css:
1013         (.crumbs):
1014         * inspector/front-end/inspector.css:
1015         (#main):
1016         (body.drawer-visible #main-panels):
1017         (.status-bar):
1018         (.status-bar-item):
1019         (#panel-status-bar-placeholder):
1020         (body.drawer-visible #panel-status-bar-placeholder):
1021         (#panel-status-bar-resizer):
1022         (#panel-status-bar):
1023         (#panel-status-bar > div):
1024         (#error-warning-count):
1025         (#drawer):
1026         (#drawer-contents):
1027         (.status-bar-items):
1028         (.drawer-header):
1029         (#inner-status-bar):
1030         (.search-status-bar-item):
1031         (.search-status-bar-message):
1032         (.search-status-bar-progress):
1033         (body:not(.platform-mac) .search-status-bar-progress):
1034         (body.platform-mac .search-status-bar-progress):
1035         (.search-status-bar-stop-button-item):
1036         (.search-status-bar-stop-button .glyph):
1037         (.search-results-status-bar-message):
1038         * inspector/front-end/inspector.html:
1039         * inspector/front-end/inspector.js:
1040         (WebInspector._createGlobalStatusBarItems):
1041         (WebInspector.showViewInDrawer):
1042         (WebInspector._closePreviousDrawerView):
1043         * inspector/front-end/timelinePanel.css:
1044         (.timeline-records-counter):
1045
1046 2012-07-26  Christophe Dumez  <christophe.dumez@intel.com>
1047
1048         [EFL][WK2] Implement Network Information provider
1049         https://bugs.webkit.org/show_bug.cgi?id=92343
1050
1051         Reviewed by Kenneth Rohde Christiansen.
1052
1053         Moved Network Information provider code from WebKit1
1054         to WebCore so that it can be shared with WebKit2.
1055
1056         No new tests, no behavior change.
1057
1058         * PlatformEfl.cmake:
1059         * platform/efl/NetworkInfoProviderEfl.cpp: Copied from Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp.
1060         (WebCore):
1061         (WebCore::NetworkInfoProviderEfl::NetworkInfoProviderEfl):
1062         (WebCore::NetworkInfoProviderEfl::startUpdating):
1063         (WebCore::NetworkInfoProviderEfl::stopUpdating):
1064         (WebCore::NetworkInfoProviderEfl::bandwidth):
1065         * platform/efl/NetworkInfoProviderEfl.h: Added.
1066         (WebCore):
1067         (NetworkInfoProviderEfl):
1068
1069 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
1070
1071         Web Inspector: SASS source mapping straw man (behind experiment)
1072         https://bugs.webkit.org/show_bug.cgi?id=92265
1073
1074         Reviewed by Vsevolod Vlasov.
1075
1076         This change introduces SASS mapping support (behind the experiment).
1077
1078         * WebCore.gypi:
1079         * WebCore.vcproj/WebCore.vcproj:
1080         * inspector/compile-front-end.py:
1081         * inspector/front-end/CSSStyleModel.js:
1082         (WebInspector.CSSStyleModel):
1083         (WebInspector.CSSStyleModel.prototype.resourceBinding):
1084         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
1085         (WebInspector.CSSStyleModel.prototype.resetSourceMappings):
1086         (WebInspector.CSSStyleModel.prototype._rawLocationToUILocation):
1087         (WebInspector.CSSLocation):
1088         (WebInspector.CSSRule):
1089         (WebInspector.CSSRule.prototype.get isRegular):
1090         (WebInspector.CSSRule.prototype.uiLocation):
1091         * inspector/front-end/ContentProviders.js:
1092         (WebInspector.StaticContentProvider.prototype.contentType):
1093         * inspector/front-end/SASSSourceMapping.js: Added.
1094         (WebInspector.SASSSourceMapping):
1095         (WebInspector.SASSSourceMapping.prototype._populate):
1096         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
1097         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
1098         (rawLocationToUILocation):
1099         (uiLocationToRawLocation):
1100         (uiSourceCodes):
1101         (reset):
1102         (WebInspector.SASSSource):
1103         (WebInspector.SASSSource.prototype.isEditable):
1104         * inspector/front-end/ScriptsPanel.js:
1105         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1106         * inspector/front-end/Settings.js:
1107         (WebInspector.ExperimentsSettings):
1108         * inspector/front-end/StylesPanel.js:
1109         (WebInspector.StylesUISourceCodeProvider):
1110         (WebInspector.StylesUISourceCodeProvider.prototype.rawLocationToUILocation):
1111         (WebInspector.StylesUISourceCodeProvider.prototype.uiLocationToRawLocation):
1112         (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded):
1113         (WebInspector.StylesUISourceCodeProvider.prototype.reset):
1114         * inspector/front-end/StylesSidebarPane.js:
1115         (WebInspector.StylePropertyTreeElement.prototype):
1116         * inspector/front-end/UISourceCode.js:
1117         (WebInspector.UILocation.prototype.uiLocationToRawLocation):
1118         (WebInspector.UILocation.prototype.url):
1119         * inspector/front-end/Workspace.js:
1120         (WebInspector.Workspace):
1121         * inspector/front-end/inspector.html:
1122
1123 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
1124
1125         Unreviewed r123761 follow-up, inspector closure compilation fix.
1126
1127         * inspector/front-end/Script.js:
1128         (WebInspector.Script.Location.prototype.uiLocation):
1129         * inspector/front-end/ScriptSnippetModel.js:
1130
1131 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
1132
1133         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
1134         https://bugs.webkit.org/show_bug.cgi?id=92113
1135
1136         Reviewed by Simon Hausmann.
1137
1138         Cleanup the definition of the two methods across different ports and
1139         replace the calls to them with LocalWindowsContext where possible.
1140
1141         * platform/graphics/GraphicsContext.h:
1142         (GraphicsContext):
1143         * platform/win/ScrollbarThemeWin.cpp:
1144         (WebCore::ScrollbarThemeWin::paintThumb):
1145
1146 2012-07-27 Chris Fleizach <cfleizach@apple.com>
1147
1148         WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation
1149         https://bugs.webkit.org/show_bug.cgi?id=91911
1150
1151         Reviewed by Anders Carlsson.
1152
1153         The ARIA spec states that the title attribute should be used as the last resort for a description of an element. WebKit needs to honor that.
1154
1155         Test: platform/mac/accessibility/title-attribute-used-as-last-resort.html
1156
1157         * accessibility/AccessibilityRenderObject.cpp:
1158         (WebCore::AccessibilityRenderObject::helpText):
1159         (WebCore::AccessibilityRenderObject::accessibilityDescription):
1160
1161 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
1162
1163         Unreviewed r123761 follow-up, inspector closure compilation fix.
1164
1165         * inspector/front-end/Script.js:
1166         (WebInspector.Script.Location.prototype.uiLocation):
1167         * inspector/front-end/ScriptSnippetModel.js:
1168
1169 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
1170
1171         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
1172         https://bugs.webkit.org/show_bug.cgi?id=92113
1173
1174         Reviewed by Simon Hausmann.
1175
1176         Cleanup the definition of the two methods across different ports and
1177         replace the calls to them with LocalWindowsContext where possible.
1178
1179         * platform/graphics/GraphicsContext.h:
1180         (GraphicsContext):
1181         * platform/win/ScrollbarThemeWin.cpp:
1182         (WebCore::ScrollbarThemeWin::paintThumb):
1183
1184 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
1185
1186         Unreviewed r123761 follow-up, inspector closure compilation fix.
1187
1188         * inspector/front-end/Script.js:
1189         (WebInspector.Script.Location.prototype.uiLocation):
1190         * inspector/front-end/ScriptSnippetModel.js:
1191
1192 2012-07-26  Patrick Gansterer  <paroga@webkit.org>
1193
1194         Cleanup GraphicsContext::(getWindowsContext|releaseWindowsContext)
1195         https://bugs.webkit.org/show_bug.cgi?id=92113
1196
1197         Reviewed by Simon Hausmann.
1198
1199         Cleanup the definition of the two methods across different ports and
1200         replace the calls to them with LocalWindowsContext where possible.
1201
1202         * platform/graphics/GraphicsContext.h:
1203         (GraphicsContext):
1204         * platform/win/ScrollbarThemeWin.cpp:
1205         (WebCore::ScrollbarThemeWin::paintThumb):
1206
1207 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
1208
1209         Web Inspector: Introduce generic LiveLocation, make Script.Location inherit it.
1210         https://bugs.webkit.org/show_bug.cgi?id=92388
1211
1212         Reviewed by Pavel Feldman.
1213
1214         Introduced abstract LiveLocation implemented by Script.Location.
1215
1216         * inspector/front-end/Script.js:
1217         (WebInspector.Script.Location):
1218         (WebInspector.Script.Location.prototype.uiLocation):
1219         (WebInspector.Script.Location.prototype.dispose):
1220         * inspector/front-end/UISourceCode.js:
1221         (WebInspector.UISourceCode):
1222         (WebInspector.LiveLocation):
1223         (WebInspector.LiveLocation.prototype.update):
1224         (WebInspector.LiveLocation.prototype.rawLocation):
1225         (WebInspector.LiveLocation.prototype.uiLocation):
1226         (WebInspector.LiveLocation.prototype.dispose):
1227         * inspector/front-end/inspector.html:
1228
1229 2012-07-26  Joshua Netterfield  <jnetterfield@rim.com>
1230
1231         [BlackBerry] readPixels on FBOs are limited to canvas size on SGX platforms
1232         https://bugs.webkit.org/show_bug.cgi?id=92301
1233
1234         Reviewed by Rob Buis.
1235
1236         This fixes fast/canvas/webgl/uninitialized-test.html on BlackBerry, no new tests.
1237
1238         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1239         (WebCore::GraphicsContext3D::readPixels):
1240         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
1241
1242 2012-07-26  Alexei Filippov  <alexeif@chromium.org>
1243
1244         Web Inspector: reduce auto refresh rate of the live native memory diagram
1245         https://bugs.webkit.org/show_bug.cgi?id=92372
1246
1247         Reviewed by Pavel Feldman.
1248
1249         * inspector/front-end/NativeMemorySnapshotView.js:
1250         (WebInspector.NativeMemoryBarChart.prototype.wasShown):
1251
1252 2012-07-26  Alexei Filippov  <alexeif@chromium.org>
1253
1254         Web Inspector: add GC button to the profiles panel toolbar.
1255         https://bugs.webkit.org/show_bug.cgi?id=92369
1256
1257         Reviewed by Pavel Feldman.
1258
1259         * inspector/front-end/ProfilesPanel.js:
1260         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
1261         (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
1262         * inspector/front-end/profilesPanel.css:
1263         (.garbage-collect-status-bar-item .glyph):
1264
1265 2012-07-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1266
1267         Move region from HitTestResult to HitTestPoint.
1268         https://bugs.webkit.org/show_bug.cgi?id=92367
1269
1270         Reviewed by Antonio Gomes.
1271
1272         Moves the region to HitTestPoint where it makes more sense, and use this
1273         change to simplify hit-testing a new region in RenderFlowThread.
1274
1275         No new functionality. No new tests.
1276
1277         * rendering/HitTestResult.cpp:
1278         (WebCore::HitTestPoint::HitTestPoint):
1279         (WebCore::HitTestPoint::operator=):
1280         (WebCore::HitTestResult::HitTestResult):
1281         (WebCore::HitTestResult::operator=):
1282         * rendering/HitTestResult.h:
1283         (HitTestPoint):
1284         (WebCore::HitTestPoint::region):
1285         (HitTestResult):
1286         * rendering/RenderBlock.cpp:
1287         (WebCore::RenderBlock::nodeAtPoint):
1288         * rendering/RenderBox.cpp:
1289         (WebCore::RenderBox::nodeAtPoint):
1290         * rendering/RenderFlowThread.cpp:
1291         (WebCore::RenderFlowThread::hitTestRegion):
1292         * rendering/RenderLayer.cpp:
1293         (WebCore::RenderLayer::hitTestLayer):
1294         * rendering/RenderRegion.cpp:
1295         (WebCore::RenderRegion::nodeAtPoint):
1296         * rendering/RenderTable.cpp:
1297         (WebCore::RenderTable::nodeAtPoint):
1298         * rendering/RenderTableSection.cpp:
1299         (WebCore::RenderTableSection::nodeAtPoint):
1300
1301 2012-07-26  Jan Keromnes  <janx@linux.com>
1302
1303         Web Inspector: ExtensionView constructor shouldn't take parent argument
1304         https://bugs.webkit.org/show_bug.cgi?id=92326
1305
1306         Reviewed by Pavel Feldman.
1307
1308         ExtensionView's constructor took a parent element parameter and auto-
1309         showed itself in the constructor. This didn't allow lazy showing and
1310         was confusing because it didn't work like a classic View object. Fixed.
1311
1312         No new tests needed: Refactoring with no behavior changes.
1313
1314         * inspector/front-end/ExtensionPanel.js:
1315         (WebInspector.ExtensionPanel):
1316         (WebInspector.ExtensionSidebarPane.prototype.setPage):
1317         * inspector/front-end/ExtensionView.js:
1318         (WebInspector.ExtensionView):
1319
1320 2012-07-26  Joshua Netterfield  <jnetterfield@rim.com>
1321
1322         [WebGL] ANGLEWebKitBridge should support ESSL platforms
1323         https://bugs.webkit.org/show_bug.cgi?id=92295
1324
1325         Reviewed by Rob Buis.
1326
1327         This tells ANGLEWebKitBridge to output ESSL code for the BlackBerry
1328         platform. This eliminates the need for a previous hack. In addition,
1329         some (GLSL) ANGLE output that could not be compiled (for example,
1330         glsl-mat4-to-mat3.html) now compiles.
1331
1332         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
1333         (WebCore::GraphicsContext3D::GraphicsContext3D):
1334         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1335         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1336
1337 2012-07-26  Pavel Feldman  <pfeldman@chromium.org>
1338
1339         Web Inspector: replace "textInput" keyboard event listener breakpoint with "input"
1340         https://bugs.webkit.org/show_bug.cgi?id=92384
1341
1342         Reviewed by Vsevolod Vlasov.
1343
1344         * inspector/front-end/BreakpointsSidebarPane.js:
1345         (WebInspector.EventListenerBreakpointsSidebarPane):
1346
1347 2012-07-26  Jer Noble  <jer.noble@apple.com>
1348
1349         Add a MediaPlayer API to retrieve the description of the current media engine.
1350         https://bugs.webkit.org/show_bug.cgi?id=92336
1351
1352         Reviewed by Eric Carlson.
1353
1354         Add a utility function which retrieves, for diagnostic purposes, a brief description
1355         of the current media engine. Stubs have been added for each of the MediaPlayerPrivate
1356         subclasses which return the name of the class.
1357
1358         * platform/graphics/MediaPlayer.cpp:
1359         (WebCore::MediaPlayer::engineDescription):
1360         * platform/graphics/MediaPlayer.h:
1361         * platform/graphics/MediaPlayerPrivate.h:
1362         (WebCore::MediaPlayerPrivateInterface::engineDescription):
1363         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1364         (WebCore::MediaPlayerPrivateAVFoundation::engineDescription):
1365         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1366         (WebCore::MediaPlayerPrivate::engineDescription):
1367         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1368         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
1369         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1370         (WebCore::MediaPlayerPrivateQTKit::engineDescription):
1371         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1372         (WebCore::MediaPlayerPrivateQt::engineDescription):
1373         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
1374         (WebCore::MediaPlayerPrivate::engineDescription):
1375         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
1376         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::engineDescription):
1377
1378 2012-07-26  Pavel Feldman  <pfeldman@chromium.org>
1379
1380         Web Inspector: Edits of styles declared after invalid selector are not applied
1381         https://bugs.webkit.org/show_bug.cgi?id=92382
1382
1383         Reviewed by Vsevolod Vlasov.
1384
1385         Now popping selectorless rules as well.
1386
1387         Test: inspector/styles/styles-edit-property-after-invalid-rule.html
1388
1389         * css/CSSParser.cpp:
1390         (WebCore::CSSParser::createStyleRule):
1391
1392 2012-07-26  Joshua Netterfield  <jnetterfield@rim.com>
1393
1394         [WebGL] GraphicsContext3D::readPixels has extraneous code from GraphicsContext3D::readPixelsIMG
1395         https://bugs.webkit.org/show_bug.cgi?id=92302
1396
1397         Reviewed by Noam Rosenthal.
1398
1399         This undoes a mistake from https://bugs.webkit.org/show_bug.cgi?id=90567.
1400
1401         No new tests, because it introduces no new functionality, but it makes the WebGL aquarium demo
1402         run quite a bit smoother on SGX :)
1403
1404         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1405         (WebCore::GraphicsContext3D::readPixels):
1406
1407 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1408
1409         Unreviewed. Revert r123740 as it breaks AppleMac compilation.
1410
1411         * WebCore.exp.in:
1412         * inspector/InspectorMemoryAgent.cpp:
1413         (WebCore):
1414
1415 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1416
1417         Unreviewed. Fix AppleMac compilation after r123740.
1418
1419         * WebCore.exp.in: Added missing symbol.
1420
1421 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1422
1423         Web Inspector: move StringImpl size calculation to StringImpl
1424         https://bugs.webkit.org/show_bug.cgi?id=92359
1425
1426         Reviewed by Pavel Feldman.
1427
1428         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
1429         StringImpl::sizeInBytes();
1430
1431         * inspector/InspectorMemoryAgent.cpp:
1432         (WebCore):
1433
1434 2012-07-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1435
1436         Remove redundant include of PageGroup.h in FrameLoader.cpp
1437         https://bugs.webkit.org/show_bug.cgi?id=92357
1438
1439         Reviewed by Kentaro Hara.
1440
1441
1442         No new tests, just remove redundant include file.
1443
1444         * loader/FrameLoader.cpp:
1445
1446 2012-07-26  Eric Seidel  <eric@webkit.org>
1447
1448         2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute
1449         https://bugs.webkit.org/show_bug.cgi?id=92257
1450
1451         Reviewed by Andreas Kling.
1452
1453         This check was added 7 years ago by hyatt in:
1454         http://trac.webkit.org/changeset/10984
1455         And then later made slow after triggering an ASSERT added:
1456         http://trac.webkit.org/changeset/97670
1457
1458         SVG uses a "type" attribute (and it is animatable), but only when
1459         used on filter elements:
1460         http://www.w3.org/TR/SVG/attindex.html
1461         In any case, this does not apply here, and is certainly not what
1462         this check was originally intended for.
1463
1464         I've moved the check to canShareStyleWithControl
1465         as it is only needed when the elements in question are both input elements.
1466
1467         * css/StyleResolver.cpp:
1468         (WebCore::StyleResolver::collectMatchingRulesForList):
1469
1470 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1471
1472         Web Inspector: add memory reporting routine to StyleResolver
1473         https://bugs.webkit.org/show_bug.cgi?id=92259
1474
1475         Reviewed by Vsevolod Vlasov.
1476
1477         SyleResolver::reportMemoryUsage is added for estimating StyleResolver
1478         memory footprint.
1479
1480         * css/StyleResolver.cpp:
1481         (RuleData):
1482         (RuleSet):
1483         (RuleSetSelectorPair):
1484         (WebCore::StyleResolver::Features::reportMemoryUsage):
1485         (WebCore):
1486         (WebCore::StyleResolver::collectMatchingRulesForList):
1487         * css/StyleResolver.h:
1488         (Features):
1489         (StyleResolver):
1490         * dom/Document.cpp:
1491         (WebCore::Document::reportMemoryUsage):
1492         * dom/MemoryInstrumentation.h:
1493         (MemoryInstrumentation):
1494         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
1495         (WebCore::MemoryClassInfo::addInstrumentedVector):
1496         (WebCore::MemoryInstrumentation::addHashMap):
1497         (WebCore):
1498         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
1499
1500 2012-07-26  Tommy Widenflycht  <tommyw@google.com>
1501
1502         MediaStream API: Remove DeprecatedPeerConnection
1503         https://bugs.webkit.org/show_bug.cgi?id=92106
1504
1505         Reviewed by Adam Barth.
1506
1507         Since we are getting ready to add an updated PeerConnection
1508         the old DeprecatedPeerConnection will have to go.
1509
1510         No new tests, and old tests converted to use PeerConnection00.
1511
1512         * CMakeLists.txt:
1513         * GNUmakefile.list.am:
1514         * Modules/mediastream/DOMWindowMediaStream.idl:
1515         * Modules/mediastream/DeprecatedPeerConnection.cpp: Removed.
1516         * Modules/mediastream/DeprecatedPeerConnection.h: Removed.
1517         * Modules/mediastream/DeprecatedPeerConnection.idl: Removed.
1518         * Modules/mediastream/SignalingCallback.h: Removed.
1519         * Modules/mediastream/SignalingCallback.idl: Removed.
1520         * PlatformBlackBerry.cmake:
1521         * PlatformEfl.cmake:
1522         * UseJSC.cmake:
1523         * WebCore.gypi:
1524         * bindings/generic/RuntimeEnabledFeatures.h:
1525         * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: Removed.
1526         * dom/EventTargetFactory.in:
1527         * platform/mediastream/DeprecatedPeerConnectionHandler.h: Removed.
1528         * platform/mediastream/DeprecatedPeerConnectionHandlerClient.h: Removed.
1529         * platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Removed.
1530         * platform/mediastream/chromium/DeprecatedPeerConnectionHandler.cpp: Removed.
1531         * platform/mediastream/chromium/DeprecatedPeerConnectionHandlerInternal.cpp: Removed.
1532         * platform/mediastream/chromium/DeprecatedPeerConnectionHandlerInternal.h: Removed.
1533         * platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp: Removed.
1534
1535 2012-07-26  Mike West  <mkwst@chromium.org>
1536
1537         CSP 1.1: Implement the Content Security Policy script interface.
1538         https://bugs.webkit.org/show_bug.cgi?id=91707
1539
1540         Reviewed by Adam Barth.
1541
1542         The CSP 1.1 editor's draft defines a script interface that gives
1543         developers the ability to query a document regarding the restrictions
1544         set by it's currently active content security policy[1]. This patch
1545         exposes that API in terms of a new DOMSecurityPolicy object.
1546
1547         Data for the API is gathered from the existing ContentSecurityPolicy
1548         object on the containing document. CSP's various methods have been
1549         extended with a `reportingStatus` parameter which, unsurprisingly,
1550         determines whether a violation report should be sent for blocked
1551         resources. This allows us to reuse the same codepaths by simply using
1552         ContentSecurityPolicy::SuppressReport when querying on behalf of the
1553         API, and ContentSecurityPolicy::SendReport when checking resources a
1554         page wants to load.
1555
1556         This feature is gated on the CSP_NEXT flag, which is currently disabled
1557         for all ports other than Chromium.
1558
1559         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-interfaces--experimental
1560
1561         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html
1562                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-alloweval.html
1563                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom.html
1564                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom.html
1565                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom.html
1566                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom.html
1567                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom.html
1568                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom.html
1569                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom.html
1570                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive.html
1571                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.html
1572
1573         * CMakeLists.txt:
1574         * DerivedSources.cpp:
1575         * DerivedSources.make:
1576         * DerivedSources.pri:
1577         * GNUmakefile.list.am:
1578         * WebCore.gypi:
1579         * bindings/gobject/GNUmakefile.am:
1580         * WebCore.xcodeproj/project.pbxproj:
1581             We added a new object, so let's tell _everyone!_
1582         * dom/Document.cpp:
1583         (WebCore::Document::securityPolicy):
1584             Expose the SecurityPolicy object via Document, gated on CSP_NEXT.
1585         (WebCore):
1586         * dom/Document.h:
1587         (WebCore):
1588         (Document):
1589         * dom/Document.idl:
1590             Adding the SecurityPolicy object to the document, gated on CSP_NEXT.
1591         * page/ContentSecurityPolicy.cpp:
1592         (CSPDirectiveList):
1593         (WebCore::CSPDirectiveList::checkInline):
1594         (WebCore::CSPDirectiveList::checkNonce):
1595         (WebCore::CSPDirectiveList::checkSource):
1596             Extracting the core checks out into separate methods.
1597         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
1598             Use checkEval.
1599         (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
1600             Use checkNonce.
1601         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
1602             Use checkInline.
1603         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
1604             Use checkSource.
1605         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
1606         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
1607         (WebCore::CSPDirectiveList::allowInlineScript):
1608         (WebCore::CSPDirectiveList::allowInlineStyle):
1609         (WebCore::CSPDirectiveList::allowEval):
1610         (WebCore::CSPDirectiveList::allowScriptFromSource):
1611         (WebCore::CSPDirectiveList::allowObjectFromSource):
1612         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
1613         (WebCore::CSPDirectiveList::allowImageFromSource):
1614         (WebCore::CSPDirectiveList::allowStyleFromSource):
1615         (WebCore::CSPDirectiveList::allowFontFromSource):
1616         (WebCore::CSPDirectiveList::allowMediaFromSource):
1617         (WebCore::CSPDirectiveList::allowConnectToSource):
1618             These methods now branch on `reportingStatus`: if `SendReoport`,
1619             they call `checkXAndReportViolation`, otherwise, they call `checkX`.
1620         (WebCore::CSPDirectiveList::gatherReportURIs):
1621             New method that gathers the violation report URIs into a DOMStringList.
1622         (WebCore::isAllowedByAllWithCallStack):
1623         (WebCore::isAllowedByAllWithContext):
1624         (WebCore::isAllowedByAllWithURL):
1625             These now pass reportingStatus through to the various `allowX` methods.
1626         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
1627         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
1628         (WebCore::ContentSecurityPolicy::allowInlineScript):
1629         (WebCore::ContentSecurityPolicy::allowInlineStyle):
1630         (WebCore::ContentSecurityPolicy::allowEval):
1631         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
1632         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
1633         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
1634         (WebCore::ContentSecurityPolicy::allowImageFromSource):
1635         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
1636         (WebCore::ContentSecurityPolicy::allowFontFromSource):
1637         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
1638         (WebCore::ContentSecurityPolicy::allowConnectToSource):
1639             These accept a new `reportingStatus` parameter, which is passed through
1640             to the CSPDirectiveList methods.
1641         (WebCore::ContentSecurityPolicy::isActive):
1642             New method that returns `true` if policy is active.
1643         (WebCore::ContentSecurityPolicy::gatherReportURIs):
1644             New method that returns a DOMStringList of violation report URIs.
1645         * page/ContentSecurityPolicy.h:
1646         (WebCore):
1647         * page/DOMSecurityPolicy.cpp: Added.
1648         (WebCore::DOMSecurityPolicy::DOMSecurityPolicy):
1649         (WebCore):
1650         (WebCore::DOMSecurityPolicy::~DOMSecurityPolicy):
1651         (WebCore::DOMSecurityPolicy::isActive):
1652         (WebCore::DOMSecurityPolicy::reportURIs):
1653         (WebCore::DOMSecurityPolicy::allowsInlineScript):
1654         (WebCore::DOMSecurityPolicy::allowsInlineStyle):
1655         (WebCore::DOMSecurityPolicy::allowsEval):
1656         (WebCore::DOMSecurityPolicy::allowsConnectionTo):
1657         (WebCore::DOMSecurityPolicy::allowsFontFrom):
1658         (WebCore::DOMSecurityPolicy::allowsFrameFrom):
1659         (WebCore::DOMSecurityPolicy::allowsImageFrom):
1660         (WebCore::DOMSecurityPolicy::allowsMediaFrom):
1661         (WebCore::DOMSecurityPolicy::allowsObjectFrom):
1662         (WebCore::DOMSecurityPolicy::allowsScriptFrom):
1663         (WebCore::DOMSecurityPolicy::allowsStyleFrom):
1664         * page/DOMSecurityPolicy.h: Added.
1665         (WebCore):
1666         (DOMSecurityPolicy):
1667         (WebCore::DOMSecurityPolicy::create):
1668         * page/DOMSecurityPolicy.idl: Added.
1669
1670 2012-07-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1671
1672         Unreviewed. Fix build break on mac win port by r123716.
1673
1674         * platform/KURL.h:
1675         (KURL):
1676
1677 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1678
1679         Unreviewed, rolling out r123715.
1680         http://trac.webkit.org/changeset/123715
1681         https://bugs.webkit.org/show_bug.cgi?id=92356
1682
1683         Breaks compilation on multiple platforms (Requested by vsevik
1684         on #webkit).
1685
1686         * inspector/InspectorController.cpp:
1687         (WebCore::InspectorController::InspectorController):
1688         (WebCore::InspectorController::inspectedPageDestroyed):
1689         * inspector/InspectorInstrumentation.cpp:
1690         (WebCore):
1691         * inspector/InspectorInstrumentation.h:
1692         (InspectorInstrumentation):
1693         * inspector/InspectorResourceAgent.cpp:
1694         (WebCore::InspectorResourceAgent::didReceiveData):
1695         (WebCore::InspectorResourceAgent::getResponseBody):
1696         * inspector/InspectorResourceAgent.h:
1697         (InspectorResourceAgent):
1698         * inspector/NetworkResourcesData.cpp:
1699         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1700         (WebCore::NetworkResourcesData::ResourceData::setContent):
1701         (WebCore::NetworkResourcesData::ResourceData::dataLength):
1702         (WebCore::NetworkResourcesData::ResourceData::appendData):
1703         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
1704         (WebCore::NetworkResourcesData::setResourceContent):
1705         (WebCore::NetworkResourcesData::maybeAddResourceData):
1706         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
1707         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
1708         (WebCore::NetworkResourcesData::ensureFreeSpace):
1709         * inspector/NetworkResourcesData.h:
1710         (ResourceData):
1711         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1712         (NetworkResourcesData):
1713         * loader/cache/CachedResource.cpp:
1714         (WebCore::CachedResource::~CachedResource):
1715         (WebCore::CachedResource::removeClient):
1716         (WebCore::CachedResource::deleteIfPossible):
1717         * loader/cache/CachedResource.h:
1718         (CachedResource):
1719         * loader/cache/CachedResourceLoader.cpp:
1720         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1721         (WebCore::CachedResourceLoader::clearPreloads):
1722         * loader/cache/CachedResourceLoader.h:
1723         (CachedResourceLoader):
1724         * loader/cache/MemoryCache.cpp:
1725         (WebCore::MemoryCache::evict):
1726         * testing/InternalSettings.cpp:
1727         * testing/Internals.cpp:
1728         * testing/Internals.h:
1729         (Internals):
1730
1731 2012-07-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1732
1733         Add *explicit* keyword to constructors in WebCore/platform
1734         https://bugs.webkit.org/show_bug.cgi?id=92238
1735
1736         Reviewed by Kentaro Hara.
1737
1738         As a step to let *explicit* keyword add to constructors which have a parameter,
1739         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
1740         type conversion.
1741
1742         Some files in platform directory can't use explicit keyword because of build breaks.
1743
1744         No new tests. Covered by existing tests.
1745
1746         * platform/AutodrainedPool.h:
1747         (AutodrainedPool):
1748         * platform/ContentType.h:
1749         (ContentType):
1750         * platform/ContextMenu.h:
1751         (ContextMenu):
1752         * platform/ContextMenuItem.h:
1753         (ContextMenuItem):
1754         * platform/Cursor.h:
1755         (WebCore::SharedCursor::SharedCursor):
1756         (Cursor):
1757         * platform/KURL.h:
1758         (WebCore::KURL::KURL):
1759         (KURL):
1760         * platform/KURLGooglePrivate.h:
1761         (KURLGooglePrivate):
1762         * platform/PODRedBlackTree.h:
1763         (WebCore::PODRedBlackTree::PODRedBlackTree):
1764         * platform/Pasteboard.h:
1765         (Pasteboard):
1766         * platform/PlatformEvent.h:
1767         (WebCore::PlatformEvent::PlatformEvent):
1768         * platform/PlatformKeyboardEvent.h:
1769         (PlatformKeyboardEvent):
1770         * platform/PlatformMouseEvent.h:
1771         (PlatformMouseEvent):
1772         * platform/PlatformPasteboard.h:
1773         (PlatformPasteboard):
1774         * platform/PlatformTouchEvent.h:
1775         (PlatformTouchEvent):
1776         * platform/PlatformWheelEvent.h:
1777         (PlatformWheelEvent):
1778         * platform/RunLoop.h:
1779         (TimerBase):
1780         * platform/ScrollAnimator.h:
1781         (ScrollAnimator):
1782         * platform/ScrollAnimatorNone.h:
1783         (ScrollAnimatorNone):
1784         * platform/SharedBuffer.h:
1785         (SharedBuffer):
1786         * platform/WheelFlingPlatformGestureCurve.h:
1787         (WheelFlingPlatformGestureCurve):
1788         * platform/Widget.h:
1789         (Widget):
1790
1791 2012-07-26  Vsevolod Vlasov  <vsevik@chromium.org>
1792
1793         Web Inspector: Resource agent's reference to cached resources should be weak.
1794         https://bugs.webkit.org/show_bug.cgi?id=92108
1795
1796         Reviewed by Pavel Feldman.
1797
1798         NetworkResourcesData now stores a raw pointer to CachedResource.
1799         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
1800         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
1801         Destroyed resources content is saved to NetworkResourcesData.
1802         Changed content size variables type in NetworkResourcesData from int to size_t.
1803
1804         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
1805                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
1806
1807         * inspector/InspectorController.cpp:
1808         (WebCore::InspectorController::InspectorController):
1809         (WebCore::InspectorController::inspectedPageDestroyed):
1810         * inspector/InspectorInstrumentation.cpp:
1811         (WebCore):
1812         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
1813         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
1814         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
1815         * inspector/InspectorInstrumentation.h:
1816         (InspectorInstrumentation):
1817         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
1818         (WebCore):
1819         * inspector/InspectorResourceAgent.cpp:
1820         (WebCore::InspectorResourceAgent::didReceiveData):
1821         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
1822         (WebCore):
1823         (WebCore::InspectorResourceAgent::getResponseBody):
1824         * inspector/InspectorResourceAgent.h:
1825         (InspectorResourceAgent):
1826         * inspector/NetworkResourcesData.cpp:
1827         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1828         (WebCore::NetworkResourcesData::ResourceData::setContent):
1829         (WebCore::NetworkResourcesData::ResourceData::dataLength):
1830         (WebCore::NetworkResourcesData::ResourceData::appendData):
1831         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
1832         (WebCore::NetworkResourcesData::setResourceContent):
1833         (WebCore::NetworkResourcesData::maybeAddResourceData):
1834         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
1835         (WebCore::NetworkResourcesData::removeCachedResource):
1836         (WebCore):
1837         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
1838         (WebCore::NetworkResourcesData::ensureFreeSpace):
1839         * inspector/NetworkResourcesData.h:
1840         (ResourceData):
1841         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
1842         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1843         (NetworkResourcesData):
1844         * loader/cache/CachedResource.cpp:
1845         (WebCore::CachedResource::~CachedResource):
1846         (WebCore::CachedResource::removeClient):
1847         (WebCore::CachedResource::deleteIfPossible):
1848         * loader/cache/CachedResource.h:
1849         (CachedResource):
1850         * loader/cache/CachedResourceLoader.cpp:
1851         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1852         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
1853         (WebCore::CachedResourceLoader::clearPreloads):
1854         * loader/cache/CachedResourceLoader.h:
1855         (CachedResourceLoader):
1856         * loader/cache/MemoryCache.cpp:
1857         (WebCore::MemoryCache::evict):
1858         * testing/InternalSettings.cpp:
1859         * testing/Internals.cpp:
1860         (WebCore::Internals::garbageCollectDocumentResources):
1861         (WebCore):
1862         * testing/Internals.h:
1863         (Internals):
1864
1865 2012-07-26  Luke Macpherson   <macpherson@chromium.org>
1866
1867         Fix null ptr deref in CSSParser::storeVariableDeclaration().
1868         https://bugs.webkit.org/show_bug.cgi?id=92333
1869
1870         Reviewed by Andreas Kling.
1871
1872         Fix null pointer deref that occurs if the CSSParserValue couldn't be converted to a CSSValue.
1873
1874         Test fast/css/variables/variable-unparseable-value-crash.html added.
1875
1876         * css/CSSParser.cpp:
1877         (WebCore::CSSParser::storeVariableDeclaration):
1878
1879 2012-07-26  Shinya Kawanaka  <shinyak@chromium.org>
1880
1881         Add UserAgentShadowDOM to FormControlElement just before adding AuthorShadowDOM
1882         https://bugs.webkit.org/show_bug.cgi?id=90866
1883
1884         Reviewed by Hajime Morita.
1885
1886         It ensures that UserAgentShadowDOM is the oldest ShadowDOM.
1887
1888         To show ValidationMessage, WebKit adds a Shadow DOM to some of FormControlElements.
1889         ValidationMessage assumes that the added Shadow DOM is the oldest, however, there was a case
1890         that a page author might add a Shadow DOM before ValidationMessage adds a Shadow DOM.
1891         It will break the assumption that the Shadow DOM added by ValidationMessage is the oldest.
1892         So we have prohibited a page author adding a Shadow DOM to FormControlElement.
1893
1894         To add UserAgentShadowDOM, we use a callback which is called before a page author adding a Shadow DOM.
1895         It adds a UserAgentShadowDOM if it does not exist, so we can ensure that UserAgentShadowDOM is the oldest.
1896
1897         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
1898                fast/dom/shadow/input-with-validation.html
1899                fast/dom/shadow/shadowdom-for-button-complex-shadow.html
1900                fast/dom/shadow/shadowdom-for-button-only-shadow.html
1901                fast/dom/shadow/shadowdom-for-button-without-shadow.html
1902                fast/dom/shadow/shadowdom-for-fieldset-complex-shadow.html
1903                fast/dom/shadow/shadowdom-for-fieldset-only-shadow.html
1904                fast/dom/shadow/shadowdom-for-fieldset-without-shadow.html
1905                fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html
1906                fast/dom/shadow/shadowdom-for-keygen-complex-shadow.html
1907                fast/dom/shadow/shadowdom-for-keygen-only-shadow.html
1908                fast/dom/shadow/shadowdom-for-keygen-without-shadow.html
1909                fast/dom/shadow/shadowdom-for-object-complex-shadow.html
1910                fast/dom/shadow/shadowdom-for-object-only-shadow.html
1911                fast/dom/shadow/shadowdom-for-object-without-shadow.html
1912                fast/dom/shadow/shadowdom-for-output-complex-shadow.html
1913                fast/dom/shadow/shadowdom-for-output-only-shadow.html
1914                fast/dom/shadow/shadowdom-for-output-without-shadow.html
1915                fast/dom/shadow/shadowdom-for-select-complex-shadow.html
1916                fast/dom/shadow/shadowdom-for-select-only-shadow.html
1917                fast/dom/shadow/shadowdom-for-select-without-shadow.html
1918                fast/dom/shadow/shadowdom-for-textarea-complex-shadow.html
1919                fast/dom/shadow/shadowdom-for-textarea-only-shadow.html
1920                fast/dom/shadow/shadowdom-for-textarea-without-shadow.html
1921
1922         * dom/ShadowRoot.cpp:
1923         (WebCore::allowsAuthorShadowRoot):
1924         * html/FormAssociatedElement.cpp:
1925         (WebCore::FormAssociatedElement::ensureUserAgentShadowRoot): Ensures the existence of a UserAgentShadowRoot.
1926         If it does not exist, we create it with empty content.
1927         (WebCore):
1928         * html/FormAssociatedElement.h:
1929         (FormAssociatedElement):
1930         * html/HTMLFormControlElement.cpp:
1931         (WebCore::HTMLFormControlElement::willAddAuthorShadowRoot):
1932         (WebCore):
1933         * html/HTMLFormControlElement.h:
1934         (HTMLFormControlElement):
1935         * html/ValidationMessage.cpp:
1936         (WebCore::adjustBubblePosition): When AuthroShadowRoot does not a shadow element, ValidationMessage
1937         does not have a renderer. So we have to check the existence of renderer.
1938         (WebCore::ValidationMessage::buildBubbleTree):
1939
1940 2012-07-26  Kaustubh Atrawalkar  <kaustubh@motorola.com>
1941
1942         [DRT] LTC:: pageNumberForElementById() could be moved to Internals
1943         https://bugs.webkit.org/show_bug.cgi?id=92091
1944
1945         Reviewed by Adam Barth.
1946
1947         Move the pageNumberForElementById from LayoutTestCotroller to Internals and
1948         remove the old platform specific implementations as it exclusively tests WebCore functionality.
1949
1950         Covered by existing test cases.
1951
1952         * testing/Internals.cpp:
1953         (WebCore::Internals::counterValue):
1954         (WebCore):
1955         (WebCore::Internals::pageNumber):
1956         * testing/Internals.h:
1957         (Internals):
1958         (WebCore::Internals::pageNumber):
1959         * testing/Internals.idl:
1960
1961 2012-07-25  MORITA Hajime  <morrita@google.com>
1962
1963         [Chromium][Win] <progress> animation on RTL direction is reverse
1964         https://bugs.webkit.org/show_bug.cgi?id=92236
1965
1966         Reviewed by Kent Tamura.
1967
1968         This change modfies the way to handle RTL progress bar painting.
1969         Originally it computes the flipped coordinates. This change uses transformation for the flip.
1970         DirectionFlippingScope handles it.
1971
1972         * rendering/RenderThemeChromiumLinux.cpp:
1973         (WebCore::RenderThemeChromiumLinux::paintProgressBar): Applied DirectionFlippingScope
1974         * rendering/RenderThemeChromiumSkia.cpp:
1975         (WebCore::RenderThemeChromiumSkia::determinateProgressValueRectFor):
1976         - Deleted RTL handling in favor of DirectionFlippingScope
1977         (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::DirectionFlippingScope):
1978         (WebCore):
1979         (WebCore::RenderThemeChromiumSkia::DirectionFlippingScope::~DirectionFlippingScope):
1980         * rendering/RenderThemeChromiumSkia.h:
1981         (RenderThemeChromiumSkia):
1982         (DirectionFlippingScope): Added.
1983         * rendering/RenderThemeChromiumWin.cpp:
1984         (WebCore):
1985         (WebCore::RenderThemeChromiumWin::paintProgressBar): Applied DirectionFlippingScope
1986
1987 2012-07-25  Vineet Chaudhary  <rgf748@motorola.com>
1988
1989         https://bugs.webkit.org/show_bug.cgi?id=92260
1990         Repalce "int" with "long" from WebCore/*.idls
1991
1992         Reviewed by Adam Barth.
1993
1994         As per the WebIDL spec IDL shouldn't have int attributes but long instead.
1995         Repalced attributes types int with long from WebCore/*.idls.
1996
1997         No new tests. TestObj.idl already covers this.
1998         There should be no behavioural changes.
1999
2000         * dom/Touch.idl: Repalce int with long.
2001         * dom/WebKitNamedFlow.idl: Ditto.
2002         * html/canvas/ArrayBuffer.idl: Ditto.
2003         * html/canvas/WebGLActiveInfo.idl: Ditto.
2004         * html/canvas/WebGLShaderPrecisionFormat.idl: Ditto.
2005         * page/WebKitAnimation.idl: Ditto.
2006
2007 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
2008
2009         The elements in ShadowDOM of meter or progress should not be modifiable.
2010         https://bugs.webkit.org/show_bug.cgi?id=92199
2011
2012         Reviewed by Hajime Morita.
2013
2014         A user can set -webkit-user-modify: read-write to the elements in Shadow DOM in a meter or progress element.
2015         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
2016
2017         We add default css values to elements in ShadowDOM of meter or progress to prohibit editing them.
2018
2019         Tests: fast/html/meter-user-modify.html
2020                fast/html/progress-user-modify.html
2021
2022         * css/html.css:
2023         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
2024         changed by a user.
2025         (meter::-webkit-meter-bar):
2026         (meter::-webkit-meter-optimum-value):
2027         (meter::-webkit-meter-suboptimum-value):
2028         (meter::-webkit-meter-even-less-good-value):
2029         (progress::-webkit-progress-bar):
2030         (progress::-webkit-progress-value):
2031
2032 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
2033
2034         [BlackBerry] GraphicsContext3D::paintToCanvas should not swap 0th and 2nd components of color
2035         https://bugs.webkit.org/show_bug.cgi?id=92314
2036
2037         Reviewed by Rob Buis.
2038
2039         No new tests, because it corrects existing functionality, but it makes BlackBerry
2040         pass canvas-text.html and others.
2041
2042         * platform/graphics/GraphicsContext3D.h:
2043         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2044         (WebCore::GraphicsContext3D::paintToCanvas):
2045         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2046         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2047
2048 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
2049
2050         [BlackBerry] GraphicsContext3D::reshapeFBOs does not report when bound FBOs should be restored
2051         https://bugs.webkit.org/show_bug.cgi?id=92304
2052
2053         Reviewed by Rob Buis.
2054
2055         No new tests, because it corrects existing functionality, but it makes BlackBerry
2056         pass framebuffer-bindings-unaffected-on-resize.html.
2057
2058         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2059         (WebCore::GraphicsContext3D::reshapeFBOs):
2060
2061 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
2062
2063         [BlackBerry] readPixels should set alpha to 255 instead of 0 when alpha is disabled
2064         https://bugs.webkit.org/show_bug.cgi?id=92303
2065
2066         Reviewed by Rob Buis.
2067
2068         No new tests, because it corrects existing functionality, but it makes BlackBerry
2069         pass context-attributes-alpha-depth-stencil-antialias.html.
2070
2071         * html/canvas/WebGLRenderingContext.cpp:
2072         (WebCore):
2073         (WebCore::WebGLRenderingContext::readPixels):
2074
2075 2012-07-25  Joshua Netterfield  <jnetterfield@rim.com>
2076
2077         [WebGL] fast/canvas/webgl/framebuffer-object-attachment.html fails on certain platforms
2078         https://bugs.webkit.org/show_bug.cgi?id=92296
2079
2080         Reviewed by Rob Buis.
2081
2082         No new tests, because it introduces no new functionality, only fixes the above mentioned test.
2083
2084         * html/canvas/WebGLFramebuffer.cpp:
2085         (WebCore::WebGLFramebuffer::checkStatus):
2086
2087 2012-07-25  Xingnan Wang  <xingnan.wang@intel.com>
2088
2089         IndexedDB: IDBTransaction::abort() should throw DOMException
2090         https://bugs.webkit.org/show_bug.cgi?id=92069
2091
2092         Reviewed by Kentaro Hara.
2093
2094         Keep aligned with the W3C spec.
2095         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBTransaction-abort-void
2096
2097         Test: storage/indexeddb/transaction-abort.html.
2098
2099         * Modules/indexeddb/IDBTransaction.cpp:
2100         (WebCore::IDBTransaction::abort):
2101         (WebCore):
2102         * Modules/indexeddb/IDBTransaction.h:
2103         (IDBTransaction):
2104         * Modules/indexeddb/IDBTransaction.idl:
2105
2106 2012-07-25  Tony Chang  <tony@chromium.org>
2107
2108         flexitems can overflow the flexbox due to rounding
2109         https://bugs.webkit.org/show_bug.cgi?id=92163
2110
2111         Reviewed by Levi Weintraub.
2112
2113         Don't round flex item sizes and use LayoutPoint for the location of flex items.
2114
2115         Test: css3/flexbox/flex-rounding.html
2116
2117         * rendering/RenderFlexibleBox.cpp:
2118         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2119         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2120         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2121
2122 2012-07-25  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2123
2124         [BlackBerry] Integrate certmgr with CredentialBackingStore
2125         https://bugs.webkit.org/show_bug.cgi?id=92183
2126
2127         Reviewed by George Staikos.
2128
2129         Integrated BlackBerry::Platform::CertMgrWrapper with
2130         CredentialBackingStore, when certmgr is ready we save
2131         the password in certmgr and retrieve it from certmgr.
2132
2133         RIM PR: 171991
2134         Internally reviewed by Joe Mason <jmason@rim.com>.
2135
2136         No new tests since there's no functional change.
2137
2138         * platform/network/blackberry/CredentialBackingStore.cpp:
2139         (WebCore::hashCredentialInfo):
2140         (WebCore):
2141         (WebCore::CredentialBackingStore::CredentialBackingStore):
2142         (WebCore::CredentialBackingStore::open):
2143         (WebCore::CredentialBackingStore::addLogin):
2144         (WebCore::CredentialBackingStore::updateLogin):
2145         (WebCore::CredentialBackingStore::getLogin):
2146         * platform/network/blackberry/CredentialBackingStore.h:
2147         (CredentialBackingStore):
2148
2149 2012-07-25  Kent Tamura  <tkent@chromium.org>
2150
2151         REGRESSION(r121420): Performance regression of form state saving for pages with multiple forms
2152         https://bugs.webkit.org/show_bug.cgi?id=91804
2153
2154         Reviewed by Hajime Morita.
2155
2156         The complexity of FormKeyGenerator::formKey() was O(N) where N is the
2157         number form elements with an identical action URL, and formKey() is
2158         called for every form. So, it's O(N^2). A page in www.reddit.com
2159         contains hundreds of form elements with action="#". So FormController::
2160         formElementsState() took a few seconds on a slow machine.
2161
2162         In order to avoid O(N^2) operation, storing a map from form signatures
2163         to next index numbers, instead of storing existing formKey strings.
2164
2165         No new tests. Just a performance improvement.
2166
2167         Note: This is a re-landing of r123191. We rolled it out because of
2168         suspicion of a performance regression. However it was innocent.
2169
2170         * html/FormController.cpp:
2171         (FormKeyGenerator): Remove m_existingKeys. Add a map from a form
2172         signature string to the next index number.
2173         (WebCore::formSignature): Returns a signature string for a form, without
2174         an index number. This is like "actionURL [name1 name2 ]"
2175         (WebCore::FormKeyGenerator::formKey):
2176         Creates a formKey string by concatenating a formSignature and #n. N is
2177         obtained from m_formSignatureToNextIndexMap in O(1).
2178         (WebCore::FormKeyGenerator::willDeleteForm):
2179         Remove the code for m_existingKeys.
2180
2181 2012-07-25  Benjamin Poulain  <bpoulain@apple.com>
2182
2183         Initialize QualifiedName's strings from the read only data segment
2184         https://bugs.webkit.org/show_bug.cgi?id=92226
2185
2186         Reviewed by Anders Carlsson.
2187
2188         Modify the initialization of static QualifiedName to initialize the AtomicString
2189         with the data from the read only memory.
2190
2191         Overall, HTMLNames::init() gets 10% faster.
2192
2193         * dom/QualifiedName.cpp:
2194         (WebCore::QualifiedName::QualifiedName):
2195         * dom/QualifiedName.h:
2196         (QualifiedName):
2197         Remove the useless constructor taking a char* and get rid of the init() function.
2198         The AtomicString representing the name should be constructed by the caller of QualifiedName.
2199
2200         Because the init() code is relatively large and is only executed once, it is important to
2201         keep the AtomicString construction separate. The function createQualifiedName() was added
2202         to improve the cache use. The short version let us reduce the code one more instruction per
2203         call.
2204
2205         * dom/make_names.pl:
2206         (printQualifiedNameMaker):
2207         (printShortQualifiedNameMaker):
2208         (printNamesCppFile):
2209         (printDefinitions):
2210
2211 2012-07-25  Yoshifumi Inoue  <yosin@chromium.org>
2212
2213         [Forms] Move HTMLInputElement::updateInnerTextValue to InputType class
2214         https://bugs.webkit.org/show_bug.cgi?id=92230
2215
2216         Reviewed by Kent Tamura.
2217
2218         This patch moves implementaion of HTMLInputElement::updateInnerTextValue()
2219         into input type classes, removes updateInnerTextValue() from HTMLInputElement,
2220         and updates call site of updateInnerTextValue().
2221
2222         No new tests. This patch doesn't change behavior.
2223
2224         * html/DateInputType.cpp:
2225         (WebCore::DateInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
2226         * html/HTMLInputElement.cpp:
2227         (WebCore::HTMLInputElement::updateType): Updated call site of updateInnerTextValue().
2228         (WebCore::HTMLInputElement::parseAttribute): Updated call site of updateInnerTextValue().
2229         (WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement): Updated call site of updateInnerTextValue().
2230         (WebCore::HTMLInputElement::setSuggestedValue): Updated call site of updateInnerTextValue().
2231         * html/HTMLInputElement.h:
2232         (HTMLInputElement): Removed updateInnerTextValue().
2233         * html/InputType.cpp:
2234         (WebCore::InputType::updateInnerTextValue): Added default implementaion.
2235         * html/InputType.h:
2236         (InputType): Added declaration of updateInnerTextValue().
2237         * html/NumberInputType.cpp:
2238         (WebCore::NumberInputType::handleBlurEvent): Updated call site of updateInnerTextValue().
2239         * html/TextFieldInputType.cpp:
2240         (WebCore::TextFieldInputType::setValue): Updated call site of updateInnerTextValue().
2241         (WebCore::TextFieldInputType::updateInnerTextValue): Moved implementaion from HTMLInputElement.
2242         * html/TextFieldInputType.h:
2243         (TextFieldInputType): Added declaration of updateInnerTextValue().
2244
2245 2012-07-25  Dana Jansens  <danakj@chromium.org>
2246
2247         [chromium] Move ephemeral data for a single frame in LayerRendererChromium into a structure with a scoped lifetime equal to the frame
2248         https://bugs.webkit.org/show_bug.cgi?id=92294
2249
2250         Reviewed by Adrienne Walker.
2251
2252         The LayerRendererChromium class has a number of member variables that are used
2253         while drawing a single frame. Because they are member variables, their lifetimes
2254         are not clear, and some are even updated between frames, which is not needed.
2255
2256         This change creates a LRC::DrawingFrame structure that holds the data used
2257         while drawing the current frame, and an instance of this structure is held
2258         and passed around to functions in LayerRendererChromium, moving all of the
2259         data out from being member variables on the class to being function
2260         arguments on the relevant methods.
2261
2262         The projection and window matrices are a part of this frame data, and are not
2263         used externally, so they are removed from the CCRenderer interface and included
2264         within the DrawingFrame structure.
2265
2266         Covered by existing tests, no change in behaviour intended.
2267
2268         * platform/graphics/chromium/LayerRendererChromium.cpp:
2269         (WebCore::LayerRendererChromium::LayerRendererChromium):
2270         (WebCore::LayerRendererChromium::viewportChanged):
2271         (WebCore::LayerRendererChromium::clearFramebuffer):
2272         (WebCore::LayerRendererChromium::drawFrame):
2273         (WebCore::LayerRendererChromium::drawRenderPass):
2274         (WebCore::LayerRendererChromium::drawQuad):
2275         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
2276         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
2277         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2278         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2279         (WebCore::LayerRendererChromium::drawSolidColorQuad):
2280         (WebCore::LayerRendererChromium::drawTileQuad):
2281         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
2282         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
2283         (WebCore::LayerRendererChromium::drawTextureQuad):
2284         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
2285         (WebCore::LayerRendererChromium::finishDrawingFrame):
2286         (WebCore::LayerRendererChromium::drawTexturedQuad):
2287         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
2288         (WebCore::LayerRendererChromium::isCurrentRenderPass):
2289         (WebCore::LayerRendererChromium::useRenderPass):
2290         (WebCore::LayerRendererChromium::useScopedTexture):
2291         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
2292         (WebCore::LayerRendererChromium::setScissorToRect):
2293         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
2294         * platform/graphics/chromium/LayerRendererChromium.h:
2295         (DrawingFrame):
2296         (WebCore::LayerRendererChromium::DrawingFrame::DrawingFrame):
2297         (LayerRendererChromium):
2298         * platform/graphics/chromium/cc/CCRenderer.h:
2299         (CCRenderer):
2300
2301 2012-07-19  Adrienne Walker  <enne@google.com>
2302
2303         [chromium] Make all compositor screen space transforms operate on content rects
2304         https://bugs.webkit.org/show_bug.cgi?id=91807
2305
2306         Reviewed by Kenneth Russell.
2307
2308         Previously, surface screen space transforms operated on surface
2309         content space but layer screen space transforms operated on layer
2310         space. For the purpose of consistency, unify these two so that they
2311         both operate on content space.
2312
2313         No tests, because no change in behavior expected. Just a refactoring.
2314
2315         * platform/graphics/chromium/LayerChromium.h:
2316         (LayerChromium):
2317         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
2318         (WebCore::CCDebugRectHistory::savePaintRects):
2319         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
2320         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2321         (WebCore::calculateDrawTransformsInternal):
2322         (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint):
2323         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2324         (WebCore::::markOccludedBehindLayer):
2325         (WebCore::::occluded):
2326         (WebCore::::unoccludedContentRect):
2327
2328 2012-07-25  Dan Bernstein  <mitz@apple.com>
2329
2330         Hit testing in one column or in the gap between cloumns along the block axis can return a result from the wrong column
2331         https://bugs.webkit.org/show_bug.cgi?id=92311
2332
2333         Reviewed by Anders Carlsson.
2334
2335         Tests: fast/multicol/hit-test-end-of-column.html
2336                fast/multicol/hit-test-gap-block-axis.html
2337
2338         * rendering/RenderBlock.cpp:
2339         (WebCore::RenderBlock::positionForPointWithInlineChildren): To prevent hits after the last
2340         line on a given column from returning the next line in the next column, added a check if
2341         the hit occurred within the pagination strut of a line. Covered by the first test.
2342         (WebCore::RenderBlock::adjustPointToColumnContents): Added clamp-to-column logic for the
2343         block-axis case. This prevents hits near the bottom of the top half of the gap from bleeding
2344         into the top of the next column. Covered by the second test.
2345
2346 2012-07-25  David Grogan  <dgrogan@chromium.org>
2347
2348         IndexedDB: Make db.version return an integer if appropriate
2349         https://bugs.webkit.org/show_bug.cgi?id=92195
2350
2351         Reviewed by Tony Chang.
2352
2353         Make use of the existing IDBAny mechanism to return an integer if
2354         integer versions have been used.
2355
2356         No new tests - no change in behavior expected.
2357
2358         * Modules/indexeddb/IDBDatabase.cpp:
2359         (WebCore::IDBDatabase::version):
2360         (WebCore):
2361         * Modules/indexeddb/IDBDatabase.h:
2362         (IDBDatabase):
2363         * Modules/indexeddb/IDBDatabase.idl:
2364
2365 2012-07-25  Michael Saboff  <msaboff@apple.com>
2366
2367         Convert HTML parser to handle 8-bit resources without converting to UChar*
2368         https://bugs.webkit.org/show_bug.cgi?id=90321
2369
2370         Reviewed by Geoffrey Garen.
2371
2372         No new tests, no new functionality therefore covered by existing tests.
2373
2374         Changed the parsing of HTML to handle 8-bit strings without converting the 
2375         whole string to 16-bits.  Primary change was to use the appropriate 
2376         character pointer type (LChar* or UChar*) depending on the source string.
2377         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
2378         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
2379         and advanceAndUpdateLineNumber() methods have been refactored into a
2380         state machine managed pair of function pointers.  The possible functions
2381         have not only the 8 and 16 bitness factored out, they also have the 
2382         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
2383         This provides a net speed-up even with the 8/16 bit testing.
2384         Other changes involve using String methods to access and compare with the
2385         source data.
2386
2387         * html/FTPDirectoryDocument.cpp:
2388         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
2389         instead of SegmentedString '*' operator.
2390         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
2391         SegmentedString '*' operator.
2392         * html/parser/HTMLParserIdioms.cpp:
2393         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
2394         * html/parser/HTMLSourceTracker.cpp:
2395         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
2396         SegmentedString '*' operator.
2397         * loader/cache/CachedScript.cpp:
2398         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
2399         * platform/text/SegmentedString.cpp:
2400         (WebCore::SegmentedString::SegmentedString):
2401         (WebCore::SegmentedString::operator=):
2402         (WebCore::SegmentedString::clear):
2403         (WebCore::SegmentedString::append):
2404         (WebCore::SegmentedString::prepend):
2405         (WebCore::SegmentedString::advanceSubstring):
2406         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
2407         advance function.
2408         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
2409         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
2410         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
2411         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
2412         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
2413         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
2414         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
2415         8 and 16 bit advance.
2416         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
2417         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
2418         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
2419         * platform/text/SegmentedString.h:
2420         (WebCore::SegmentedSubstring::SegmentedSubstring):
2421         (WebCore::SegmentedSubstring::clear):
2422         (SegmentedSubstring):
2423         (WebCore::SegmentedSubstring::is8Bit): New getter.
2424         (WebCore::SegmentedSubstring::appendTo):
2425         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
2426         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
2427         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
2428         that pre-increments the 8 bit pointer and returns the next character.
2429         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
2430         that pre-increments the 16 bit pointer and returns the next character.
2431         (WebCore::SegmentedSubstring::currentSubString):
2432         (WebCore::SegmentedSubstring::getCurrentChar):
2433         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
2434         (WebCore::SegmentedString::SegmentedString):
2435         (WebCore::SegmentedString::push):
2436         (WebCore::SegmentedString::isEmpty):
2437         (WebCore::SegmentedString::lookAhead):
2438         (WebCore::SegmentedString::lookAheadIgnoringCase):
2439         (WebCore::SegmentedString::advance):
2440         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
2441         (WebCore::SegmentedString::advanceAndASSERT):
2442         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
2443         (WebCore::SegmentedString::advancePastNonNewline):
2444         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
2445         (WebCore::SegmentedString::currentChar):
2446         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
2447         functions.
2448         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
2449         change to slow case functions when only one character left.
2450         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
2451         functions based on current substring.
2452         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
2453         (WebCore::SegmentedString::lookAheadSlowCase):
2454         * xml/parser/CharacterReferenceParserInlineMethods.h:
2455         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
2456         SegmentedString '*' operator.
2457         * xml/parser/MarkupTokenizerBase.h:
2458         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2459         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
2460         currentChar() instead of SegmentedString '*' operator.
2461         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2462
2463 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2464
2465         Unreviewed, rolling out r123625 and r123672.
2466         http://trac.webkit.org/changeset/123625
2467         http://trac.webkit.org/changeset/123672
2468         https://bugs.webkit.org/show_bug.cgi?id=92315
2469
2470         Broke Windows and gcc builds (Requested by rniwa on #webkit).
2471
2472         * platform/AutodrainedPool.h:
2473         (AutodrainedPool):
2474         * platform/ContentType.h:
2475         (ContentType):
2476         * platform/ContextMenu.h:
2477         (ContextMenu):
2478         * platform/ContextMenuItem.h:
2479         (ContextMenuItem):
2480         * platform/Cursor.h:
2481         (WebCore::SharedCursor::SharedCursor):
2482         (Cursor):
2483         * platform/KURL.h:
2484         (WebCore::KURL::KURL):
2485         (KURL):
2486         * platform/KURLGooglePrivate.h:
2487         (KURLGooglePrivate):
2488         * platform/PODRedBlackTree.h:
2489         (WebCore::PODRedBlackTree::PODRedBlackTree):
2490         * platform/Pasteboard.h:
2491         (Pasteboard):
2492         * platform/PlatformEvent.h:
2493         (WebCore::PlatformEvent::PlatformEvent):
2494         * platform/PlatformKeyboardEvent.h:
2495         (PlatformKeyboardEvent):
2496         * platform/PlatformMouseEvent.h:
2497         (PlatformMouseEvent):
2498         * platform/PlatformPasteboard.h:
2499         (PlatformPasteboard):
2500         * platform/PlatformTouchEvent.h:
2501         (PlatformTouchEvent):
2502         * platform/PlatformWheelEvent.h:
2503         (PlatformWheelEvent):
2504         * platform/RunLoop.h:
2505         (TimerBase):
2506         * platform/ScrollAnimator.h:
2507         (ScrollAnimator):
2508         * platform/ScrollAnimatorNone.h:
2509         (ScrollAnimatorNone):
2510         * platform/SharedBuffer.h:
2511         (SharedBuffer):
2512         * platform/WheelFlingPlatformGestureCurve.h:
2513         (WheelFlingPlatformGestureCurve):
2514         * platform/Widget.h:
2515         (Widget):
2516         * platform/network/cf/ResourceRequestCFNet.cpp:
2517         (WebCore::ResourceRequest::doUpdateResourceRequest):
2518
2519 2012-07-25  Ryosuke Niwa  <rniwa@webkit.org>
2520
2521         Windows build fix attempt after r123625.
2522
2523         * platform/network/cf/ResourceRequestCFNet.cpp:
2524         (WebCore::ResourceRequest::doUpdateResourceRequest):
2525
2526 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
2527
2528         Read tag names and attributes from the saved tokens in HTMLTreeBuilder::resetInsertionModeAppropriately.
2529         https://bugs.webkit.org/show_bug.cgi?id=92240
2530
2531         Reviewed by Adam Barth.
2532
2533         This is a follow-up patch for r123577. Added ItemType enum to HTMLStackItem to handle
2534         the context element case.
2535
2536         No new tests, covered by existing tests.
2537
2538         * html/parser/HTMLStackItem.h:
2539         (WebCore::HTMLStackItem::create):
2540         (WebCore::HTMLStackItem::HTMLStackItem):
2541         * html/parser/HTMLTreeBuilder.cpp:
2542         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2543         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2544
2545 2012-07-25  Nico Weber  <thakis@chromium.org>
2546
2547         [chromium/mac] Remove mac_bundle_resources section from WebCore.gyp
2548         https://bugs.webkit.org/show_bug.cgi?id=92207
2549
2550         Reviewed by Tony Chang.
2551
2552         It's no longer needed after http://crrev.com/148290 and
2553         http://crrev.com/148187.
2554
2555         * WebCore.gyp/WebCore.gyp:
2556
2557 2012-07-25  Dana Jansens  <danakj@chromium.org>
2558
2559         [chromium] Move WebFilterOperations from RenderPassDrawQuad to RenderPass
2560         https://bugs.webkit.org/show_bug.cgi?id=91885
2561
2562         Reviewed by Adrienne Walker.
2563
2564         We move the filter operations to CCRenderPass to avoid having
2565         variable-length data in a WebCompositorQuad in order to serialize,
2566         and also to avoid requiring a virtual destructor for the quad
2567         classes.
2568
2569         The drawFrame method now takes a CCRenderPassIdHashMap in order
2570         to connect RenderPass quads to their source RenderPass.
2571
2572         Covered by existing tests.
2573
2574         * platform/graphics/chromium/LayerRendererChromium.cpp:
2575         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
2576         (WebCore::LayerRendererChromium::drawFrame):
2577         (WebCore::LayerRendererChromium::beginDrawingFrame):
2578         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2579         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2580         * platform/graphics/chromium/LayerRendererChromium.h:
2581         (LayerRendererChromium):
2582         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2583         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2584         (WebCore::CCLayerTreeHostImpl::drawLayers):
2585         * platform/graphics/chromium/cc/CCRenderPass.h:
2586         (WebCore::CCRenderPass::filters):
2587         (WebCore::CCRenderPass::setFilters):
2588         (CCRenderPass):
2589         (WebCore::CCRenderPass::backgroundFilters):
2590         (WebCore::CCRenderPass::setBackgroundFilters):
2591         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
2592         (WebCore::CCRenderPassDrawQuad::create):
2593         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
2594         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
2595         (CCRenderPassDrawQuad):
2596         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2597         (WebCore::CCRenderSurface::appendQuads):
2598         * platform/graphics/chromium/cc/CCRenderer.h:
2599         (CCRenderer):
2600
2601 2012-07-25  Mike Reed  <reed@google.com>
2602
2603         fix test in beginLayerClippedToImage to check for immutability if we're going to do a shallow-copy
2604         https://bugs.webkit.org/show_bug.cgi?id=92276
2605
2606         Reviewed by Stephen White.
2607
2608         PlatformContextSkia::beginLayerClippedToImage
2609
2610         This function wants to apply the provided ImageBuffer as a clip. Skia does not support this natively yet,
2611         so the code makes a "copy" of that imageBuffer, to be applied later. The old code, wanting to avoid a
2612         deep copy if possible, checked for the presence of a SkPixelRef. If it found one, it made a shallow copy.
2613         This is flawed, since the contents of a pixelref are not guaranteed to be immutable. The new code checks
2614         against this attribute: if the bitmap is "immutable" then we can make a shallow-copy, else we make a
2615         deep copy.
2616
2617         No new tests. Existing svg layouttests work w/ or w/out this change, but at the next Skia deps roll, we see
2618         failures w/o this change. The change is more "correct", though the problem case does not exhibit itself until
2619         Skia rev. 4722 or later lands.
2620
2621         * platform/graphics/skia/PlatformContextSkia.cpp:
2622         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2623
2624 2012-07-25  Li Yin  <li.yin@intel.com>
2625
2626         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
2627         https://bugs.webkit.org/show_bug.cgi?id=91364
2628
2629         Reviewed by Kenneth Russell.
2630
2631         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
2632         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
2633
2634         Test: webaudio/javascriptaudionode.html
2635
2636         * Modules/webaudio/JavaScriptAudioNode.cpp:
2637         (WebCore::JavaScriptAudioNode::create):
2638
2639 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
2640
2641         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
2642         https://bugs.webkit.org/show_bug.cgi?id=88953
2643
2644         Reviewed by Adrienne Walker.
2645
2646         This is part 1 of trying to reduce the root layer special
2647         case. This tries to reduce the special-ness of the root layer from
2648         the perspective of outside code.
2649
2650         After this patch, code that uses calcDrawTransforms() no longer
2651         needs to initialize the root layer's surface, and no longer needs
2652         to manually append the root layer to the renderSurfaceLayerList.
2653
2654         Unit tests were also updated (much cleaner!) to account for this change.
2655
2656         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2657         (WebCore::CCLayerTreeHost::updateLayers):
2658         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2659         (WebCore):
2660         (WebCore::setupRootLayerAndSurfaceForRecursion):
2661         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
2662         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
2663         (CCLayerTreeHostCommon):
2664         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2665         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
2666
2667 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
2668
2669         FileSystem should provide a way to delete filesystem.
2670         https://bugs.webkit.org/show_bug.cgi?id=91861
2671
2672         Reviewed by Adam Barth.
2673
2674         We will add a test when we wire-up the feature to Inspector.
2675
2676         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
2677         (WebCore::deleteFileSystem):
2678         (WebCore):
2679         (WebCore::LocalFileSystem::deleteFileSystem):
2680         * Modules/filesystem/LocalFileSystem.h:
2681         (LocalFileSystem):
2682         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
2683         (WebCore):
2684         (WebCore::AsyncFileSystem::deleteFileSystem):
2685         * platform/AsyncFileSystem.h:
2686         (AsyncFileSystem):
2687         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
2688         (WebCore::AsyncFileSystem::deleteFileSystem):
2689         (WebCore):
2690         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
2691         (WebCore::AsyncFileSystem::deleteFileSystem):
2692         (WebCore):
2693
2694 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
2695
2696         Web Inspector: Add more jsdocs to InjectedScriptSource.js
2697         https://bugs.webkit.org/show_bug.cgi?id=92255
2698
2699         Reviewed by Pavel Feldman.
2700
2701         * inspector/InjectedScriptSource.js:
2702
2703 2012-07-24  Dana Jansens  <danakj@chromium.org>
2704
2705         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
2706         https://bugs.webkit.org/show_bug.cgi?id=92182
2707
2708         Reviewed by Adrienne Walker.
2709
2710         By changing the HUD into a quad, we are able to create a HUD and pass
2711         it to the host compositor, allowing the HUD to be used for renderers
2712         under Ubercompositor.
2713
2714         This also removes the special drawing code for the HUD from
2715         LayerRendererChromium, allowing us to move finishDrawingFrame
2716         into LayerRendererChromium as a private method and remove it
2717         from the CCRenderer interface.
2718
2719         Finally, we can remove the CCFontAtlas transport code from CCProxy
2720         and its implementations as the atlas can be synced to impl thread
2721         through the usual layer commit mechanism.
2722
2723         The debug HUD is not covered by tests.
2724
2725         * WebCore.gypi:
2726         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
2727         (WebCore):
2728         (WebCore::HeadsUpDisplayLayerChromium::create):
2729         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
2730         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
2731         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
2732         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
2733         (WebCore):
2734         (HeadsUpDisplayLayerChromium):
2735         * platform/graphics/chromium/LayerRendererChromium.cpp:
2736         (WebCore::LayerRendererChromium::drawFrame):
2737         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2738         * platform/graphics/chromium/LayerRendererChromium.h:
2739         (LayerRendererChromium):
2740         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
2741         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
2742         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
2743         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
2744         (WebCore):
2745         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
2746         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
2747         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
2748         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
2749         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
2750         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
2751         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
2752         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
2753         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
2754         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
2755         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
2756         (WebCore):
2757         (CCHeadsUpDisplayLayerImpl):
2758         (WebCore::CCHeadsUpDisplayLayerImpl::create):
2759         * platform/graphics/chromium/cc/CCLayerImpl.h:
2760         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
2761         This flag is used to mark the HUD as always damaged, so that it is
2762         continually drawn on the impl thread. It is also used as a hint by
2763         the CCDebugRectHistory class to not include the layer in the display
2764         of damage, since always damaged is not interesting damage.
2765         (CCLayerImpl):
2766         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2767         (WebCore::CCLayerTreeHost::create):
2768         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2769         (WebCore::CCLayerTreeHost::initialize):
2770         (WebCore::CCLayerTreeHost::willCommit):
2771         (WebCore::CCLayerTreeHost::didCommit):
2772         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2773         (CCLayerTreeSettings):
2774         (WebCore::CCLayerTreeSettings::showDebugInfo):
2775         (WebCore::CCLayerTreeSettings::showDebugRects):
2776         (CCLayerTreeHost):
2777         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2778         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2779         (WebCore::CCLayerTreeHostImpl::drawLayers):
2780         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2781         (WebCore):
2782         (CCLayerTreeHostImpl):
2783         * platform/graphics/chromium/cc/CCProxy.h:
2784         (CCProxy):
2785         * platform/graphics/chromium/cc/CCRenderer.h:
2786         (CCRenderer):
2787         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2788         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2789         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2790         * platform/graphics/chromium/cc/CCThreadProxy.h:
2791         (CCThreadProxy):
2792
2793 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
2794
2795         Web Inspector: follow up to r123612, fixing CSS value suggest.
2796
2797         Not reviewed, minor JS fix.
2798
2799         * inspector/front-end/CSSCompletions.js:
2800         (WebInspector.CSSCompletions):
2801         * inspector/front-end/StylesSidebarPane.js:
2802         (WebInspector.StylePropertyTreeElement.prototype):
2803
2804 2012-07-25  Michael Saboff  <msaboff@apple.com>
2805
2806         Unreviewed build fix after r123624.
2807
2808         * inspector/InspectorPageAgent.cpp:
2809         (WebCore::InspectorPageAgent::clearGeolocationOverride):
2810         Changed ASSERT_UNUSED() to UNUSED_PARAM().
2811
2812 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
2813
2814         Web inspector auto-completes "optimizequality" but then complains
2815         https://bugs.webkit.org/show_bug.cgi?id=92262
2816
2817         Reviewed by Timothy Hatcher.
2818
2819         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
2820
2821         * inspector/front-end/CSSKeywordCompletions.js:
2822
2823 2012-07-25  Beth Dakin  <bdakin@apple.com>
2824
2825         https://bugs.webkit.org/show_bug.cgi?id=89114
2826         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
2827         fails
2828         -and corresponding-
2829         <rdar://problem/11656050>
2830
2831         Reviewed by Simon Fraser.
2832
2833         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
2834         both have an optimization in place so that they do not call 
2835         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
2836         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
2837         this optimization because it allowed RenderLayers to restore a scrollOffset from 
2838         the Element if there is one cached there. This caused the RenderLayer to have a 
2839         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
2840         currentPosition (which will just be 0,0 since it is being re-created like the 
2841         RenderLayer). This fix makes sure they are in synch by calling 
2842         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
2843         * rendering/RenderLayer.cpp:
2844         (WebCore::RenderLayer::RenderLayer):
2845
2846 2012-07-25  Andreas Kling  <kling@webkit.org>
2847
2848         Make ElementAttributeData a variable-sized object to reduce memory use.
2849         <http://webkit.org/b/88240>
2850
2851         Reviewed by Ryosuke Niwa.
2852
2853         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2854         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2855         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2856         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2857
2858         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2859         that nothing tries to mutate an element with a raw attribute array.
2860
2861         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2862         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2863
2864         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2865         That is a ~35% reduction in DOM attribute memory use.
2866
2867         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2868         adding of "class" attributes. For more static pages, savings are even greater.
2869
2870         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2871         needed. Not a big deal but avoids double lookup of attributes when removing them.
2872
2873         * dom/Element.cpp:
2874         (WebCore::Element::detachAttribute):
2875         (WebCore::Element::removeAttribute):
2876         (WebCore::Element::attributes):
2877         (WebCore::Element::setAttributeInternal):
2878         (WebCore::Element::parserSetAttributes):
2879         (WebCore::Element::hasEquivalentAttributes):
2880         (WebCore::Element::setAttributeNode):
2881         (WebCore::Element::removeAttributeNode):
2882         (WebCore::Element::getAttributeNode):
2883         (WebCore::Element::getAttributeNodeNS):
2884         (WebCore::Element::hasAttribute):
2885         (WebCore::Element::hasAttributeNS):
2886         (WebCore::Element::cloneAttributesFromElement):
2887
2888             Sprinkle const on ElementAttributeData* pointers.
2889             Switch to using mutableAttributeData() in code paths that modify attributes.
2890
2891         (WebCore::Element::normalizeAttributes):
2892
2893             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
2894             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
2895             length() and attributeItem(index), use those to iterate directly over the attributes.
2896
2897         (WebCore::Element::createMutableAttributeData):
2898
2899             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
2900             ElementAttributeData (mutable and empty.)
2901
2902         * dom/Element.h:
2903         (WebCore::Element::attributeData):
2904         (WebCore::Element::updatedAttributeData):
2905         (WebCore::Element::ensureAttributeData):
2906         (WebCore::Element::ensureUpdatedAttributeData):
2907
2908             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
2909             attempts to modify an ElementAttributeData that may be immutable.
2910
2911             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
2912             The goal of having methods be const is to prevent conversion from one ElementAttributeData
2913             object to another, so that pointers remain intact and no unnecessary work gets done.
2914
2915         (WebCore::Element::mutableAttributeData):
2916
2917             Added, returns a guaranteed mutable ElementAttributeData* pointer.
2918
2919         * dom/ElementAttributeData.cpp:
2920         (WebCore::ElementAttributeData::createImmutable):
2921
2922             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
2923
2924         (WebCore::ElementAttributeData::ElementAttributeData):
2925
2926             Moved constructors out-of-line, getting too complex for header files.
2927
2928             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
2929             containing the provided attributes in an array tacked onto the end of the object.
2930
2931         (WebCore::ElementAttributeData::~ElementAttributeData):
2932
2933             Free the attribute vector if mutable.
2934             For immutable objects, manually invoke destructor on each Attribute object,
2935             since these won't be destroyed automatically by ~ElementAttributeData.
2936
2937         (WebCore::ElementAttributeData::attrIfExists):
2938
2939         (WebCore::ElementAttributeData::ensureAttr):
2940         (WebCore::ElementAttributeData::setAttr):
2941         (WebCore::ElementAttributeData::removeAttr):
2942
2943             Make these const, as they should always have been- they don't affect the ElementAttributeData,
2944             only the global DOM Attr <-> ElementAttributeData mappings.
2945
2946         (WebCore::ElementAttributeData::ensureInlineStyle):
2947         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2948
2949             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
2950             have mutable attribute data. There's still inlineStyle() for that, which may return null.
2951             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
2952             attribute, e.g in editing code that wants to add style.
2953
2954         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
2955         (WebCore::ElementAttributeData::destroyInlineStyle):
2956
2957             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
2958             contain a style attribute will have a valid inlineStyle() with that style data. This is just
2959             an interface for ~StyledElement to destroy the style object.
2960             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
2961             clean up properly and we don't store one in this class.
2962
2963         (WebCore::ElementAttributeData::addAttribute):
2964         (WebCore::ElementAttributeData::removeAttribute):
2965         (WebCore::ElementAttributeData::clearAttributes):
2966         (WebCore::ElementAttributeData::replaceAttribute):
2967
2968             Sprinkle ASSERT(isMutable()).
2969             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
2970
2971         (WebCore::ElementAttributeData::isEquivalent):
2972         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2973         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2974         (WebCore::ElementAttributeData::removeAttribute):
2975         (WebCore::ElementAttributeData::getAttributeItem):
2976         (WebCore::ElementAttributeData::getAttributeItemIndex):
2977
2978             Use length() and attributeItem(index) to iterate over the attributes.
2979
2980         (WebCore::ElementAttributeData::cloneDataFrom):
2981
2982             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
2983             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
2984             a semi-rare occurrence.
2985
2986             Updated code to handle both immutable and mutable source objects. This could 
2987
2988         (WebCore::ElementAttributeData::getAttributeNode):
2989
2990             Const correctness.
2991
2992         * dom/ElementAttributeData.h:
2993         (ElementAttributeData):
2994
2995             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
2996             The new m_isMutable bit determines which union member should be used for access.
2997
2998         (WebCore::ElementAttributeData::create):
2999         (WebCore::ElementAttributeData::createImmutable):
3000
3001             Added createImmutable(const Vector<Attribute>&) as a complement to create().
3002
3003         (WebCore::ElementAttributeData::setClass):
3004         (WebCore::ElementAttributeData::setIdForStyleResolution):
3005         (WebCore::ElementAttributeData::inlineStyle):
3006         (WebCore::ElementAttributeData::setAttributeStyle):
3007
3008             Make these const, and their data member counterparts 'mutable'.
3009             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
3010             m_inlineStyleDecl and m_attributeStyle.
3011
3012         (WebCore::ElementAttributeData::reportMemoryUsage):
3013
3014             Updated for isMutable().
3015
3016         (WebCore::ElementAttributeData::makeMutable):
3017
3018             Returns a mutable clone of itself.
3019
3020         (WebCore::ElementAttributeData::isEmpty):
3021         (WebCore::ElementAttributeData::length):
3022         (WebCore::ElementAttributeData::attributeItem):
3023
3024             Check isMutable() to know how to access attribute storage.
3025
3026         * dom/StyledElement.cpp:
3027         (WebCore::StyledElement::style):
3028         (WebCore::StyledElement::setInlineStyleProperty):
3029
3030             Simplify by using StyledElement::ensureInlineStyle().
3031
3032         (WebCore::StyledElement::classAttributeChanged):
3033
3034             Use mutableAttributeData() if the attribute is being removed completely.
3035             In other cases, tiptoe around without causing the attribute data to go mutable.
3036
3037         (WebCore::StyledElement::removeInlineStyleProperty):
3038
3039             Use mutableAttributeData() if/when actually removing something.
3040
3041         (WebCore::StyledElement::addSubresourceAttributeURLs):
3042
3043             Const correctness.
3044
3045         * dom/StyledElement.h:
3046         (WebCore::StyledElement::ensureInlineStyle):
3047
3048             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
3049             properties, so conversion is inevitable.
3050
3051         * html/parser/HTMLConstructionSite.cpp:
3052         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3053         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3054         * svg/properties/SVGAnimatedPropertyMacros.h:
3055         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
3056
3057             Use mutableAttributeData() as appropriate.
3058
3059         * xml/parser/XMLDocumentParserQt.cpp:
3060         (WebCore::XMLDocumentParser::XMLDocumentParser):
3061
3062             Const correctness.
3063
3064 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
3065
3066         Unreviewed, rolling out r123560.
3067         http://trac.webkit.org/changeset/123560
3068         https://bugs.webkit.org/show_bug.cgi?id=90321
3069
3070         Breaks chromium valgrind tests.
3071
3072         * html/FTPDirectoryDocument.cpp:
3073         (WebCore::FTPDirectoryDocumentParser::append):
3074         * html/parser/HTMLEntityParser.cpp:
3075         (WebCore::HTMLEntityParser::consumeNamedEntity):
3076         * html/parser/HTMLParserIdioms.cpp:
3077         (WebCore::stripLeadingAndTrailingHTMLSpaces):
3078         * html/parser/HTMLSourceTracker.cpp:
3079         (WebCore::HTMLSourceTracker::sourceForToken):
3080         * loader/cache/CachedScript.cpp:
3081         (WebCore::CachedScript::script):
3082         * platform/text/SegmentedString.cpp:
3083         (WebCore::SegmentedString::SegmentedString):
3084         (WebCore::SegmentedString::operator=):
3085         (WebCore::SegmentedString::clear):
3086         (WebCore::SegmentedString::append):
3087         (WebCore::SegmentedString::prepend):
3088         (WebCore::SegmentedString::advanceSubstring):
3089         (WebCore::SegmentedString::advance):
3090         (WebCore::SegmentedString::advanceSlowCase):
3091         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
3092         * platform/text/SegmentedString.h:
3093         (WebCore::SegmentedSubstring::SegmentedSubstring):
3094         (WebCore::SegmentedSubstring::clear):
3095         (WebCore::SegmentedSubstring::appendTo):
3096         (SegmentedSubstring):
3097         (WebCore::SegmentedString::SegmentedString):
3098         (WebCore::SegmentedString::push):
3099         (WebCore::SegmentedString::isEmpty):
3100         (WebCore::SegmentedString::lookAhead):
3101         (WebCore::SegmentedString::lookAheadIgnoringCase):
3102         (WebCore::SegmentedString::advance):
3103         (WebCore::SegmentedString::advanceAndASSERT):
3104         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
3105         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
3106         (SegmentedString):
3107         (WebCore::SegmentedString::advancePastNonNewline):
3108         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
3109         (WebCore::SegmentedString::operator*):
3110         (WebCore::SegmentedString::operator->):
3111         (WebCore::SegmentedString::current):
3112         (WebCore::SegmentedString::equalsLiterally):
3113         (WebCore::SegmentedString::equalsIgnoringCase):
3114         (WebCore::SegmentedString::lookAheadInline):
3115         (WebCore::SegmentedString::lookAheadSlowCase):
3116         * xml/parser/CharacterReferenceParserInlineMethods.h:
3117         (WebCore::consumeCharacterReference):
3118         * xml/parser/MarkupTokenizerBase.h:
3119         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
3120         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
3121         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
3122
3123 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
3124
3125         Web Inspector: Geolocation override
3126         https://bugs.webkit.org/show_bug.cgi?id=89365
3127
3128         Reviewed by Pavel Feldman.
3129
3130         Re-added the m_page member variable for GeolocationController since
3131         it's now being used by InspectorInstrumentaiton.
3132
3133         Added a way to override the GeolocationPosition and GeolocationError
3134         using Web Inspector. Curretnly only PositionError can be set.
3135
3136         This will be hidden behind the experiments flag for now.
3137
3138         Tests: inspector/geolocation-error.html
3139                inspector/geolocation-success.html
3140                inspector/geolocation-watchPosition.html
3141
3142         * English.lproj/localizedStrings.js:
3143         * Modules/geolocation/GeolocationController.cpp:
3144         (WebCore::GeolocationController::GeolocationController):
3145         (WebCore::GeolocationController::positionChanged):
3146         * Modules/geolocation/GeolocationController.h:
3147         (GeolocationController):
3148         * inspector/Inspector.json:
3149         * inspector/InspectorInstrumentation.cpp:
3150         (WebCore):
3151         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
3152         * inspector/InspectorInstrumentation.h:
3153         (WebCore):
3154         (InspectorInstrumentation):
3155         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
3156         * inspector/InspectorPageAgent.cpp:
3157         (WebCore::InspectorPageAgent::InspectorPageAgent):
3158         (WebCore::InspectorPageAgent::setGeolocationOverride):
3159         (WebCore):
3160         (WebCore::InspectorPageAgent::clearGeolocationOverride):
3161         (WebCore::InspectorPageAgent::canOverrideGeolocation):
3162         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
3163         * inspector/InspectorPageAgent.h:
3164         * inspector/front-end/Settings.js:
3165         * inspector/front-end/SettingsScreen.js:
3166         (WebInspector.UserAgentSettingsTab):
3167         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
3168         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
3169         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
3170         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
3171         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
3172         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
3173         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
3174         * inspector/front-end/UserAgentSupport.js:
3175         (WebInspector.UserAgentSupport.GeolocationPosition):
3176         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
3177         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
3178         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
3179         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
3180         * inspector/front-end/inspector.js:
3181         (WebInspector.doLoadedDone):
3182
3183 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
3184
3185         [chromium] Build fix for clang builds after r123628
3186         https://bugs.webkit.org/show_bug.cgi?id=92266
3187
3188         Reviewed by Adrienne Walker.
3189
3190         An un-used variable was causing build failures for clang builds
3191         after the refactoring in r123628.  It is correct to simply remove
3192         this value.
3193
3194         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3195         (WebCore::calculateDrawTransformsInternal):
3196
3197 2012-07-25  Hans Wennborg  <hans@chromium.org>
3198
3199         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
3200         https://bugs.webkit.org/show_bug.cgi?id=92232
3201
3202         Reviewed by Adam Barth.
3203
3204         Extract code for creating emma-qualified names to a helper function.
3205
3206         Just a refactoring; covered by the existing test.
3207
3208         * Modules/speech/SpeechRecognitionResult.cpp:
3209         (WebCore::emmaQualifiedName):
3210         (WebCore):
3211         (WebCore::SpeechRecognitionResult::emma):
3212
3213 2012-07-25  Adrienne Walker  <enne@google.com>
3214
3215         [chromium] Unify compositor quadTransform/drawTransform/originTransform
3216         https://bugs.webkit.org/show_bug.cgi?id=91417
3217
3218         Reviewed by Kenneth Russell.
3219
3220         drawTransform used to operate on centered layer rects. To unify quad
3221         transforms, draw transforms, and origin transforms, make draw
3222         transforms operate on content rects with the origin in the top left.
3223
3224         This essentially eliminates the need for surface origin transforms,
3225         which will be eliminated in a future patch.
3226
3227         Also, remove the unused CCLayerImpl::getDrawRect function.
3228
3229         No-op refactoring. Tested by existing tests.
3230
3231         * platform/graphics/chromium/LayerRendererChromium.cpp:
3232         (WebCore::LayerRendererChromium::drawRenderPassQuad):
3233         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3234         (WebCore::RenderSurfaceChromium::drawableContentRect):
3235         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3236         (WebCore::CCDamageTracker::extendDamageForLayer):
3237         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3238         (WebCore::CCLayerImpl::createSharedQuadState):
3239         * platform/graphics/chromium/cc/CCLayerImpl.h:
3240         (CCLayerImpl):
3241         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
3242         (WebCore::CCLayerSorter::LayerShape::LayerShape):
3243         (WebCore::CCLayerSorter::createGraphNodes):
3244         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3245         (WebCore::calculateVisibleContentRect):
3246         (WebCore::calculateDrawTransformsInternal):
3247         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3248         (WebCore::::markOccludedBehindLayer):
3249         (WebCore::::occluded):
3250         (WebCore::::unoccludedContentRect):
3251         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3252         (WebCore::CCRenderPass::appendQuadsToFillScreen):
3253         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3254         (WebCore::CCRenderSurface::drawableContentRect):
3255
3256 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
3257
3258         MediaStream API: Update MediaStreamTrack to match the specification
3259         https://bugs.webkit.org/show_bug.cgi?id=90180
3260
3261         Reviewed by Adam Barth.
3262
3263         MediaStreamTracks are now required to show the status of the underlying source,
3264         and trigger events when that status changes.
3265
3266         Test: fast/mediastream/MediaStreamTrack.html
3267
3268         * GNUmakefile.list.am:
3269         * Modules/mediastream/MediaStream.cpp:
3270         (WebCore::MediaStream::MediaStream):
3271         (WebCore::MediaStream::addTrack):
3272         * Modules/mediastream/MediaStreamTrack.cpp:
3273         (WebCore::MediaStreamTrack::create):
3274         (WebCore::MediaStreamTrack::MediaStreamTrack):
3275         (WebCore::MediaStreamTrack::~MediaStreamTrack):
3276         (WebCore::MediaStreamTrack::setEnabled):
3277         (WebCore::MediaStreamTrack::readyState):
3278         (WebCore):
3279         (WebCore::MediaStreamTrack::sourceChangedState):
3280         (WebCore::MediaStreamTrack::stop):
3281         (WebCore::MediaStreamTrack::interfaceName):
3282         (WebCore::MediaStreamTrack::scriptExecutionContext):
3283         (WebCore::MediaStreamTrack::eventTargetData):
3284         (WebCore::MediaStreamTrack::ensureEventTargetData):
3285         * Modules/mediastream/MediaStreamTrack.h:
3286         * Modules/mediastream/MediaStreamTrack.idl:
3287         * WebCore.gypi:
3288         * dom/EventNames.h:
3289         (WebCore):
3290         * dom/EventTargetFactory.in:
3291         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
3292         * platform/chromium/support/WebMediaStreamSource.cpp:
3293         (WebKit::WebMediaStreamSource::setReadyState):
3294         (WebKit):
3295         (WebKit::WebMediaStreamSource::readyState):
3296         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
3297         (WebCore):
3298         (WebCore::MediaStreamSource::create):
3299         (WebCore::MediaStreamSource::MediaStreamSource):
3300         (WebCore::MediaStreamSource::setReadyState):
3301         (WebCore::MediaStreamSource::addObserver):
3302         (WebCore::MediaStreamSource::removeObserver):
3303         * platform/mediastream/MediaStreamSource.h:
3304         (Observer):
3305         (WebCore::MediaStreamSource::Observer::~Observer):
3306         (MediaStreamSource):
3307         (WebCore::MediaStreamSource::readyState):
3308         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
3309         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
3310         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
3311
3312 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3313
3314         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
3315         https://bugs.webkit.org/show_bug.cgi?id=91061
3316
3317         Reviewed by Adam Barth.
3318
3319         The two functions are currently both returning the flooredLayoutUnit when subpixel
3320         layout is enabled. This patch changes them to return the correct fractional rounded
3321         value.
3322
3323         * platform/FractionalLayoutUnit.h:
3324         (WebCore::FractionalLayoutUnit::fromFloatCeil):
3325         (FractionalLayoutUnit):
3326         (WebCore::FractionalLayoutUnit::fromFloatRound):
3327         * rendering/LayoutTypes.h:
3328         (WebCore::roundedLayoutUnit):
3329         (WebCore::ceiledLayoutUnit):
3330         * rendering/RenderBlock.cpp:
3331         (WebCore::updatePreferredWidth):
3332
3333 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3334
3335         Add *explicit* keyword to constructors in WebCore/platform
3336         https://bugs.webkit.org/show_bug.cgi?id=92238
3337
3338         Reviewed by Kentaro Hara.
3339
3340         As a step to let *explicit* keyword add to constructors which have a parameter,
3341         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
3342         type conversion.
3343
3344         Some files in platform directory can't use explicit keyword because of build breaks.
3345
3346         No new tests. Covered by existing tests.
3347
3348         * platform/AutodrainedPool.h:
3349         (AutodrainedPool):
3350         * platform/ContentType.h:
3351         (ContentType):
3352         * platform/ContextMenu.h:
3353         (ContextMenu):
3354         * platform/ContextMenuItem.h:
3355         (ContextMenuItem):
3356         * platform/Cursor.h:
3357         (WebCore::SharedCursor::SharedCursor):
3358         (Cursor):
3359         * platform/KURL.h:
3360         (WebCore::KURL::KURL):
3361         (KURL):
3362         * platform/KURLGooglePrivate.h:
3363         (KURLGooglePrivate):
3364         * platform/PODRedBlackTree.h:
3365         (WebCore::PODRedBlackTree::PODRedBlackTree):
3366         * platform/Pasteboard.h:
3367         (Pasteboard):
3368         * platform/PlatformEvent.h:
3369         (WebCore::PlatformEvent::PlatformEvent):
3370         * platform/PlatformKeyboardEvent.h:
3371         (PlatformKeyboardEvent):
3372         * platform/PlatformMouseEvent.h:
3373         (PlatformMouseEvent):
3374         * platform/PlatformPasteboard.h:
3375         (PlatformPasteboard):
3376         * platform/PlatformTouchEvent.h:
3377         (PlatformTouchEvent):
3378         * platform/PlatformWheelEvent.h:
3379         (PlatformWheelEvent):
3380         * platform/RunLoop.h:
3381         (TimerBase):
3382         * platform/ScrollAnimator.h:
3383         (ScrollAnimator):
3384         * platform/ScrollAnimatorNone.h:
3385         (ScrollAnimatorNone):
3386         * platform/SharedBuffer.h:
3387         (SharedBuffer):
3388         * platform/WheelFlingPlatformGestureCurve.h:
3389         (WheelFlingPlatformGestureCurve):
3390         * platform/Widget.h:
3391         (Widget):
3392
3393 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3394
3395         NodesFromRect and area-based hit-testing can not handle CSS transforms.
3396         https://bugs.webkit.org/show_bug.cgi?id=85792
3397
3398         Reviewed by Eric Seidel.
3399
3400         To support the combination of CSS transforms and rect based hit testing,
3401         we need to test against the transformed rect, instead of the original rect.
3402
3403         This patch makes HitTestPoint store the exact transformed FloatPoint and 
3404         FloatQuad, and modifies the intersection methods so that they will use a 
3405         new FloatQuad based intersection when transforms requires it.
3406
3407         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
3408                fast/dom/nodesFromRect/nodesFromRect-scale.html
3409
3410         * platform/graphics/FloatQuad.cpp:
3411         (WebCore::determinant):
3412         (WebCore::rightMostCornerToVector):
3413         (WebCore::FloatQuad::intersectsRect):
3414         (WebCore::FloatQuad::isCounterclockwise):
3415         * platform/graphics/FloatQuad.h:
3416         (FloatQuad):
3417         * rendering/HitTestResult.cpp:
3418         (WebCore::HitTestPoint::HitTestPoint):
3419         (WebCore::HitTestPoint::operator=):
3420         (WebCore::HitTestPoint::move):
3421         (WebCore::HitTestPoint::intersectsRect):
3422         (WebCore::HitTestPoint::intersects):
3423         * rendering/HitTestResult.h:
3424         (HitTestPoint):
3425         (WebCore::HitTestPoint::isRectilinear):
3426         (WebCore::HitTestPoint::transformedPoint):
3427         (WebCore::HitTestPoint::transformedRect):
3428         * rendering/HitTestingTransformState.cpp:
3429         (WebCore::HitTestingTransformState::flattenWithTransform):
3430         (WebCore::HitTestingTransformState::mappedArea):
3431         (WebCore::HitTestingTransformState::boundsOfMappedArea):
3432         * rendering/HitTestingTransformState.h:
3433         (WebCore::HitTestingTransformState::create):
3434         (WebCore::HitTestingTransformState::HitTestingTransformState):
3435         * rendering/RenderFlowThread.cpp:
3436         (WebCore::RenderFlowThread::hitTestRegion):
3437         * rendering/RenderLayer.cpp:
3438         (WebCore::RenderLayer::hitTest):
3439         (WebCore::RenderLayer::createLocalTransformState):
3440         (WebCore::RenderLayer::hitTestLayer):
3441         (WebCore::RenderLayer::hitTestChildLayerColumns):
3442         * rendering/RenderLayer.h:
3443         * rendering/svg/RenderSVGText.cpp:
3444         (WebCore::RenderSVGText::nodeAtFloatPoint):
3445
3446 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
3447
3448         Add HTMLStackItem.h to project files
3449         https://bugs.webkit.org/show_bug.cgi?id=92221
3450
3451         Reviewed by Adam Barth.
3452
3453         Added HTMLStackItem.h introduced in r123399 to project files.
3454
3455         Project file changes only, no change in behavior thus no new tests.
3456
3457         * GNUmakefile.list.am:
3458         * WebCore.gypi:
3459         * WebCore.vcproj/WebCore.vcproj:
3460         * WebCore.xcodeproj/project.pbxproj:
3461
3462 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3463
3464         Unreviewed, rolling out r123606.
3465         http://trac.webkit.org/changeset/123606
3466         https://bugs.webkit.org/show_bug.cgi?id=92247
3467
3468         broke Windows build of Chromium (Requested by tomhudson on
3469         #webkit).
3470
3471         * Resources/colorSuggestionPicker.css: Removed.