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