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