69f170d11523e2105dc0dd232152823b5fce565f
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-08  Renata Hodovan  <reni@webkit.org>
2
3         Adding few already supported features to the FeatureSet in DOMImplementation
4         https://bugs.webkit.org/show_bug.cgi?id=86482
5
6         Text, Filter and View features are already implemented but they
7         are not added to the SVG11 feature set. This is corrected in this patch.
8
9         Reviewed by Nikolas Zimmermann.
10
11         No new testcase is needed because we already have one what checks the svg features via
12         DOMImplementation (svg/custom/svg-features.html).
13
14         * dom/DOMImplementation.cpp:
15         (WebCore::isSVG11Feature):
16
17 2012-06-08  Stephen Chenney  <schenney@chromium.org>
18
19         WebCore::ImageBuffer.cpp has broken color table code
20         https://bugs.webkit.org/show_bug.cgi?id=80321
21
22         Reviewed by Dirk Schulze.
23
24         The code in ImageBuffer::transformColorSpace had two problems that are
25         fixed by this patch.
26
27         First, it was using member variables for data
28         that is static constant. This is incredibly wasteful, as every
29         ImageBuffer that is created (and we make a lot of them) gets its own
30         copy of the LUT and the table is initialized again and again. The
31         patch replaces this with a static local, with lazy evaluation, in
32         the method that uses the tables.
33
34         Second, the code for filling the table was mapping 255 to 254, thus
35         reducing the intensity and alpha of every image it pushed through a
36         color transform.
37
38         Test: svg/filters/color-space-conversion.svg
39
40         * platform/graphics/ImageBuffer.cpp:
41         (WebCore::ImageBuffer::transformColorSpace):
42         * platform/graphics/ImageBuffer.h:
43         (ImageBuffer):
44
45 2012-06-08  Alexei Filippov  <alexeif@chromium.org>
46
47         Web Inspector: Better labels positioning on the memory pie chart
48         https://bugs.webkit.org/show_bug.cgi?id=88652
49
50         Reviewed by Vsevolod Vlasov.
51
52         * inspector/front-end/NativeMemorySnapshotView.js:
53         (WebInspector.NativeMemoryPieChart.prototype._paint.paintPercentAndLabel):
54         (WebInspector.NativeMemoryPieChart.prototype._paint):
55
56 2012-06-08  Bryan McQuade  <bmcquade@google.com>
57
58         Web Inspector: Annotate timeline records with a frame identifier
59         https://bugs.webkit.org/show_bug.cgi?id=86406
60
61         Reviewed by Vsevolod Vlasov.
62
63         Tests: Updated existing layout tests.
64
65         * inspector/InspectorController.cpp:
66         (WebCore::InspectorController::InspectorController):
67         * inspector/InspectorInstrumentation.cpp:
68         (WebCore::frameForScriptExecutionContext):
69         (WebCore):
70         (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
71         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
72         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
73         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
74         (WebCore::InspectorInstrumentation::willChangeXHRReadyStateImpl):
75         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
76         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
77         (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
78         (WebCore::InspectorInstrumentation::willFireTimerImpl):
79         (WebCore::InspectorInstrumentation::willLayoutImpl):
80         (WebCore::InspectorInstrumentation::willLoadXHRImpl):
81         (WebCore::InspectorInstrumentation::willPaintImpl):
82         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
83         (WebCore::InspectorInstrumentation::willSendRequestImpl):
84         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
85         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
86         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
87         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
88         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
89         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
90         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
91         (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
92         (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
93         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
94         * inspector/InspectorInstrumentation.h:
95         (InspectorInstrumentation):
96         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
97         (WebCore::InspectorInstrumentation::didInstallTimer):
98         (WebCore::InspectorInstrumentation::didRemoveTimer):
99         (WebCore::InspectorInstrumentation::willCallFunction):
100         (WebCore::InspectorInstrumentation::willChangeXHRReadyState):
101         (WebCore::InspectorInstrumentation::willDispatchEvent):
102         (WebCore::InspectorInstrumentation::willEvaluateScript):
103         (WebCore::InspectorInstrumentation::willFireTimer):
104         (WebCore::InspectorInstrumentation::willLayout):
105         (WebCore::InspectorInstrumentation::willLoadXHR):
106         (WebCore::InspectorInstrumentation::willPaint):
107         (WebCore::InspectorInstrumentation::willRecalculateStyle):
108         (WebCore::InspectorInstrumentation::willReceiveResourceData):
109         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
110         (WebCore::InspectorInstrumentation::willWriteHTML):
111         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
112         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
113         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
114         * inspector/InspectorTimelineAgent.cpp:
115         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
116         (WebCore::InspectorTimelineAgent::didBeginFrame):
117         (WebCore::InspectorTimelineAgent::willCallFunction):
118         (WebCore::InspectorTimelineAgent::willDispatchEvent):
119         (WebCore::InspectorTimelineAgent::willLayout):
120         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
121         (WebCore::InspectorTimelineAgent::willPaint):
122         (WebCore::InspectorTimelineAgent::willComposite):
123         (WebCore::InspectorTimelineAgent::willWriteHTML):
124         (WebCore::InspectorTimelineAgent::didInstallTimer):
125         (WebCore::InspectorTimelineAgent::didRemoveTimer):
126         (WebCore::InspectorTimelineAgent::willFireTimer):
127         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
128         (WebCore::InspectorTimelineAgent::willLoadXHR):
129         (WebCore::InspectorTimelineAgent::willEvaluateScript):
130         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
131         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
132         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
133         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
134         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
135         (WebCore::InspectorTimelineAgent::didTimeStamp):
136         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
137         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
138         (WebCore::InspectorTimelineAgent::didRequestAnimationFrame):
139         (WebCore::InspectorTimelineAgent::didCancelAnimationFrame):
140         (WebCore::InspectorTimelineAgent::willFireAnimationFrame):
141         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
142         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
143         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
144         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
145         (WebCore::InspectorTimelineAgent::appendRecord):
146         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
147         (WebCore::InspectorTimelineAgent::pushCancelableRecord):
148         (WebCore::InspectorTimelineAgent::commitCancelableRecords):
149         * inspector/InspectorTimelineAgent.h:
150         (WebCore):
151         (WebCore::InspectorTimelineAgent::create):
152         (InspectorTimelineAgent):
153         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
154         (TimelineRecordEntry):
155         * inspector/WorkerInspectorController.cpp:
156         (WebCore::WorkerInspectorController::WorkerInspectorController):
157         * inspector/front-end/TimelinePresentationModel.js:
158         (WebInspector.TimelinePresentationModel.isEventDivider):
159         (WebInspector.TimelinePresentationModel.Record):
160
161 2012-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
162
163         Unreviewed, rolling out r119821.
164         http://trac.webkit.org/changeset/119821
165         https://bugs.webkit.org/show_bug.cgi?id=88648
166
167         Seems to have regression on Mac (Requested by kinuko on
168         #webkit).
169
170         * fileapi/File.cpp:
171         (WebCore::File::File):
172         (WebCore::File::lastModifiedDate):
173         (WebCore::File::lastModifiedDateForBinding):
174         (WebCore):
175         (WebCore::File::captureSnapshot):
176         * fileapi/File.h:
177         (File):
178         * fileapi/File.idl:
179         * platform/FileMetadata.h:
180         (WebCore::FileMetadata::FileMetadata):
181         * platform/FileSystem.h:
182         * platform/chromium/support/WebHTTPBody.cpp:
183         (WebKit::WebHTTPBody::elementAt):
184         * platform/network/BlobData.cpp:
185         (WebCore):
186         * platform/network/BlobData.h:
187         (BlobDataItem):
188         (WebCore::BlobDataItem::BlobDataItem):
189         * platform/network/FormData.cpp:
190         (WebCore::FormData::appendFile):
191         * platform/network/cf/FormDataStreamCFNet.cpp:
192         (WebCore::advanceCurrentStream):
193         * platform/network/soup/ResourceHandleSoup.cpp:
194         (WebCore::blobIsOutOfDate):
195
196 2012-06-08  Kinuko Yasuda  <kinuko@chromium.org>
197
198         Unreviewed, removing duplicated entries in gyp.
199
200         * WebCore.gypi:
201
202 2012-06-08  Arko Saha  <arko@motorola.com>
203
204         Microdata: An element with an empty itemprop='' should not get listed in the .properties list.
205         https://bugs.webkit.org/show_bug.cgi?id=88235
206
207         Reviewed by Ryosuke Niwa.
208
209         As per the specification change http://html5.org/r/6854, an element should be listed in .properties
210         if the elelement has an attribute itemprop specified and the element has one or more property names.
211
212         Test: fast/dom/MicroData/element-with-empty-itemprop.html
213
214         * html/HTMLPropertiesCollection.cpp:
215         (WebCore::HTMLPropertiesCollection::itemAfter):
216
217 2012-06-07  Kinuko Yasuda  <kinuko@chromium.org>
218
219         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
220         https://bugs.webkit.org/show_bug.cgi?id=87826
221
222         Reviewed by Kent Tamura.
223
224         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
225
226         * fileapi/File.cpp:
227         (WebCore::File::File):
228         (WebCore::File::captureSnapshot):
229         (WebCore::File::lastModifiedDate):
230         (WebCore::File::lastModifiedDateForBinding): Removed.
231         * fileapi/File.h:
232         (File):
233         * fileapi/File.idl:
234         * platform/FileMetadata.h:
235         (WebCore::FileMetadata::FileMetadata):
236         * platform/FileSystem.h:
237         * platform/chromium/support/WebHTTPBody.cpp:
238         (WebKit::WebHTTPBody::elementAt):
239         * platform/network/BlobData.h:
240         (WebCore::BlobDataItem::doNotCheckFileChange): Removed.
241         * platform/network/BlobData.cpp:
242         * platform/network/cf/FormDataStreamCFNet.cpp:
243         (WebCore::advanceCurrentStream):
244         * platform/network/soup/ResourceHandleSoup.cpp:
245         (WebCore::blobIsOutOfDate):
246
247 2012-06-08  Kent Tamura  <tkent@chromium.org>
248
249         Move form-related functions of Document to FormController
250         https://bugs.webkit.org/show_bug.cgi?id=88497
251
252         Reviewed by Hajime Morita.
253
254         A lot of files depend on Document.h. We had to build many files when we
255         touched form-related features in Document.h or
256         CheckedRadioButtons.h. This patch reduces such pain.
257
258         No new tests. Just a refactoring.
259
260         * CMakeLists.txt: Add FormController.cpp and/or FormController.h.
261         * GNUmakefile.list.am: ditto.
262         * Target.pri: ditto.
263         * WebCore.gypi: ditto.
264         * WebCore.vcproj/WebCore.vcproj: ditto.
265         * WebCore.xcodeproj/project.pbxproj: ditto.
266
267         * dom/Document.cpp: Removed form-releated features except the followings.
268         (WebCore::Document::formController): Accessor for a FormController.
269         (WebCore::Document::formElementsState):
270         Just returns FormController::formElementsState().
271         We don't create new FormController.
272         (WebCore::Document::setStateForNewFormElements):
273         Just returns FormController::setStateForNewFormElements().
274         We don't create new FormController if the specified vector is empty.
275         * dom/Document.h:
276         Moved form-related functions to FormController.
277
278         * html/FormController.cpp: Added. Moved from Document.cpp.
279         * html/FormController.h: Added. Moved from Document.h
280
281         * html/FormAssociatedElement.cpp: Use Document::formController().
282         (WebCore::FormAssociatedElement::didMoveToNewDocument):
283         (WebCore::FormAssociatedElement::insertedInto):
284         (WebCore::FormAssociatedElement::removedFrom):
285         (WebCore::FormAssociatedElement::formAttributeChanged):
286         * html/HTMLFormControlElementWithState.cpp: Use Document::formController().
287         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
288         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
289         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
290         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
291         * html/HTMLFormElement.cpp: Use Document::formController().
292         (WebCore::HTMLFormElement::didNotifyDescendantInsertions):
293         (WebCore::HTMLFormElement::removedFrom):
294         * html/HTMLInputElement.cpp: Use Document::formController().
295         (WebCore::HTMLInputElement::~HTMLInputElement):
296         (WebCore::HTMLInputElement::didMoveToNewDocument):
297         (WebCore::HTMLInputElement::checkedRadioButtons):
298         * html/HTMLInputElement.h:
299         Declare CheckedRadioButtons. It was provided by Document.h.
300         * html/parser/HTMLConstructionSite.h:
301         Declare HTMLFormElement. It was provided by Document.h
302
303 2012-06-08  Taiju Tsuiki  <tzik@chromium.org>
304
305         Add FileSystem item to storage tree.
306         https://bugs.webkit.org/show_bug.cgi?id=72691
307
308         Reviewed by Vsevolod Vlasov.
309
310         * WebCore.gypi:
311         * WebCore.vcproj/WebCore.vcproj:
312         * inspector/compile-front-end.py:
313         * inspector/front-end/FileSystemModel.js: Added.
314         * inspector/front-end/Images/fileSystem.png: Added.
315         * inspector/front-end/ResourcesPanel.js:
316         (WebInspector.FileSystemListTreeElement):
317         (WebInspector.FileSystemListTreeElement.prototype.onexpand):
318         (WebInspector.FileSystemListTreeElement.prototype.onattach):
319         (WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
320         (WebInspector.FileSystemListTreeElement.prototype._fileSystemAdded):
321         (WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved):
322         (WebInspector.FileSystemListTreeElement.prototype._fileSystemTreeElementByName):
323         (WebInspector.FileSystemListTreeElement.prototype._refreshFileSystem):
324         (WebInspector.FileSystemTreeElement):
325         (WebInspector.FileSystemTreeElement.prototype.get fileSystemName):
326         (WebInspector.FileSystemTreeElement.prototype.get itemURL):
327         * inspector/front-end/Settings.js:
328         (WebInspector.ExperimentsSettings):
329         * inspector/front-end/WebKit.qrc:
330         * inspector/front-end/inspector.html:
331         * inspector/front-end/resourcesPanel.css:
332         (.file-system-storage-tree-item .icon):
333         * inspector/front-end/utilities.js:
334
335 2012-06-08  Kentaro Hara  <haraken@chromium.org>
336
337         REGRESSION r119802: Remove unnecessary ASSERT(!m_deletionHasBegun) from Document.h
338         https://bugs.webkit.org/show_bug.cgi?id=88528
339
340         Reviewed by Ryosuke Niwa.
341
342         m_deletionHasBegun should become true just before 'delete this'.
343
344         No tests. No change in behavior.
345
346         * dom/Document.h:
347         (WebCore::Document::guardRef):
348         (WebCore::Document::guardDeref):
349
350 2012-06-08  Adam Barth  <abarth@webkit.org>
351
352         HTTP 204 No Content responses shouldn't trigger MIME type warnings in the web inspector
353         https://bugs.webkit.org/show_bug.cgi?id=88603
354
355         Reviewed by Pavel Feldman.
356
357         A 204 response doesn't have an entity body, so its MIME type is kind of
358         meaningless.  We shouldn't spam the console with a warning about MIME
359         types.
360
361         * inspector/front-end/NetworkManager.js:
362         (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType):
363
364 2012-06-08  Yoshifumi Inoue  <yosin@chromium.org>
365
366         [Forms] Drop StepRange::NumberWithDecimalPlacesOrMissing
367         https://bugs.webkit.org/show_bug.cgi?id=88621
368
369         Reviewed by Kent Tamura.
370
371         This patch changes NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
372         We use NaN as indication of having value or not.
373
374         No new tests, because this patch doesn't change behavior.
375
376         * html/DateInputType.cpp:
377         (WebCore::DateInputType::createStepRange): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
378         * html/DateTimeInputType.cpp:
379         (WebCore::DateTimeInputType::createStepRange): ditto.
380         * html/DateTimeLocalInputType.cpp:
381         (WebCore::DateTimeLocalInputType::createStepRange): ditto.
382         * html/MonthInputType.cpp:
383         (WebCore::MonthInputType::createStepRange): ditto.
384         * html/NumberInputType.cpp:
385         (WebCore::NumberInputType::createStepRange): ditto.
386         * html/RangeInputType.cpp:
387         (WebCore::RangeInputType::createStepRange): ditto.
388         * html/StepRange.cpp:
389         (WebCore::StepRange::StepRange): Checks value is finite or not.
390         (WebCore::StepRange::parseStep): Replace NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
391         * html/StepRange.h:
392         (StepRange): Removed NumberWithDecimalPlacesOrMissing.
393         * html/TimeInputType.cpp:
394         (WebCore::TimeInputType::createStepRange):  NumberWithDecimalPlacesOrMissing to NumberWithDecimalPlaces.
395         * html/WeekInputType.cpp:
396         (WebCore::WeekInputType::createStepRange): ditto.
397
398 2012-06-08  Kentaro Hara  <haraken@chromium.org>
399
400         Unreviewed. Fixed a comment, pointed out by ap@.
401
402         * platform/TreeShared.h:
403         (WebCore):
404
405 2012-06-08  Noel Gordon  <noel.gordon@gmail.com>
406
407         [chromium] WEBP image blue and red color channels reversed on Android
408         https://bugs.webkit.org/show_bug.cgi?id=88613
409
410         Reviewed by Kent Tamura.
411
412         No new tests. Covered by test fast/images/webp-image-decoding.html though I'm
413         not sure where/how the Androids run their layout tests.
414
415         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
416         (outputMode): Detect little-endian Skia with a blue pixel shift (aka Android)
417         which seems to be the way for them per bug 75861.
418
419 2012-06-08  Ryosuke Niwa  <rniwa@webkit.org>
420
421         Remove the assertion that has been moved to TreeScope after r119802.
422
423         * dom/Document.cpp:
424         (WebCore::Document::removedLastRef):
425
426 2012-06-07  Kentaro Hara  <haraken@chromium.org>
427
428         Reduce Node object size from 72 byte to 64 byte
429         https://bugs.webkit.org/show_bug.cgi?id=88528
430
431         Reviewed by Ryosuke Niwa.
432
433         This patch removes all virtual methods from TreeShared.h,
434         by which we can remove a virtual method table pointer (8 byte
435         in a 64bit architechture) from each Node object. Consequently,
436         this patch reduces the Node object size from 72 byte to 64 byte.
437
438         e.g. The HTML spec (http://www.whatwg.org/specs/web-apps/current-work/)
439         contains 325640 Node objects. Thus this patch saves 325640 * 8 byte = 2.6 MB.
440
441         e.g. sizeof(Element) is reduced from 104 byte to 96 byte.
442
443         - In multiple inheritance, a virtual method table pointer is allocated
444         for each base class that has virtual methods. For example, for
445         'class A : public B, C {};' where B and C have virtual methods,
446         two virtual method table pointers are allocated for each A object.
447         In this patch, A = Node, B = EventTarget, and C = TreeShared.
448         By removing the virtual methods from TreeShared, we can save the virtual
449         method table pointer for TreeShared. 8 byte saving.
450
451         - Node and SVGElementInstance are the only classes that inherit TreeShared.
452
453         - This patch removes virtual TreeShared::removeLastRef() and implements
454         virtual Node::removeLastRef() and virtual SVGElementInstance::removeLastRef().
455         Node::removeLastRef() calls 'delete this' for 'this' of type Node*,
456         and SVGElementInstance::removeLastRef() calls 'delete this' for 'this' of type
457         SVGElementInstance*.
458
459         - This patch removes the virtual destructor of TreeShared. This removal is safe
460         because (1) no one calls 'delete this' for 'this' of type TreeShared*,
461         and (2) both Node and SVGElementInstance have virtual destructor.
462
463         No change in behavior. Confirm no regression in existing tests.
464
465         * dom/ContainerNode.cpp:
466         (WebCore::callRemovedLastRef):
467         (WebCore):
468         * dom/Node.h:
469         (WebCore::Node::removedLastRef):
470         * platform/TreeShared.h:
471         (WebCore):
472         (TreeShared):
473         (WebCore::TreeShared::deref):
474         * svg/SVGElementInstance.cpp:
475         (WebCore::callRemovedLastRef):
476         (WebCore):
477         * svg/SVGElementInstance.h:
478         (WebCore::SVGElementInstance::removedLastRef):
479
480         * WebCore.order: Added a symbol for callRemovedLastRef().
481         * WebCore.exp.in: Ditto.
482
483 2012-06-07  Takashi Sakamoto  <tasak@google.com>
484
485         ShadowRoot needs resetStyleInheritance
486         https://bugs.webkit.org/show_bug.cgi?id=84048
487
488         Added resetStyleInheritance API to ShadowRoot. The spec URL is
489         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes
490         To implement the API, modified StyleResolver to use empty style
491         instead of parent style if resetStyleInheritance is true,
492         and a node and its parent node are placed in different shadow trees.
493
494         Reviewed by Hajime Morita.
495
496         Test: fast/dom/shadow/shadow-root-resetStyleInheritance.html
497               fast/dom/shadow/shadow-root-resetStyleInheritance-expected.html
498
499         * css/StyleResolver.cpp:
500         (WebCore::StyleResolver::initForStyleResolve):
501         Set m_parentStyle to NULL when resetStyleInheritance.
502         (WebCore::StyleResolver::documentSettings):
503         Added a new method to obtain current document's settings.
504         (WebCore::StyleResolver::initializeFontStyle):
505         Initialize m_style by using document settings. Its code was move
506         from the code initializing font style in applyProperty.
507         (WebCore::StyleResolver::styleForElement):
508         Initialize font style if m_parentStyle is NULL. The old code just
509         used style() and don't touch font style. The new code uses the above
510         initializeFontStyle.
511         (WebCore::StyleResolver::applyProperty):
512         Moved a code for initializing font style as "initial" to
513         a new method: initializeFontStyle and modified to use the method.
514         Modified to use documentSettings().
515         (WebCore::StyleResolver::checkForGenericFamilyChange):
516         Modified to use documentSettings().
517         * css/StyleResolver.h:
518         (WebCore::StyleResolver::documentSettings):
519         (WebCore::StyleResolver::initializeFontStyle):
520         Added two new methods to class StyleResolver.
521         * dom/NodeRenderingContext.cpp:
522         (WebCore::NodeRenderingContext::NodeRenderingContext):
523         Modified to calculate m_resetStyleInheritance in its constructor.
524         * dom/NodeRenderingContext.h:
525         (WebCore::NodeRenderingContext::resetStyleInheritance):
526         Implemented a new method, just returning m_resetStyleInheritance.
527         * dom/ShadowRoot.cpp:
528         (WebCore::ShadowRoot::setResetStyleInheritance):
529         Modified to force to recalculate children's styles if
530         resetStyleInheritance is changed.
531         * dom/ShadowRoot.h:
532         (ShadowRoot):
533         Added resetStyleInheritance getter and setter.
534         * dom/ShadowRoot.idl:
535         Added an attribute, resetStyleInheritance.
536         * dom/TreeScope.cpp:
537         (WebCore::TreeScope::resetStyleInheritance):
538         * dom/TreeScope.h:
539         (TreeScope):
540         Added resetStyleInheritance's default getter.
541         The getter will be overrided by class ShadowRoot's getter.
542
543 2012-06-07  Victor Carbune  <victor@rosedu.org>
544
545         addTextTrack should set track mode to HIDDEN
546         https://bugs.webkit.org/show_bug.cgi?id=88317
547
548         Reviewed by Eric Carlson.
549
550         Updated existing test.
551
552         * html/HTMLMediaElement.cpp:
553         (WebCore::HTMLMediaElement::addTextTrack): Set the default parameters
554         for the newly created TextTrack.
555         * html/track/TextTrack.cpp:
556         (WebCore::TextTrack::TextTrack):
557
558 2012-06-07  Li Yin  <li.yin@intel.com>
559
560         FileAPI: Blob should support ArrayBufferView instead of ArrayBuffer for Constructor Parameters
561         https://bugs.webkit.org/show_bug.cgi?id=88294
562
563         Reviewed by Jian Li.
564
565         From Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
566         Currently we add the support for ArrayBufferView, while still keeping ArrayBuffer for
567         backward compatibility. We will remove it in the near future.
568
569         Test: fast/files/blob-constructor.html
570
571         * bindings/js/JSBlobCustom.cpp:
572         (WebCore::JSBlobConstructor::constructJSBlob):
573         * bindings/v8/custom/V8BlobCustom.cpp:
574         (WebCore::V8Blob::constructorCallback):
575         * fileapi/WebKitBlobBuilder.cpp:
576         (WebCore::WebKitBlobBuilder::append):
577         (WebCore):
578         * fileapi/WebKitBlobBuilder.h:
579         (WebCore):
580         (WebKitBlobBuilder):
581         * fileapi/WebKitBlobBuilder.idl: Add support for ArrayBufferView in append method
582
583 2012-06-07  MORITA Hajime  <morrita@google.com>
584
585         A style in an older shadow subtree causes assert when composing with <shadow>
586         https://bugs.webkit.org/show_bug.cgi?id=88299
587
588         Reviewed by Dimitri Glazkov.
589
590         InsertionPoint::attach() assumes its distributed content not being attach()-ed.
591         But this assumption can break. This change added a guard for that.
592         This can happen for shadow boundaries in general. But ShadowRoot already handles that case.
593
594         Test: fast/dom/shadow/insertion-point-shadow-crash.html
595
596         * html/shadow/InsertionPoint.cpp:
597         (WebCore::InsertionPoint::attach):
598
599 2012-06-07  Max Feil  <mfeil@rim.com>
600
601         [BlackBerry] Show correct fullscreen button image (media controls)
602         https://bugs.webkit.org/show_bug.cgi?id=88563
603
604         Reviewed by Antonio Gomes.
605
606         PR159306: Show "exit" fullscreen button image instead of "enter"
607         fullscreen button image when in fullscreen mode (HTML5 media
608         controls).
609
610         I am not providing a test due to the simplicity of this patch
611         and the relative difficulty and maintainability issues associated
612         with testing how an image is rendered.
613
614         * platform/blackberry/RenderThemeBlackBerry.cpp:
615         (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
616
617 2012-06-07  Noel Gordon  <noel.gordon@gmail.com>
618
619         [chromium] Use WEBPImportPictureRGBX|BGRX to import picture data
620         https://bugs.webkit.org/show_bug.cgi?id=88218
621
622         Reviewed by Kent Tamura.
623
624         Stop using the RGBA and RGBA variants of the picture import routines (since
625         these will import alpha channel data in a future libwebp). Use the RGBX and
626         BGRX variants to import picture data for encoding to make it clear that the
627         alpha channel is (and must be) ignored.
628
629         Test: fast/canvas/canvas-toDataURL-webp.html
630
631         * platform/image-encoders/skia/WEBPImageEncoder.cpp:
632         (WebCore::rgbPictureImport):
633         (WebCore::importPictureBGRX): Use WEBPImportPictureBGRX for picture imports
634         that must ignore the alpha channel. Change the template parameter to be the
635         premultiplied alpha state of the input image data.
636         (WebCore::importPictureRGBX): Use WEBPImportPictureRGBX, ditto.
637         (WebCore::encodePixels): Invert the sense of the template parameter to make
638         it now indicate the premultiplied alpha state of the input image data.
639
640 2012-06-07  Takashi Sakamoto  <tasak@google.com>
641
642         Improve the performance of pushScope in StyleResolver
643         https://bugs.webkit.org/show_bug.cgi?id=88222
644
645         Reviewed by Hajime Morita.
646
647         As setupScopeStack always sets m_scopeStackParent to be NULL,
648         m_scopeStack is never reused. m_scopeStackParent should be the last
649         element of m_scopeStack.
650
651         No new tests, because fast/css/style-scoped/ uses pushScope,
652         popScope and setupScopeStack and checks whether there exists
653         any crash bug or not. And this patch doesn't change any behavior
654         of scoped author syltes.
655
656         * css/StyleResolver.cpp:
657         (WebCore::StyleResolver::setupScopeStack):
658         Modified to set m_scopeSackParent to be the last element of
659         m_scopeStack.
660         (WebCore::StyleResolver::popScope):
661         Modified to remove the last element if m_scopeStack is not empty and
662         the last element of m_scopeStack has the same scope as the scoping
663         element given by the argument.
664
665 2012-06-07  Mark Pilgrim  <pilgrim@chromium.org>
666
667         [Chromium] Move didStartWorkerRunLoop to Platform.h
668         https://bugs.webkit.org/show_bug.cgi?id=88562
669
670         Reviewed by Adam Barth.
671
672         Part of a refactoring series. See tracking bug 82948.
673
674         * WebCore.gyp/WebCore.gyp:
675         * bindings/v8/WorkerScriptController.cpp:
676         (WebCore::WorkerScriptController::~WorkerScriptController):
677         * platform/chromium/PlatformSupport.h:
678         (WebCore):
679         * workers/WorkerThread.cpp:
680         (WebCore::WorkerThread::workerThread):
681
682 2012-06-07  Mike West  <mkwst@chromium.org>
683
684         Dropping m_startingLineNumber property from StyledElement.
685         https://bugs.webkit.org/show_bug.cgi?id=86848
686
687         Reviewed by Adam Barth.
688
689         We can have the same effect by moving the line-number calculation
690         directly into StyledElement::styleAttributeChanged. This means that
691         subsequent changes to the style attribute (via script) won't generate
692         error messages with line numbers, but that's an acceptable tradeoff.
693
694         Behavior is covered by existing CSP tests.
695
696         * dom/StyledElement.cpp:
697         (WebCore::StyledElement::StyledElement):
698         (WebCore::StyledElement::styleAttributeChanged):
699         * dom/StyledElement.h:
700         (WebCore::StyledElement::destroyInlineStyle):
701
702 2012-06-07  Peter Beverloo  <peter@chromium.org>
703
704         Initialize m_document in AXObjectCache's constructor for !HAVE(ACCESSIBILITY) builds
705         https://bugs.webkit.org/show_bug.cgi?id=88527
706
707         Reviewed by Adam Barth.
708
709         Initialize the m_document member with the passed on document in the stubbed
710         AXObjectCache constructor. No behavioral changes.
711
712         * accessibility/AXObjectCache.h:
713         (WebCore::AXObjectCache::AXObjectCache):
714
715 2012-06-05  James Robinson  <jamesr@chromium.org>
716
717         [chromium] Move deferral-related logic out of Canvas2DLayerChromium
718         https://bugs.webkit.org/show_bug.cgi?id=86050
719
720         Reviewed by Stephen White.
721
722         This removes Canvas2DLayerChromium and puts the deferral and double-buffering related logic in a new class,
723         Canvas2DLayerBridge, that uses TextureLayerChromium for compositing.  The bridge is responsible for managing the
724         front texture when double buffering is active, inserting the correct makeContextCurrent() and flush() calls on
725         the GraphicsContext3D and SkCanvas when appropriate, and owning the lifetime of the layer.
726
727         * WebCore.gypi:
728         * platform/graphics/chromium/Canvas2DLayerBridge.cpp: Added.
729         (WebCore):
730         (AcceleratedDeviceContext):
731         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
732         (WebCore::AcceleratedDeviceContext::prepareForDraw):
733         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
734         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
735         (WebCore::Canvas2DLayerBridge::skCanvas):
736         (WebCore::Canvas2DLayerBridge::prepareTexture):
737         (WebCore::Canvas2DLayerBridge::context):
738         (WebCore::Canvas2DLayerBridge::layer):
739         (WebCore::Canvas2DLayerBridge::contextAcquired):
740         * platform/graphics/chromium/Canvas2DLayerBridge.h: Added.
741         (WebCore):
742         (Canvas2DLayerBridge):
743         (WebCore::Canvas2DLayerBridge::create):
744         * platform/graphics/chromium/Canvas2DLayerChromium.cpp: Removed.
745         * platform/graphics/chromium/Canvas2DLayerChromium.h: Removed.
746         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
747         * platform/graphics/chromium/ImageBufferDataSkia.h:
748         (WebCore):
749         (ImageBufferData):
750         * platform/graphics/chromium/TextureLayerChromium.cpp:
751         (WebCore::TextureLayerChromium::willModifyTexture):
752             willModifyTexture() is called whenever the texture currently owned by the TextureLayerChromium will be
753             modified by a system out of the compositor's control. It makes sure that the compositor does not attempt to
754             draw with the potentially-modified texture until the next commit. For canvas, this is used when threading is
755             enabled and a non-deferrable drawing command is invoked from JS.
756         (WebCore):
757         * platform/graphics/chromium/TextureLayerChromium.h:
758         (TextureLayerChromium):
759         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
760         (WebCore::CCTextureUpdater::hasMoreUpdates):
761         (WebCore::CCTextureUpdater::update):
762         (WebCore::CCTextureUpdater::clear):
763         * platform/graphics/chromium/cc/CCTextureUpdater.h:
764         (CCTextureUpdater):
765         * platform/graphics/skia/ImageBufferSkia.cpp:
766         (WebCore::createAcceleratedCanvas):
767         (WebCore::ImageBuffer::~ImageBuffer):
768         (WebCore::ImageBuffer::context):
769         (WebCore::ImageBuffer::platformLayer):
770
771 2012-06-07  Patrick Gansterer  <paroga@webkit.org>
772
773         Remove HAVE(PATH_BASED_BORDER_RADIUS_DRAWING)
774         https://bugs.webkit.org/show_bug.cgi?id=87931
775
776         Reviewed by Beth Dakin.
777
778         r62035 added HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until all ports implement
779         GraphicsContext::clipConvexPolygon(). All major ports define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING in the
780         meantime and the alternative path has unnecessary maintainace costs and even don't compile at the moment.
781
782         * rendering/RenderBoxModelObject.cpp:
783         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
784         * rendering/RenderObject.cpp:
785         (WebCore::RenderObject::paintFocusRing):
786         * rendering/RenderObject.h:
787         (RenderObject):
788
789 2012-06-06  Vincent Scheib  <scheib@chromium.org>
790
791         Add new Pointer Lock spec events webkitpointerlockchange and webkitpointerlockerror
792         https://bugs.webkit.org/show_bug.cgi?id=88377
793
794         Reviewed by Dimitri Glazkov.
795
796         Part of a series of refactoring changes to update pointer lock API to
797         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
798
799         New change and error events added. Follow up patches will remove
800         the previous callbacks and pointerlocklost event. Tests updated
801         to include the new events, and a new test added specifically for
802         the new events, pointerlockchange-pointerlockerror-events.html.
803
804         Test: pointer-lock/pointerlockchange-pointerlockerror-events.html
805
806         * dom/Document.h:
807         (Document):
808         * dom/Document.idl:
809         * dom/EventNames.h:
810         (WebCore):
811         * page/PointerLockController.cpp:
812         (WebCore::PointerLockController::requestPointerLock):
813         (WebCore::PointerLockController::didAcquirePointerLock):
814         (WebCore::PointerLockController::didNotAcquirePointerLock):
815         (WebCore::PointerLockController::didLosePointerLock):
816         (WebCore::PointerLockController::enqueueEvent):
817         (WebCore):
818         * page/PointerLockController.h:
819         (PointerLockController):
820
821 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
822
823         Unreviewed, rolling out r119744.
824         http://trac.webkit.org/changeset/119744
825         https://bugs.webkit.org/show_bug.cgi?id=88584
826
827         Fails assertions in debug builds (Requested by jamesr_ on
828         #webkit).
829
830         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
831         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
832         (WebCore::CCIOSurfaceLayerImpl::willDraw):
833
834 2012-06-07  Julien Chaffraix  <jchaffraix@webkit.org>
835
836         Cache RenderLayer::isRootLayer for better performance
837         https://bugs.webkit.org/show_bug.cgi?id=88570
838
839         Reviewed by Ojan Vafai.
840
841         Caching covered by existing tests.
842
843         RenderLayer::isRootLayer()'s answer will be the same during the RenderLayer's
844         lifetime as a RenderLayer is tied to a RenderBoxModelObject. This change caches
845         isRootLayer value in the constructor.
846
847         On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows
848         by 100 columns table, it saves about 10% on the paint time during scrolling on
849         my machine (going from 50ms to 45ms). It would expect all code paths to see some
850         improvement as checking renderer()->isRenderView() was pretty common.
851
852         * rendering/RenderLayer.cpp:
853         (WebCore::RenderLayer::RenderLayer):
854         Added code to cache the result of renderer()->isRenderView() here.
855
856         (WebCore::RenderLayer::stackingContext):
857         (WebCore::isPositionedContainer):
858         (WebCore::isFixedPositionedContainer):
859         (WebCore::RenderLayer::enclosingTransformedAncestor):
860         (WebCore::RenderLayer::clippingRootForPainting):
861         (WebCore::shouldSuppressPaintingLayer):
862         (WebCore::RenderLayer::hitTest):
863         (WebCore::RenderLayer::intersectsDamageRect):
864         * rendering/RenderLayer.h:
865         (WebCore::RenderLayer::isStackingContext):
866         Updated all the call sites to use isRootLayer() instead of renderer()->isRenderView()
867         as it is faster.
868
869         (WebCore::RenderLayer::isRootLayer):
870         Added our caching here. Also made m_canSkipRepaintRectsUpdateOnScroll to follow
871         m_isRootLayer example.
872
873 2012-06-07  Takashi Sakamoto  <tasak@google.com>
874
875         Incorrect border rendering when border radius is above 2px.
876         https://bugs.webkit.org/show_bug.cgi?id=88046
877
878         Fixing findInnerVertex's logic to decide which is the better line
879         to find an inner vertex, x=center point's x of a rendering box or
880         y=center point's y of a rendering box.
881
882         Reviewed by Simon Fraser.
883
884         Test: fast/borders/border-radius-valid-border-clipping.html
885
886         * rendering/RenderBoxModelObject.cpp:
887         (WebCore::findInnerVertex):
888
889 2012-06-07  Edaena Salinas Jasso  <edaena@apple.com>
890
891         Should fire error event for empty 404 script
892         https://bugs.webkit.org/show_bug.cgi?id=50589
893         
894         Reviewed by Brady Eidson.
895
896         Tests: 
897         http/tests/loading/fire-error-event-empty-404-script.html
898         http/tests/loading/fire-error-script-no-content-type.html
899
900         * loader/SubresourceLoader.cpp:
901         (WebCore::SubresourceLoader::didReceiveResponse): We should check for http status 
902         codes here to stop depending on the response being non-empty.
903         (WebCore::SubresourceLoader::didReceiveData): Moved the http status check but
904         avoid messing with multipart responses.
905         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError): Renamed from 
906         errorLoadingResource for clarity.
907
908         * loader/SubresourceLoader.h:
909         * loader/cf/SubresourceLoaderCF.cpp:
910         (WebCore::SubresourceLoader::didReceiveDataArray):
911         Updated for errorLoadingResource renaming.
912
913 2012-06-07  Konrad Piascik  <kpiascik@rim.com>
914
915         [BlackBerry] Update PlayBook's User Agent String for Web Inspector
916         https://bugs.webkit.org/show_bug.cgi?id=88543
917
918         Reviewed by Antonio Gomes.
919
920         We expect users to upgrade their devices so developers only need the latest UA String.
921
922         No tests needed.
923
924         * inspector/front-end/SettingsScreen.js:
925         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
926
927 2012-06-07  Shawn Singh  <shawnsingh@chromium.org>
928
929         [chromium] Remove obsolete FIXME comment about a layer sorting bug.
930         https://bugs.webkit.org/show_bug.cgi?id=88546
931
932         Reviewed by James Robinson.
933
934         No tests needed, only comment changed. The comment referred to a
935         potential bug that actually will not occur. The W3C spec on CSS 3d
936         transforms indicates that layers that do not share the same "3d
937         rendering context" do not sort together, and our existing code
938         sorts this way already.
939
940         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
941         (WebCore::subtreeShouldRenderToSeparateSurface):
942
943 2012-06-07  Adam Barth  <abarth@webkit.org>
944
945         Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor
946         https://bugs.webkit.org/show_bug.cgi?id=88375
947
948         Reviewed by James Robinson.
949
950         This patch removes Settings::defaultDeviceScaleFactor because it is
951         redundant with Page::deviceScaleFactor now that we no longer support
952         target-densitydpi.  Page::deviceScaleFactor is the canonical place to
953         store the device scale factor.
954
955         * WebCore.exp.in:
956         * page/Settings.cpp:
957         (WebCore::Settings::Settings):
958         (WebCore):
959         * page/Settings.h:
960         (Settings):
961         * testing/InternalSettings.cpp:
962         (WebCore::InternalSettings::setDeviceScaleFactor):
963
964 2012-06-07  Alec Flett  <alecflett@chromium.org>
965
966         IndexedDB: Error codes, phase one
967         https://bugs.webkit.org/show_bug.cgi?id=88459
968
969         Reviewed by Tony Chang.
970
971         This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and
972         NON_TRANSIENT_ERR from earlier versions of the spec, and
973         normalizes the place where TypeError should be thrown so that it's
974         easier to update when the bindings change.
975
976         No new tests: existing tests cover these changes and have been updated.
977
978         * Modules/indexeddb/IDBCursor.cpp:
979         (WebCore::IDBCursor::advance):
980         (WebCore::IDBCursor::continueFunction):
981         (WebCore::IDBCursor::stringToDirection):
982         (WebCore::IDBCursor::directionToString):
983         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
984         (WebCore::IDBCursorBackendImpl::update):
985         (WebCore::IDBCursorBackendImpl::deleteFunction):
986         * Modules/indexeddb/IDBDatabase.cpp:
987         (WebCore::IDBDatabase::createObjectStore):
988         (WebCore::IDBDatabase::deleteObjectStore):
989         (WebCore::IDBDatabase::setVersion):
990         (WebCore::IDBDatabase::transaction):
991         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
992         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
993         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
994         (WebCore::IDBDatabaseBackendImpl::setVersion):
995         * Modules/indexeddb/IDBDatabaseException.cpp:
996         (WebCore):
997         * Modules/indexeddb/IDBDatabaseException.h:
998         * Modules/indexeddb/IDBDatabaseException.idl:
999         * Modules/indexeddb/IDBFactory.cpp:
1000         (WebCore::IDBFactory::open):
1001         (WebCore::IDBFactory::deleteDatabase):
1002         * Modules/indexeddb/IDBObjectStore.cpp:
1003         (WebCore::IDBObjectStore::index):
1004         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1005         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1006         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
1007         * Modules/indexeddb/IDBRequest.cpp:
1008         (WebCore::IDBRequest::result):
1009         (WebCore::IDBRequest::errorCode):
1010         (WebCore::IDBRequest::webkitErrorMessage):
1011         * Modules/indexeddb/IDBTransaction.cpp:
1012         (WebCore::IDBTransaction::objectStore):
1013         (WebCore::IDBTransaction::stringToMode):
1014         (WebCore::IDBTransaction::modeToString):
1015         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1016         (WebCore::IDBTransactionBackendImpl::objectStore):
1017
1018 2012-06-07  Dana Jansens  <danakj@chromium.org>
1019
1020         [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
1021         https://bugs.webkit.org/show_bug.cgi?id=88371
1022
1023         Reviewed by James Robinson.
1024
1025         Unit test: CCLayerTreeHostImplTest.layersFreeTextures
1026
1027         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
1028         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
1029         (WebCore::CCIOSurfaceLayerImpl::willDraw):
1030
1031 2012-06-07  Peter Beverloo  <peter@chromium.org>
1032
1033         Buildfix for ENABLE_OVERFLOW_SCROLLING=0 (though defined)
1034         https://bugs.webkit.org/show_bug.cgi?id=88564
1035
1036         Reviewed by Adam Barth.
1037
1038         Where ENABLE(X) mandates that X both has to be defined and evaluates to
1039         true as a lone preprocessor statement, there were two places in the CSS
1040         property and value input files where only was checked whether is has
1041         been defined. This also goes against other #ifdefs in those files.
1042
1043         * css/CSSPropertyNames.in:
1044         * css/CSSValueKeywords.in:
1045
1046 2012-06-07  Ami Fischman  <fischman@chromium.org>
1047
1048         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
1049         https://bugs.webkit.org/show_bug.cgi?id=88349
1050
1051         Reviewed by Adam Barth.
1052
1053         Test: http/tests/security/video-cross-origin-readback.html
1054
1055         * html/HTMLMediaElement.cpp:
1056         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
1057         (WebCore):
1058         * html/HTMLMediaElement.h:
1059         (HTMLMediaElement):
1060         * html/canvas/CanvasRenderingContext.cpp:
1061         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1062         * platform/graphics/MediaPlayer.cpp:
1063         (WebCore::MediaPlayer::didPassCORSAccessCheck):
1064         (WebCore):
1065         * platform/graphics/MediaPlayer.h:
1066         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
1067         (MediaPlayer):
1068         * platform/graphics/MediaPlayerPrivate.h:
1069         (WebCore::MediaPlayerPrivateInterface::didPassCORSAccessCheck):
1070         (MediaPlayerPrivateInterface):
1071
1072 2012-06-07  Mark Hahnenberg  <mhahnenberg@apple.com>
1073
1074         Worker tear-down can re-enter JSC during GC finalization
1075         https://bugs.webkit.org/show_bug.cgi?id=88449
1076
1077         Reviewed by Geoffrey Garen.
1078
1079         No new tests. 
1080
1081         This is the first of two patches to fix this issue with Workers.
1082
1083         * workers/AbstractWorker.cpp:
1084         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
1085         will be called elsewhere in contextDestroyed().
1086
1087 2012-06-07  Jer Noble  <jer.noble@apple.com>
1088
1089         sometimes all slaved videos don't start playing
1090         https://bugs.webkit.org/show_bug.cgi?id=88553
1091
1092         Reviewed by Darin Adler.
1093
1094         Test: media/media-controller-time-clamp.html
1095
1096         Some PlatformClock classes will occasionally return times < 0 and will
1097         always return times slightly > duration() when playback has ended.  Clamp
1098         the value of currentTime() to the specified [0..duration] range.
1099
1100         * html/MediaController.cpp:
1101         (MediaController::currentTime):
1102
1103 2012-06-07  Simon Fraser  <simon.fraser@apple.com>
1104
1105         Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
1106         https://bugs.webkit.org/show_bug.cgi?id=88475
1107
1108         Reviewed by Sam Weinig.
1109         
1110         FrameView's scrollXForFixedPosition() and scrollYForFixedPosition()
1111         methods were often called together, but they do duplicate work,
1112         including calling into platform widget code which might be slow.
1113         
1114         Fix by converting scrollOffsetForFixedPosition() from being a wrapper
1115         that just calls scrollXForFixedPosition() and scrollYForFixedPosition()
1116         to the method that does all the work, calling just once into platform
1117         widget code.
1118         
1119         Changed callers to use scrollOffsetForFixedPosition() rather than make
1120         two separate method calls.
1121         
1122         Added ScrollView::layoutSize() and visibleSize() methods for
1123         convenience.
1124         
1125         Removed FrameView::scrollXForFixedPosition and FrameView::scrollYForFixedPosition
1126         to avoid inefficient callers in future.
1127
1128         No new tests; refactoring only.
1129
1130         * page/FrameView.cpp:
1131         (WebCore::fixedPositionScrollOffset):
1132         (WebCore::FrameView::scrollOffsetForFixedPosition):
1133         * page/FrameView.h: Removed scrollXForFixedPosition and scrollYForFixedPosition.
1134         * platform/ScrollView.cpp:
1135         (WebCore::ScrollView::layoutSize):
1136         * platform/ScrollView.h:
1137         (WebCore::ScrollView::visibleSize):
1138         * rendering/RenderLayer.cpp:
1139         (WebCore::RenderLayer::backgroundClipRect):
1140         * rendering/RenderLayer.h:
1141         (WebCore::ClipRect::move):
1142         * rendering/RenderLayerCompositor.cpp:
1143         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1144         * rendering/RenderView.cpp:
1145         (WebCore::RenderView::computeRectForRepaint):
1146
1147 2012-06-07  Raymes Khoury  <raymes@chromium.org>
1148
1149         Incorrect rect-based hit-test result for culled-inline elements
1150         https://bugs.webkit.org/show_bug.cgi?id=85849
1151
1152         Reviewed by Levi Weintraub.
1153
1154         Modified code which blindly adds culled inlines to rect-based hit-test
1155         results so that it only does so if the child node does not fully cover
1156         the hit-test region.
1157
1158         Test: fast/dom/nodesFromRect-culled-inline.html
1159
1160         * rendering/HitTestResult.cpp:
1161         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1162
1163 2012-06-07  Daniel Erat  <derat@chromium.org>
1164
1165         Make Skia backend honor requests for subpixel-positioned text.
1166         https://bugs.webkit.org/show_bug.cgi?id=88263
1167
1168         Reviewed by Tony Chang.
1169
1170         Add subpixel positioning field to FontRenderStyle and rename
1171         subpixel rendering field.
1172
1173         Pass setting to SkPaint in FontPlatformDataHarfBuzz and remove
1174         round() call when computing glyph widths in SimpleFontDataSkia.
1175
1176         Test: platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html
1177
1178         * platform/graphics/blackberry/skia/PlatformSupport.cpp:
1179         (WebCore::setFontRenderStyleDefaults):
1180         (WebCore::PlatformSupport::getRenderStyleForStrike):
1181         * platform/graphics/chromium/FontRenderStyle.h:
1182         (WebCore::FontRenderStyle::FontRenderStyle):
1183         (WebCore::FontRenderStyle::operator==):
1184         (FontRenderStyle):
1185         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1186         (WebCore):
1187         (WebCore::FontPlatformData::setSubpixelRendering):
1188         (WebCore::FontPlatformData::setSubpixelPositioning):
1189         (WebCore::FontPlatformData::setupPaint):
1190         (WebCore::FontPlatformData::querySystemForRenderStyle):
1191         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1192         (FontPlatformData):
1193         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1194         (WebCore::SimpleFontData::platformWidthForGlyph):
1195
1196 2012-06-06  Dana Jansens  <danakj@chromium.org>
1197
1198         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
1199         https://bugs.webkit.org/show_bug.cgi?id=88469
1200
1201         Reviewed by James Robinson.
1202
1203         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
1204
1205         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1206         (WebCore::shouldDrawLayer):
1207         (WebCore):
1208         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1209         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1210
1211 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
1212
1213         Web Inspector: sorting of object fields is broken in heap profiler
1214         https://bugs.webkit.org/show_bug.cgi?id=88532
1215
1216         A recent change to heap profiler has replaced getters with functions.
1217         Function calls were missing in couple places after that change.
1218
1219         Reviewed by Vsevolod Vlasov.
1220
1221         Tests: inspector/profiler/heap-snapshot-summary-sorting-fields.html
1222                inspector/profiler/heap-snapshot-summary-sorting-instances.html
1223
1224         * inspector/front-end/HeapSnapshot.js:
1225         (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField):
1226
1227 2012-06-07  Alexander Pavlov  <apavlov@chromium.org>
1228
1229         Web Inspector: Consider Ctrl+Shift+key as valid zoom change combinations
1230         https://bugs.webkit.org/show_bug.cgi?id=88520
1231
1232         Reviewed by Vsevolod Vlasov.
1233
1234         * inspector/front-end/inspector.js:
1235         (WebInspector.documentKeyDown):
1236
1237 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
1238
1239         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
1240         https://bugs.webkit.org/show_bug.cgi?id=88233
1241
1242         Reviewed by Rob Buis.
1243
1244         RIM PR #159998
1245
1246         Add a parameter to LayerRenderer::compositeBuffer() indicating whether
1247         the buffer contents are opaque, and set the GL blend mode accordingly.
1248
1249         This is not currently testable using BlackBerry testing infrastructure.
1250
1251         Reviewed internally by Jakob Petsovits.
1252
1253         * platform/graphics/blackberry/LayerRenderer.cpp:
1254         (WebCore::LayerRenderer::compositeBuffer):
1255         * platform/graphics/blackberry/LayerRenderer.h:
1256         (LayerRenderer):
1257
1258 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
1259
1260         Web Inspector: reuse edge_count field of heap snapshot to store retained size
1261         https://bugs.webkit.org/show_bug.cgi?id=88416
1262
1263         The edge_count field is unused after node first edge indexes have been built.
1264         Store node retained size in there instead of allocating an extra array for it.
1265
1266         Reviewed by Vsevolod Vlasov.
1267
1268         * inspector/front-end/HeapSnapshot.js:
1269         (WebInspector.HeapSnapshotNode.prototype.retainedSize):
1270         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
1271
1272 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1273
1274         Unreviewed, rolling out r119694.
1275         http://trac.webkit.org/changeset/119694
1276         https://bugs.webkit.org/show_bug.cgi?id=88529
1277
1278         it broke PrerenderBrowserTest.PrerenderHTML5VideoNetwork
1279         (Requested by loislo on #webkit).
1280
1281         * html/HTMLMediaElement.cpp:
1282         * html/HTMLMediaElement.h:
1283         (HTMLMediaElement):
1284         * html/canvas/CanvasRenderingContext.cpp:
1285         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1286         * platform/graphics/MediaPlayer.cpp:
1287         * platform/graphics/MediaPlayer.h:
1288         (MediaPlayer):
1289         * platform/graphics/MediaPlayerPrivate.h:
1290
1291 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
1292
1293         Delete a contenteditable element having a Shadow DOM causes a crash.
1294         https://bugs.webkit.org/show_bug.cgi?id=86345
1295
1296         Reviewed by Ryosuke Niwa.
1297
1298         In VisibleSelection::validate(), m_start.downstream() or m_end.upstream() might cross
1299         editing boundaries. So we adjust selection after calling them again.
1300
1301         Test: editing/shadow/select-contenteditable-shadowhost.html
1302
1303         * editing/VisibleSelection.cpp:
1304         (WebCore::VisibleSelection::validate):
1305
1306 2012-06-07  Vivek Galatage  <vivekgalatage@gmail.com>
1307
1308         No new line at the end for SVGCSSPropertyNames.in causes compilation warning
1309         https://bugs.webkit.org/show_bug.cgi?id=88503
1310
1311         Reviewed by Ryosuke Niwa.
1312
1313         Added new line at the end of the file.
1314
1315         No new tests required.
1316
1317         * css/SVGCSSPropertyNames.in:
1318
1319 2012-06-07  Csaba Osztrogonác  <ossy@webkit.org>
1320
1321         [Qt][Win] Use OS(WINDOWS) instead of Q_WS_WIN in WebCore/platform/graphics/GraphicsContext.h
1322         https://bugs.webkit.org/show_bug.cgi?id=88305
1323
1324         Reviewed by Simon Hausmann.
1325
1326         * platform/graphics/GraphicsContext.h: Buildfix.
1327         (GraphicsContext):
1328
1329 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
1330
1331         Incorrect data retrieved in calls to get selection data in client->textWillBeReplaced from CharacterData::setDataAndUpdate
1332         https://bugs.webkit.org/show_bug.cgi?id=66120
1333
1334         Reviewed by Ryosuke Niwa.
1335
1336         Since FrameSelection::textWillBeReplaced was called before replacing text, updated Selection became
1337         temporarily invalid. The invalid selection was set to updateSelection(), so client will have
1338         invalid selection.
1339
1340         This patch makes calling updateSelection() after updating selection.
1341
1342         No new tests, it's too hard to create a correct test cases in DRT.
1343
1344         * dom/CharacterData.cpp:
1345         (WebCore::CharacterData::setDataAndUpdate):
1346         * editing/FrameSelection.cpp:
1347         (WebCore::updatePositionAfterAdoptingTextReplacement):
1348         (WebCore::FrameSelection::textWasReplaced):
1349         * editing/FrameSelection.h:
1350         (FrameSelection):
1351
1352 2012-06-07  Li Yin  <li.yin@intel.com>
1353
1354         FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError.
1355         https://bugs.webkit.org/show_bug.cgi?id=88411
1356
1357         Reviewed by Kentaro Hara.
1358
1359         From spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob
1360         If type consists of any non-ASCII characters, throw a SyntaxError and
1361         return from this algorithm.
1362         This patch checks the String is ASCii or not, if not, throw SyntaxError.
1363
1364         Test: fast/files/blob-constructor.html
1365
1366         * bindings/js/JSBlobCustom.cpp:
1367         (WebCore::JSBlobConstructor::constructJSBlob):
1368         * bindings/v8/custom/V8BlobCustom.cpp:
1369         (WebCore::V8Blob::constructorCallback):
1370
1371 2012-06-07  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1372
1373         InsertUnorderedList and InsertOrderedList (execCommand) do not remove bullets
1374         https://bugs.webkit.org/show_bug.cgi?id=84597
1375
1376         Reviewed by Ryosuke Niwa.
1377
1378         Comparison between start and end VisiblePositions will fail when a position inside
1379         a paragraph is compared with one at the start of the paragraph.
1380         
1381         This fix thus converts the end VisiblePosition (which could be inside the paragraph)
1382         to the start of the paragraph thereby enabling a proper comparison of start and end
1383         positions.
1384
1385         Test: editing/execCommand/remove-list-from-multi-list-items.html
1386
1387         * editing/InsertListCommand.cpp:
1388         (WebCore::InsertListCommand::selectionHasListOfType):
1389
1390 2012-06-07  Li Yin  <li.yin@intel.com>
1391
1392         [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
1393         https://bugs.webkit.org/show_bug.cgi?id=88212
1394
1395         Reviewed by Jian Li.
1396
1397         From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
1398         FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR
1399         when the readyState is LOADING.
1400         Also delete OperationNotAllowedException related code, because it is not longer needed.
1401
1402         Tests: fast/files/read-file-async.html
1403                fast/files/workers/worker-read-file-async.html
1404
1405         * CMakeLists.txt:
1406         * DerivedSources.cpp:
1407         * DerivedSources.make:
1408         * DerivedSources.pri:
1409         * GNUmakefile.list.am:
1410         * Target.pri:
1411         * WebCore.gypi:
1412         * WebCore.vcproj/WebCore.vcproj:
1413         * WebCore.xcodeproj/project.pbxproj:
1414         * dom/DOMExceptions.in:
1415         * fileapi/FileReader.cpp:
1416         (WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR.
1417         * fileapi/FileReader.idl: Changed it to raise DOMException for all read methods.
1418         * fileapi/OperationNotAllowedException.cpp: Removed.
1419         * fileapi/OperationNotAllowedException.h: Removed.
1420         * fileapi/OperationNotAllowedException.idl: Removed.
1421
1422 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1423
1424         Unreviewed, rolling out r119689.
1425         http://trac.webkit.org/changeset/119689
1426         https://bugs.webkit.org/show_bug.cgi?id=88516
1427
1428         it broke didDrawNotCalledOnScissoredLayer webkit_unit_test
1429         (Requested by loislo on #webkit).
1430
1431         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1432         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1433         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1434
1435 2012-06-07  Ami Fischman  <fischman@chromium.org>
1436
1437         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
1438         https://bugs.webkit.org/show_bug.cgi?id=88349
1439
1440         Reviewed by Adam Barth.
1441
1442         Test: http/tests/security/video-cross-origin-readback.html
1443
1444         * html/HTMLMediaElement.cpp:
1445         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
1446         (WebCore):
1447         * html/HTMLMediaElement.h:
1448         (HTMLMediaElement):
1449         * platform/graphics/MediaPlayer.h:
1450         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
1451
1452 2012-06-07  Hironori Bono  <hbono@chromium.org>
1453
1454         Use light gray for grammar markers on Windows and Linux
1455         https://bugs.webkit.org/show_bug.cgi?id=88398
1456
1457         Reviewed by Ryosuke Niwa.
1458
1459         This change changes the color of grammar markers from dark gray to light gray
1460         and rebaselines a couple of pixel tests affected by this change.
1461
1462         No new tests because it changes the marker color of an existing test 'grammar-markers.html'.
1463
1464         * platform/graphics/skia/GraphicsContextSkia.cpp: Change dark gray to light gray.
1465
1466 2012-06-07  Yoshifumi Inoue  <yosin@chromium.org>
1467
1468         [Platform] Introduce conversion from/to Deciaml to/from double
1469         https://bugs.webkit.org/show_bug.cgi?id=88480
1470
1471         Reviewed by Kent Tamura.
1472
1473         This patch added functions for Decimal/Double conversion and isInfinity
1474         for reducing patch size of introducing Decimal arithmetic, bug 88383.
1475
1476         Tests: WebKit/chromium/tests/DecimalTest.cpp
1477
1478         * platform/Decimal.cpp:
1479         (WebCore::Decimal::fromDouble): Added.
1480         (WebCore::Decimal::toDouble): Added.
1481         * platform/Decimal.h:
1482         (WebCore::Decimal::EncodedData::isInfinity): Added for isinf()
1483         (WebCore::Decimal::isInfinity): Added.
1484
1485 2012-06-06  Xianzhu Wang  <wangxianzhu@chromium.org>
1486
1487         Element.getBoundingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page
1488         https://bugs.webkit.org/show_bug.cgi?id=88430
1489
1490         Element.getBoudingClientRect() and Element.getClientRects() should not scale back the rects
1491         if the element is in a frame because page scale only apply to elements in the main frame.
1492
1493         Reviewed by James Robinson.
1494
1495         Tests: fast/dom/Element/scale-page-bounding-client-rect-in-frame.html
1496                fast/dom/Element/scale-page-client-rects-in-frame.html
1497
1498         * dom/Document.cpp:
1499         (WebCore):
1500         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and Range.cpp and fixed issue of pageScale in frames.
1501         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and fixed issue of pageScale in frames.
1502         * dom/Document.h:
1503         (WebCore):
1504         (Document):
1505         * dom/Element.cpp:
1506         (WebCore::Element::getClientRects):
1507         (WebCore::Element::getBoundingClientRect):
1508         * dom/Range.cpp:
1509         (WebCore):
1510         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): Moved into Document and fixed issue of pageScale in frames.
1511         (WebCore::Range::getBorderAndTextQuads):
1512         * rendering/RenderObject.h: Removed adjustFloatQuadForPageScale and adjustFloatRectForPageScale because they seem unrelated to RenderObject.
1513         (WebCore):
1514
1515 2012-06-06  Dana Jansens  <danakj@chromium.org>
1516
1517         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
1518         https://bugs.webkit.org/show_bug.cgi?id=88469
1519
1520         Reviewed by James Robinson.
1521
1522         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
1523
1524         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1525         (WebCore::shouldDrawLayer):
1526         (WebCore):
1527         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1528         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
1529
1530 2012-06-06  Andy Estes  <aestes@apple.com>
1531
1532         Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
1533         https://bugs.webkit.org/show_bug.cgi?id=88504
1534
1535         Reviewed by Dan Bernstein.
1536
1537         uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
1538         by NSResponder that subclasses are expected to implement. WebKit should
1539         only support these implementations on platforms that use AppKit.
1540
1541         * WebCore.exp.in:
1542         * editing/Editor.cpp:
1543         * editing/Editor.h:
1544         * loader/EmptyClients.h:
1545         * page/ContextMenuController.cpp:
1546         * page/EditorClient.h:
1547
1548 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1549
1550         Unreviewed, rolling out r119683.
1551         http://trac.webkit.org/changeset/119683
1552         https://bugs.webkit.org/show_bug.cgi?id=88505
1553
1554         it broke webkit-unit-test
1555         WebLayerTreeViewThreadedTest.InstrumentationCallbacks on mac
1556         (Requested by loislo on #webkit).
1557
1558         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1559         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1560         (WebCore::CCLayerTreeHost::setVisible):
1561
1562 2012-06-06  Robert Kroeger  <rjkroege@chromium.org>
1563
1564         [Chromium] Re-enable handling of smooth scrolling on Chromium Linux/Windows
1565         https://bugs.webkit.org/show_bug.cgi?id=87535 by adding support for
1566         m_hasPreciseScrollingDelta on all Chromium platforms and adjusting ScrollAnimator
1567         and ScrollAnimatorNone accordingly to let m_hasPreciseScrollingDelta == true
1568         force exact (non-animated) scrolling.
1569
1570         Reviewed by James Robinson.
1571
1572         Updated WebKit unit tests to validate change.
1573
1574         * platform/PlatformWheelEvent.h:
1575         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Adjusted #ifdefs to
1576         make m_hasPreciseScrollingDelta available on all Chromium platforms.
1577         (PlatformWheelEvent):
1578         * platform/ScrollAnimator.cpp:
1579         (WebCore::ScrollAnimator::handleWheelEvent): Default scroll type is set based on 
1580         m_hasPreciseScrollingDelta value.
1581         * platform/ScrollAnimatorNone.cpp:
1582         (WebCore::ScrollAnimatorNone::scroll): Scroll precisely when necessary.
1583         * platform/ScrollTypes.h: Added additional pixel scrolling subtype.
1584         * platform/ScrollableArea.cpp:
1585         (WebCore::ScrollableArea::scroll): Updated for additional pixel scroll subtype.
1586
1587 2012-06-06  Michal Mocny  <mmocny@google.com>
1588
1589         [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
1590         https://bugs.webkit.org/show_bug.cgi?id=87747
1591
1592         Reviewed by Adrienne Walker.
1593
1594         GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes
1595         invisible, and an appropriate allocation after a renderer is initialized.  These numbers will change
1596         depending on the state of memory across devices and other renderers, so we would like to remove all explicit
1597         management by the renderers themselves.
1598
1599         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1600         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1601         (WebCore::CCLayerTreeHost::setVisible):
1602
1603 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1604
1605         Unreviewed, rolling out r119680.
1606         http://trac.webkit.org/changeset/119680
1607         https://bugs.webkit.org/show_bug.cgi?id=88498
1608
1609         It broke mac build (Requested by kinuko on #webkit).
1610
1611         * fileapi/File.cpp:
1612         (WebCore::File::File):
1613         (WebCore::File::lastModifiedDate):
1614         (WebCore::File::lastModifiedDateForBinding):
1615         (WebCore):
1616         (WebCore::File::captureSnapshot):
1617         * fileapi/File.h:
1618         (File):
1619         * fileapi/File.idl:
1620         * platform/FileMetadata.h:
1621         (WebCore::FileMetadata::FileMetadata):
1622         * platform/FileSystem.h:
1623         * platform/chromium/support/WebHTTPBody.cpp:
1624         (WebKit::WebHTTPBody::elementAt):
1625         * platform/network/BlobData.cpp:
1626         (WebCore):
1627
1628 2012-06-06  Kinuko Yasuda  <kinuko@chromium.org>
1629
1630         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
1631         https://bugs.webkit.org/show_bug.cgi?id=87826
1632
1633         Reviewed by Kent Tamura.
1634
1635         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
1636
1637         * fileapi/File.cpp:
1638         (WebCore::File::File):
1639         (WebCore::File::captureSnapshot):
1640         (WebCore::File::lastModifiedDate):
1641         (WebCore::File::lastModifiedDateForBinding): Removed.
1642         * fileapi/File.h:
1643         (File):
1644         * fileapi/File.idl:
1645         * platform/FileMetadata.h:
1646         (WebCore::FileMetadata::FileMetadata):
1647         * platform/FileSystem.h:
1648         * platform/chromium/support/WebHTTPBody.cpp:
1649         (WebKit::WebHTTPBody::elementAt):
1650         * platform/network/BlobData.cpp:
1651         (WebCore):
1652
1653 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1654
1655         Unreviewed, rolling out r119668.
1656         http://trac.webkit.org/changeset/119668
1657         https://bugs.webkit.org/show_bug.cgi?id=88493
1658
1659         Hitting assertions in debug builds (Requested by rniwa on
1660         #webkit).
1661
1662         * rendering/RenderBlock.cpp:
1663         (WebCore::RenderBlock::localCaretRect):
1664         * rendering/RenderBoxModelObject.cpp:
1665         * rendering/RenderBoxModelObject.h:
1666         (RenderBoxModelObject):
1667         * rendering/RenderInline.cpp:
1668         * rendering/RenderInline.h:
1669         (RenderInline):
1670
1671 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
1672
1673         Cache isSelfPaintingLayer() for better performance
1674         https://bugs.webkit.org/show_bug.cgi?id=88464
1675
1676         Reviewed by Simon Fraser.
1677
1678         Covered by existing tests (repaint tests among them).
1679
1680         isSelfPaintingLayer() has shown up several times on some scrolling benchmarks due
1681         to the function being called several time per paint phase. This change caches the
1682         boolean at style change time.
1683         
1684         On http://dglazkov.github.com/performance-tests/biggrid.html, this nearly speed-up
1685         painting by 2 (lowering the time taken to paint the newly exposed area when scrolling
1686         on a 10,000 * 100 table from 95ms to 50ms).
1687
1688         * rendering/RenderLayer.cpp:
1689         (WebCore::RenderLayer::RenderLayer):
1690         Initialized m_isSelfPaintingLayer here.
1691
1692         (WebCore::RenderLayer::paintLayer):
1693         Changed the order of the checks to get the more likely check first.
1694
1695         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1696         Renamed from isSelfPaintingLayer to make m_isNormalFlowOnly.
1697
1698         (WebCore::RenderLayer::styleChanged):
1699         Added code to update our cached m_isSelfPaintingLayer.
1700
1701         * rendering/RenderLayer.h:
1702         (WebCore::RenderLayer::isSelfPaintingLayer):
1703         Changed to return m_isSelfPaintingLayer.
1704
1705 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
1706
1707         REGRESSION(r109729) [Form] Rendering of select/optgroup/option combination is too slow.
1708         https://bugs.webkit.org/show_bug.cgi?id=88059
1709
1710         Reviewed by Kent Tamura.
1711
1712         This patch changes not to share RenderStyle object for option and
1713         optgroup element regardless attributes.
1714
1715         When we tried to shared RenderStyle object, rendering performance was
1716         good but we had issue in selected option and text transform, see
1717         https://bugs.webkit.org/show_bug.cgi?id=88405 for details.
1718
1719         No new tests. This patch doesn't change behavior but rendering performance.
1720
1721         * css/StyleResolver.cpp:
1722         (WebCore::StyleResolver::canShareStyleWithElement): Changed to always
1723         return false for option and optgroup.
1724
1725 2012-06-06  Alec Flett  <alecflett@chromium.org>
1726
1727         IndexedDB: Optimize single-key get()
1728         https://bugs.webkit.org/show_bug.cgi?id=85288
1729
1730         Reviewed by Tony Chang.
1731
1732         No new tests, this is just an optimization.
1733
1734         After a recent refactoring, we started creating
1735         an internal cursor with every call to get(). The
1736         most common use of get() is with a single key,
1737         so provide a fast-path to avoid creating the cursor.
1738
1739         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1740         (WebCore::IDBIndexBackendImpl::getByRangeInternal):
1741         * Modules/indexeddb/IDBKeyRange.h:
1742         (WebCore::IDBKeyRange::isOnlyKey):
1743         (IDBKeyRange):
1744         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1745         (WebCore::IDBObjectStoreBackendImpl::getByRangeInternal):
1746
1747 2012-06-06  Shezan Baig  <shezbaig.wk@gmail.com>
1748
1749         Caret is not rendered in empty inline contenteditable elements
1750         https://bugs.webkit.org/show_bug.cgi?id=85793
1751
1752         Reviewed by Ryosuke Niwa.
1753
1754         Override localCaretRect in RenderInline. The implementation was almost
1755         identical to localCaretRect in RenderBlock for empty block elements, so
1756         I refactored RenderBlock::localCaretRect and moved the logic to a new
1757         method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The
1758         implementation of 'localCaretRect' in RenderBlock and RenderInline both
1759         use this helper method in RenderBoxModelObject.
1760
1761         Tests: editing/selection/caret-in-empty-inline-1.html
1762                editing/selection/caret-in-empty-inline-2.html
1763
1764         * rendering/RenderBlock.cpp:
1765         (WebCore::RenderBlock::localCaretRect):
1766         Modified to use RenderBoxModelObject::localCaretRectForEmptyElement.
1767         * rendering/RenderBoxModelObject.cpp:
1768         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
1769         (WebCore):
1770         * rendering/RenderBoxModelObject.h:
1771         (RenderBoxModelObject):
1772         Add localCaretRectForEmptyElement helper method.
1773         * rendering/RenderInline.cpp:
1774         (WebCore::RenderInline::localCaretRect):
1775         (WebCore):
1776         * rendering/RenderInline.h:
1777         (RenderInline):
1778         Override localCaretRect using localCaretRectForEmptyElement.
1779
1780 2012-06-06  Alexis Menard  <alexis.menard@openbossa.org>
1781
1782         Fix border-image-slice failures on http://css3test.com.
1783         https://bugs.webkit.org/show_bug.cgi?id=88328
1784
1785         Reviewed by Tony Chang.
1786
1787         The old parsing code was assuming that the fill keyword comes after the
1788         numbers or the percentage values. http://www.w3.org/TR/css3-background/#the-border-image-slice
1789         defines the property like this : [<number> | <percentage>]{1,4} && fill? where the fill
1790         keyword is not mandatory. But according to http://www.w3.org/TR/CSS2/about.html "&&" 
1791         separates two or more components, all of which must occur, in any order. So the previous
1792         code was wrong the fill can come first following by the percentages or the numbers. http://css3test.com
1793         was covering this particular case. I took the opportunity to extend our coverage 
1794         by adding tests on many different values the boder-image-slice property could take. I
1795         also did a small cleanup by removing unused functions in BorderImageSliceParseContext.
1796
1797         Test: fast/css/getComputedStyle/getComputedStyle-border-image-slice.html
1798
1799         * css/CSSParser.cpp:
1800         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
1801         (WebCore::BorderImageSliceParseContext::commitNumber):
1802         (WebCore::BorderImageSliceParseContext::commitFill):
1803
1804 2012-06-06  Levi Weintraub  <leviw@chromium.org>
1805
1806         Use enclosingIntRect instead of pixelSnappedIntRect in RenderFileUploadControl
1807         https://bugs.webkit.org/show_bug.cgi?id=88454
1808
1809         Reviewed by Kent Tamura.
1810
1811         Properly clipping the file upload control to avoid clipping out the top of the file upload button
1812         when the control is positioned at a sub-pixel offset that rounds up.
1813
1814         Test: fast/sub-pixel/file-upload-control-at-fractional-offset.html
1815
1816         * rendering/RenderFileUploadControl.cpp:
1817         (WebCore::RenderFileUploadControl::paintObject):
1818
1819 2012-06-06  Filip Pizlo  <fpizlo@apple.com>
1820
1821         Global object variable accesses should not require an extra load
1822         https://bugs.webkit.org/show_bug.cgi?id=88385
1823
1824         Reviewed by Gavin Barraclough and Geoffrey Garen.
1825
1826         Updated JSDOMWindowBase.cpp to use the new symbol table API. this->symbolTableFoo(...)
1827         becomes symbolTableFoo(this, ...).
1828                 
1829         No new tests because no change in behavior.
1830
1831         * bindings/js/JSDOMWindowBase.cpp:
1832         (WebCore::JSDOMWindowBase::updateDocument):
1833
1834 2012-06-06  James Robinson  <jamesr@chromium.org>
1835
1836         [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
1837         https://bugs.webkit.org/show_bug.cgi?id=86257
1838
1839         Reviewed by Kenneth Russell.
1840
1841         The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium
1842         on top of the Platform interface WebGraphicsContext3D. This moves the implementation support code from
1843         WebKit/chromium/src to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore
1844         interfaces and allows code in WebCore/platform to use this support code directly where appropriate.
1845
1846         Refactor only, no new functionality or tests.
1847
1848         * WebCore.gypi:
1849         * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp.
1850         (WebCore):
1851         (WebCore::Extensions3DChromium::Extensions3DChromium):
1852         (WebCore::Extensions3DChromium::~Extensions3DChromium):
1853         (WebCore::Extensions3DChromium::supports):
1854         (WebCore::Extensions3DChromium::ensureEnabled):
1855         (WebCore::Extensions3DChromium::isEnabled):
1856         (WebCore::Extensions3DChromium::getGraphicsResetStatusARB):
1857         (WebCore::Extensions3DChromium::blitFramebuffer):
1858         (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
1859         (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
1860         (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM):
1861         (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM):
1862         (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM):
1863         (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM):
1864         (WebCore::Extensions3DChromium::setVisibilityCHROMIUM):
1865         (WebCore::Extensions3DChromium::discardFramebufferEXT):
1866         (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
1867         (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1868         (WebCore::Extensions3DChromium::createVertexArrayOES):
1869         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
1870         (WebCore::Extensions3DChromium::isVertexArrayOES):
1871         (WebCore::Extensions3DChromium::bindVertexArrayOES):
1872         (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE):
1873         (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM):
1874         (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM):
1875         (WebCore::Extensions3DChromium::paintFramebufferToCanvas):
1876         (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM):
1877         (WebCore::Extensions3DChromium::texStorage2DEXT):
1878         (WebCore::Extensions3DChromium::createQueryEXT):
1879         (WebCore::Extensions3DChromium::deleteQueryEXT):
1880         (WebCore::Extensions3DChromium::isQueryEXT):
1881         (WebCore::Extensions3DChromium::beginQueryEXT):
1882         (WebCore::Extensions3DChromium::endQueryEXT):
1883         (WebCore::Extensions3DChromium::getQueryivEXT):
1884         (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
1885         * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp.
1886         (WebCore):
1887         (WebCore::GraphicsContext3D::GraphicsContext3D):
1888         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1889         (WebCore::GraphicsContext3D::setContextLostCallback):
1890         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1891         (WebCore::GraphicsContext3D::create):
1892         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1893         (WebCore::GraphicsContext3D::platformTexture):
1894         (WebCore::GraphicsContext3D::grContext):
1895         (WebCore::GraphicsContext3D::platformLayer):
1896         (WebCore::GraphicsContext3D::isGLES2Compliant):
1897         (WebCore::GraphicsContext3D::isResourceSafe):
1898         (WebCore::GraphicsContext3D::bindAttribLocation):
1899         (WebCore::GraphicsContext3D::bufferData):
1900         (WebCore::GraphicsContext3D::getActiveAttrib):
1901         (WebCore::GraphicsContext3D::getActiveUniform):
1902         (WebCore::GraphicsContext3D::getAttribLocation):
1903         (WebCore::GraphicsContext3D::getContextAttributes):
1904         (WebCore::GraphicsContext3D::getProgramInfoLog):
1905         (WebCore::GraphicsContext3D::getShaderInfoLog):
1906         (WebCore::GraphicsContext3D::getShaderSource):
1907         (WebCore::GraphicsContext3D::getString):
1908         (WebCore::GraphicsContext3D::getUniformLocation):
1909         (WebCore::GraphicsContext3D::shaderSource):
1910         (WebCore::GraphicsContext3D::texImage2D):
1911         (WebCore::GraphicsContext3D::texSubImage2D):
1912         (WebCore::GraphicsContext3D::reshape):
1913         (WebCore::GraphicsContext3D::markContextChanged):
1914         (WebCore::GraphicsContext3D::layerComposited):
1915         (WebCore::GraphicsContext3D::markLayerComposited):
1916         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1917         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1918         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
1919         (WebCore::GraphicsContext3D::getExtensions):
1920         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
1921         * platform/chromium/support/GraphicsContext3DPrivate.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.cpp.
1922         (WebCore):
1923         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1924         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1925         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
1926         (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D):
1927         (GrMemoryAllocationChangedCallback):
1928         (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback):
1929         (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
1930         (WebCore::GraphicsContext3DPrivate::grContext):
1931         (WebCore::GraphicsContext3DPrivate::markContextChanged):
1932         (WebCore::GraphicsContext3DPrivate::layerComposited):
1933         (WebCore::GraphicsContext3DPrivate::markLayerComposited):
1934         (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas):
1935         (GraphicsContext3DContextLostCallbackAdapter):
1936         (WebCore::GraphicsContext3DContextLostCallbackAdapter::GraphicsContext3DContextLostCallbackAdapter):
1937         (WebCore::GraphicsContext3DContextLostCallbackAdapter::~GraphicsContext3DContextLostCallbackAdapter):
1938         (WebCore::GraphicsContext3DContextLostCallbackAdapter::onContextLost):
1939         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
1940         (GraphicsContext3DErrorMessageCallbackAdapter):
1941         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::GraphicsContext3DErrorMessageCallbackAdapter):
1942         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::~GraphicsContext3DErrorMessageCallbackAdapter):
1943         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::onErrorMessage):
1944         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
1945         (WebCore::GraphicsContext3DPrivate::getExtensions):
1946         (WebCore::GraphicsContext3DPrivate::initializeExtensions):
1947         (WebCore::GraphicsContext3DPrivate::supportsExtension):
1948         (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled):
1949         (WebCore::GraphicsContext3DPrivate::isExtensionEnabled):
1950         (WebCore::GraphicsContext3DPrivate::isResourceSafe):
1951         (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1952         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1953         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1954         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
1955         (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1956         (GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1957         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1958         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1959         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete):
1960         (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM):
1961         * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h.
1962         (WebKit):
1963         (WebCore):
1964         (GraphicsContext3DPrivate):
1965         (WebCore::GraphicsContext3DPrivate::webContext):
1966         (WebCore::GraphicsContext3DPrivate::preserveDrawingBuffer):
1967
1968 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1969
1970         Unreviewed, rolling out r119624.
1971         http://trac.webkit.org/changeset/119624
1972         https://bugs.webkit.org/show_bug.cgi?id=88472
1973
1974         Caused worker tests to become flaky (Requested by mhahnenberg
1975         on #webkit).
1976
1977         * workers/AbstractWorker.cpp:
1978         (WebCore::AbstractWorker::~AbstractWorker):
1979         * workers/WorkerMessagingProxy.cpp:
1980         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
1981
1982 2012-06-06  Brady Eidson  <beidson@apple.com>
1983
1984         <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428
1985         REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues
1986
1987         Reviewed by Nate Chapin.
1988
1989         Test: fast/loader/webarchive-encoding-respected.html
1990
1991         * loader/DocumentLoader.cpp:
1992         (WebCore::DocumentLoader::commitData): Properly set the main resource encoding from the webarchive.
1993
1994 2012-06-06  Mark Hahnenberg  <mhahnenberg@apple.com>
1995
1996         Worker tear-down can re-enter JSC during GC finalization
1997         https://bugs.webkit.org/show_bug.cgi?id=88449
1998
1999         Reviewed by Geoffrey Garen.
2000
2001         No new tests. Current regression tests cover these changes.
2002
2003         * workers/AbstractWorker.cpp: 
2004         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
2005         will be called elsewhere in contextDestroyed().
2006         * workers/WorkerMessagingProxy.cpp:
2007         (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We make the call to terminateWorkerContext()
2008         and workerContextDestroyed() asynchronous to avoid entering JSC during GC finalization.
2009
2010 2012-06-06  Tony Chang  <tony@chromium.org>
2011
2012         webkit crashes on debug builds when running IETC flexbox-ordinal-group-001.htm
2013         https://bugs.webkit.org/show_bug.cgi?id=85832
2014
2015         Reviewed by Ojan Vafai.
2016
2017         We were using a HashSet<unsigned>, which can't hold the value of 0.
2018         According to the spec, 0 isn't a valid value, so at CSS parse time,
2019         reject the value 0. This lets us pass the test, although that's kind
2020         of by accident.
2021
2022         We could allow 0 for box-ordinal-group, but there are some perf implications
2023         to having allowing a value below the initial value (1 in this case).
2024
2025         We still allow 0 for box-flex-group, because that's what the existing code
2026         does and there are tests expecting this behavior.
2027
2028         No new tests, covered by ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm
2029         which was crashing.
2030
2031         * css/CSSParser.cpp:
2032         (WebCore::CSSParser::parseValue): Reject 0 for -webkit-box-ordinal-group.
2033
2034 2012-06-06  Ojan Vafai  <ojan@chromium.org>
2035
2036         Remove some magic from the -webkit-flex shorthand parsing to match the changes in the spec
2037         https://bugs.webkit.org/show_bug.cgi?id=88444
2038
2039         Reviewed by Tony Chang.
2040
2041         -Unset positive flex defaults to 0.
2042         -Unset negative flex defaults to 1. No magic of doing something different if positive flex was set.
2043
2044         * css/CSSParser.cpp:
2045         (WebCore::CSSParser::parseFlex):
2046
2047 2012-06-06  Ryosuke Niwa  <rniwa@webkit.org>
2048
2049         Revert r119440 now that I have a time to rebaseline them all!
2050
2051         * platform/ScrollbarThemeComposite.cpp:
2052         (WebCore::ScrollbarThemeComposite::thumbLength):
2053
2054 2012-06-06  Joshua Bell  <jsbell@chromium.org>
2055
2056         IndexedDB: Infinite recursion in IDBObjectStore.openCursor(key, legacy_constant)
2057         https://bugs.webkit.org/show_bug.cgi?id=88431
2058
2059         Reviewed by Tony Chang.
2060
2061         Function was calling itself, rather than delegating to the correct (IDBKeyRange) overload.
2062
2063         Test: storage/indexeddb/legacy-constants.html
2064
2065         * Modules/indexeddb/IDBObjectStore.cpp:
2066         (WebCore::IDBObjectStore::openCursor):
2067
2068 2012-06-06  Joshua Bell  <jsbell@chromium.org>
2069
2070         IndexedDB: Rename IDBFactory.getDatabaseNames() to webkitGetDatabaseNames()
2071         https://bugs.webkit.org/show_bug.cgi?id=86874
2072
2073         Reviewed by Ojan Vafai.
2074
2075         The function is non-standard, and should be prefixed.
2076
2077         Test: storage/indexeddb/factory-basics.html
2078
2079         * Modules/indexeddb/IDBFactory.idl:
2080
2081 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
2082
2083         Add support for direction on table row group with collapsing borders
2084         https://bugs.webkit.org/show_bug.cgi?id=87900
2085
2086         Reviewed by Ojan Vafai.
2087
2088         Tests: fast/table/border-collapsing/first-cell-left-border-hidden-table-ltr-section-rtl.html
2089                fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html
2090                fast/table/border-collapsing/left-border-table-ltr-section-rtl.html
2091                fast/table/border-collapsing/left-border-table-rtl-section-ltr.html
2092                fast/table/border-collapsing/left-border-table-rtl-section-rtl.html
2093                fast/table/border-collapsing/left-border-vertical-lr-table-ltr-section-rtl.html
2094                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-ltr.html
2095                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-rtl.html
2096                fast/table/border-collapsing/rtl-table-left-border-hidden.html
2097                fast/table/border-collapsing/top-border-vertical-rl-table-ltr-section-rtl.html
2098                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-ltr.html
2099                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-rtl.html
2100                fast/table/table-ltr-section-rtl.html
2101                fast/table/table-rtl-section-ltr.html
2102                fast/table/table-rtl-section-rtl.html
2103
2104         This change enables proper support for direction on table row group.
2105         The current code would allow people to set direction on the row group but would still
2106         use the table's code for directionality checks (with surprising consequences).
2107
2108         The main change involve swapping end / start borders in case of mixed directionality
2109         as those 2 are not in sync.
2110         
2111         Example: <table dir="ltr"><tbody dir="rtl"><td id="cell0"></td><td id="cell1"></td></tbody></table>
2112
2113         Visually:
2114         Table: Start ---------------------> End
2115         Tbody: End <---------------------- Start
2116         Cell:  | #cell0        |           #cell1 |
2117
2118         In this example, the end table border should be compared with the tbody's start border
2119         and the last cell's (in DOM order) start border.
2120
2121         * rendering/RenderTable.cpp:
2122         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
2123         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
2124         Same as the other adjoining functions.
2125
2126         * rendering/RenderTable.h:
2127         (WebCore::RenderTable::lastColumnIndex):
2128         Helper function to get the last column index.
2129
2130         * rendering/RenderTableCell.cpp:
2131         (WebCore::RenderTableCell::computeCollapsedStartBorder):
2132         (WebCore::RenderTableCell::computeCollapsedEndBorder):
2133         Updated to call the table's adjoining border helpers.
2134
2135         * rendering/RenderTableCell.h:
2136         (WebCore::RenderTableCell::styleForCellFlow):
2137         Updated to use the table row group's style now that we properly support it.
2138
2139         (WebCore::RenderTableCell::isFirstOrLastCellInRow):
2140         Debug only helper to make sure we don't call the border adjoining function
2141         on non-terminal cells.
2142
2143         (WebCore::RenderTableCell::borderAdjoiningTableStart):
2144         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
2145         * rendering/RenderTableRow.h:
2146         (WebCore::RenderTableRow::borderAdjoiningTableStart):
2147         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
2148         * rendering/RenderTableSection.cpp:
2149         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
2150         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
2151         Updated the previous function to account for mixed directionality.
2152
2153         (WebCore::RenderTableSection::layoutRows):
2154         Move some of the code to setLogicalPositionForCell to match RenderBlock.
2155
2156         (WebCore::RenderTableSection::setLogicalPositionForCell):
2157         Switched direction checks to styleForCellFlow (this doesn't change anything as we
2158         were already properly flipping already but ensure better).
2159
2160         * rendering/RenderTableSection.h:
2161         (WebCore::RenderTableSection::hasSameDirectionAsTable):
2162         Added this helper to know if we have a mixed direction.
2163
2164         (WebCore::RenderTableSection::borderAdjoiningTableStart):
2165         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
2166         Updated to account for mixed directionality.
2167
2168 2012-06-06  Keyar Hood  <keyar@chromium.org>
2169
2170         [Chromium] imageSmoothingEnabled should apply to patterns
2171         https://bugs.webkit.org/show_bug.cgi?id=88103
2172
2173         Reviewed by Stephen White.
2174
2175         Test: fast/canvas/canvas-imageSmoothingEnabled-patterns.html
2176
2177         When drawing patterns on a Canvas, the imageSmoothingEnabled flag is
2178         respected.
2179         * platform/graphics/skia/PlatformContextSkia.cpp:
2180         (WebCore::PlatformContextSkia::setupShader):
2181
2182 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
2183
2184         Web Inspector: [JSC] Add WebGL instrumentation support
2185         https://bugs.webkit.org/show_bug.cgi?id=87975
2186
2187         Reviewed by Vsevolod Vlasov.
2188
2189         * bindings/js/JSInjectedScriptManager.cpp:
2190         (WebCore::injectAndExecuteFunction):
2191         (WebCore::InjectedScriptManager::createInjectedScript):
2192         (WebCore):
2193         (WebCore::InjectedScriptManager::injectWebGLScript):
2194         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2195         (WebCore::InjectedScriptManager::injectWebGLScript):
2196         * inspector/InjectedScriptManager.cpp:
2197         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
2198         * inspector/InjectedScriptManager.h:
2199         (InjectedScriptManager):
2200         * inspector/InspectorInstrumentation.h:
2201         (InspectorInstrumentation):
2202         * inspector/InspectorWebGLAgent.cpp:
2203         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
2204         * inspector/InspectorWebGLAgent.h:
2205         (InspectorWebGLAgent):
2206         * inspector/InspectorWebGLInstrumentation.h:
2207         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2208
2209 2012-06-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2210
2211         Fix a few spelling mistakes in IconDatabase logging
2212
2213         Makes debugging harder if the logging is confusing.
2214
2215         Reviewed by Jocelyn Turcotte.
2216
2217         * loader/icon/IconDatabase.cpp:
2218         (WebCore::IconDatabase::notifyPendingLoadDecisions):
2219         (WebCore::IconDatabase::readFromDatabase):
2220
2221 2012-05-25  Vsevolod Vlasov  <vsevik@chromium.org>
2222
2223         Web Inspector: [Compiler] Remove compile-front-end.sh and fix InjectedScriptSource errors.
2224         https://bugs.webkit.org/show_bug.cgi?id=87512
2225
2226         Reviewed by Yury Semikhatsky.
2227
2228         Removed compile-front-end.sh, compile-front-end.py should be used instead now.
2229         Made generate_protocol_externs a python module to call it from compile-front-end.py.
2230         Temporary copy of InjectedScriptSource.js is created and modified to
2231         avoid "This code lacks side effects" warning.
2232
2233         * inspector/compile-front-end.py:
2234         * inspector/compile-front-end.sh: Removed.
2235         * inspector/generate-protocol-externs: Removed.
2236         * inspector/generate_protocol_externs.py: Added.
2237         (full_qualified_type_id):
2238         (param_type):
2239         (generate_protocol_externs):
2240
2241 2012-06-06  Zoltan Herczeg  <zherczeg@webkit.org>
2242
2243         [Qt] REGRESSION(r118616): It made all tests crash in debug mode
2244         https://bugs.webkit.org/show_bug.cgi?id=87701
2245
2246         Reviewed by Csaba Osztrogonác.
2247
2248         Replace WriteBarrier<JSObject> to Weak<JSObject> by introducing a new
2249         QtWeakObjectReference sub class. Rewrite all affected type definitions.
2250
2251         All existing test in debug mode cover this issue.
2252
2253         * bridge/qt/qt_class.cpp:
2254         (JSC::Bindings::QtClass::fallbackObject):
2255         * bridge/qt/qt_instance.cpp:
2256         (QtRuntimeObject):
2257         (JSC::Bindings::QtInstance::removeUnusedMethods):
2258         * bridge/qt/qt_instance.h:
2259         (QtInstance):
2260         (QtWeakObjectReference):
2261         (JSC::Bindings::QtInstance::QtWeakObjectReference::QtWeakObjectReference):
2262         (JSC::Bindings::QtInstance::QtWeakObjectReference::operator=):
2263         (JSC::Bindings::QtInstance::QtWeakObjectReference::get):
2264         * bridge/qt/qt_runtime.cpp:
2265         (JSC::Bindings::QtRuntimeMethodData::finalize):
2266         * bridge/qt/qt_runtime_qt4.cpp:
2267         (JSC::Bindings::QtRuntimeMethodData::finalize):
2268
2269 2012-06-06  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2270
2271         Web Inspector: help/settings screen does not overlay console in split screen mode
2272         https://bugs.webkit.org/show_bug.cgi?id=88352
2273
2274         Reviewed by Pavel Feldman.
2275
2276         * inspector/front-end/HelpScreen.js:
2277         (WebInspector.HelpScreen): Mark view as root.
2278         (WebInspector.HelpScreen.prototype.showModal): Change view parent.
2279         * inspector/front-end/helpScreen.css:
2280         (.help-window-outer): Add panel and status bar indent.
2281         (body.compact .help-window-outer): Ditto.
2282
2283 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
2284
2285         [Form] Changes for InputNumber type
2286         https://bugs.webkit.org/show_bug.cgi?id=88394
2287
2288         Reviewed by Kent Tamura.
2289
2290         This patch changes codes for consitency of InputNumber usage for
2291         reducing size of patch when we change InputNumber type alias from
2292         double to Decimal.
2293
2294         No new tests. This patch doesn't change behavior.
2295
2296         * html/BaseDateAndTimeInputType.cpp:
2297         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Fixed parameter type for getAllowedValueStep.
2298         * html/InputType.cpp:
2299         (WebCore::InputType::minimum): Fixed return value type to InputNumber.
2300         (WebCore::InputType::maximum): ditto.
2301         * html/MonthInputType.cpp:
2302         (WebCore::MonthInputType::defaultValueForStepUp): Fix return value type to InputNumber.
2303         (WebCore::MonthInputType::parseToNumber): ditto.
2304         * html/NumberInputType.cpp:
2305         (WebCore::NumberInputType::setValueAsDouble): Removed extra convertDoubleToInputNumber.
2306         * html/StepRange.cpp:
2307         (WebCore::StepRange::alignValueForStep): Use roundByStep for code sharing.
2308         (WebCore::StepRange::clampValue): ditto.
2309         (WebCore::StepRange::roundByStep): Added.
2310         * html/StepRange.h:
2311         (StepRange): Added a declaration of roundByStep.
2312
2313 2012-06-06  Michael Brüning  <michael.bruning@nokia.com>
2314
2315         [Qt] Fix harmattan builds broken by r119247.
2316         https://bugs.webkit.org/show_bug.cgi?id=88330
2317
2318         Reviewed by Jocelyn Turcotte.
2319
2320         Fix Harmattan build break caused by undefined constant
2321         GL_TEXTURE_RECTANGLE_ARB by adding defined(GL_ARB_texture_rectangle)
2322         guards around TextureMapperGL::drawTextureRectangleARB.
2323
2324         * platform/graphics/texmap/TextureMapperGL.cpp: Added defined(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
2325         (WebCore):
2326         * platform/graphics/texmap/TextureMapperGL.h: Added definded(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
2327
2328 2012-06-06  Shinya Kawanaka  <shinyak@chromium.org>
2329
2330         PositionIterator:;setOffsetInLeafNode() is not used anywhere.
2331         https://bugs.webkit.org/show_bug.cgi?id=88397
2332
2333         Reviewed by Ryosuke Niwa.
2334
2335         It's not used anywhere. We can remove it safely.
2336
2337         No new tests, no change in behavior.
2338
2339         * WebCore.order:
2340         * dom/PositionIterator.cpp:
2341         * dom/PositionIterator.h:
2342
2343 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
2344
2345         Web Inspector: [WebGL] Add WebGL instrumentation support on the backend
2346         https://bugs.webkit.org/show_bug.cgi?id=87960
2347
2348         Adds a WebGLAgent, injects a WebGL script upon calling the getContext
2349         method of a HTMLCanvasElement that will wrap the WebGL rendering context
2350         for instrumentation purposes.
2351
2352         Reviewed by Yury Semikhatsky.
2353
2354         * CMakeLists.txt:
2355         * DerivedSources.make:
2356         * DerivedSources.pri:
2357         * GNUmakefile.am:
2358         * GNUmakefile.list.am:
2359         * Target.pri:
2360         * WebCore.gyp/WebCore.gyp:
2361         * WebCore.gypi:
2362         * WebCore.vcproj/WebCore.vcproj:
2363         * WebCore.xcodeproj/project.pbxproj:
2364         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2365         (WebCore::JSHTMLCanvasElement::getContext):
2366         (WebCore::JSHTMLCanvasElement::toDataURL):
2367         * bindings/js/JSInjectedScriptManager.cpp:
2368         (WebCore):
2369         (WebCore::InjectedScriptManager::injectWebGLScript):
2370         * bindings/v8/ScriptState.cpp:
2371         (WebCore::ScriptState::forContext):
2372         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2373         (WebCore::V8HTMLCanvasElement::getContextCallback):
2374         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2375         (WebCore::InjectedScriptManager::createInjectedScript):
2376         (WebCore):
2377         (WebCore::InjectedScriptManager::injectWebGLScript):
2378         (WebCore::InjectedScriptManager::discardInjectedScript):
2379         (WebCore::InjectedScriptManager::injectedScriptFor):
2380         * inspector/CodeGeneratorInspector.py:
2381         * inspector/InjectedScriptManager.cpp:
2382         (WebCore):
2383         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
2384         (WebCore::InjectedScriptManager::injectedWebGLScriptSource):
2385         * inspector/InjectedScriptManager.h:
2386         (InjectedScriptManager):
2387         * inspector/InjectedWebGLScriptSource.js: Added.
2388         * inspector/Inspector.json:
2389         * inspector/InspectorAllInOne.cpp:
2390         * inspector/InspectorController.cpp:
2391         (WebCore::InspectorController::InspectorController):
2392         * inspector/InspectorInstrumentation.h:
2393         (WebCore):
2394         (InspectorInstrumentation):
2395         (WebCore::InspectorInstrumentation::markResourceAsCached):
2396         * inspector/InspectorWebGLAgent.cpp: Added.
2397         (WebCore):
2398         (WebGLAgentState):
2399         (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
2400         (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent):
2401         (WebCore::InspectorWebGLAgent::setFrontend):
2402         (WebCore::InspectorWebGLAgent::clearFrontend):
2403         (WebCore::InspectorWebGLAgent::restore):
2404         (WebCore::InspectorWebGLAgent::enable):
2405         (WebCore::InspectorWebGLAgent::disable):
2406         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
2407         * inspector/InspectorWebGLAgent.h: Added.
2408         (WebCore):
2409         (InspectorWebGLAgent):
2410         (WebCore::InspectorWebGLAgent::create):
2411         (WebCore::InspectorWebGLAgent::enabled):
2412         * inspector/InspectorWebGLInstrumentation.h: Added.
2413         (WebCore):
2414         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2415         * inspector/InstrumentingAgents.h:
2416         (WebCore):
2417         (WebCore::InstrumentingAgents::InstrumentingAgents):
2418         (InstrumentingAgents):
2419         (WebCore::InstrumentingAgents::inspectorWebGLAgent):
2420         (WebCore::InstrumentingAgents::setInspectorWebGLAgent):
2421
2422 2012-06-06  Joone Hur  <joone.hur@intel.com>
2423
2424         [GTK] Build fix for Accelerated Compositing with OpenGL
2425         https://bugs.webkit.org/show_bug.cgi?id=88292
2426
2427         Reviewed by Martin Robinson.
2428
2429         Build fix after r119247.
2430         Do not include GraphicsSurface.h when not building
2431         with GRAPHICS_SURFACE.
2432
2433         No new tests. This is only a build fix.
2434
2435         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
2436         * platform/graphics/texmap/TextureMapperBackingStore.h:
2437         * platform/graphics/texmap/TextureMapperGL.cpp:
2438
2439 2012-06-05  Joe Thomas  <joethomas@motorola.com>
2440
2441         ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox
2442         https://bugs.webkit.org/show_bug.cgi?id=88197
2443
2444         Reviewed by Daniel Bates.
2445
2446         RenderSVGRoot extends RenderReplaced and it overrides the computeIntrinsicRatioInformation() 
2447         method of RenderReplaced. RenderSVGRoot::computeIntrinsicRatioInformation
2448         sets isPercentageIntrinsicSize to true while it handles width and height of percentage types.
2449         So this assertion should be fired only if intrinsicRatio is non-zero.
2450
2451         Test: svg/in-html/svg-assert-failure-percentage.html
2452
2453         * rendering/RenderReplaced.cpp:
2454         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
2455
2456 2012-06-05  Tony Chang  <tony@chromium.org>
2457
2458         Changing flexbox justify/alignment doesn't update their positioning
2459         https://bugs.webkit.org/show_bug.cgi?id=88366
2460
2461         Reviewed by Ojan Vafai.
2462
2463         Test: css3/flexbox/style-change.html
2464
2465         * rendering/style/RenderStyle.cpp:
2466         (WebCore::RenderStyle::diff): Since these member variables were moved
2467         out of StyleFlexibleBoxData, we have to compare them in RenderStyle::diff.
2468
2469 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2470
2471         JSC implementation of SerializedScriptValue for IndexedDB
2472         https://bugs.webkit.org/show_bug.cgi?id=88048
2473
2474         Reviewed by George Staikos.
2475
2476         No new tests. All the current indexeddb test cases apply when indexeddb works for JSC.
2477
2478         * bindings/js/SerializedScriptValue.cpp:
2479         (WebCore::CloneSerializer::serializeNumber):
2480         (CloneSerializer):
2481         (WebCore::CloneDeserializer::toWireString):
2482         (CloneDeserializer):
2483         (WebCore::SerializedScriptValue::create):
2484         (WebCore::SerializedScriptValue::toWireString):
2485         (WebCore):
2486         (WebCore::SerializedScriptValue::createFromWire):
2487         (WebCore::SerializedScriptValue::numberValue):
2488         (WebCore::SerializedScriptValue::deserialize):
2489
2490 2012-06-05  Ojan Vafai  <ojan@chromium.org>
2491
2492         Nested CSS flexbox renders incorrectly
2493         https://bugs.webkit.org/show_bug.cgi?id=87679
2494
2495         Reviewed by Julien Chaffraix.
2496
2497         If the containing block with a perpendicular writing mode has an overrideHeight,
2498         then its logical height should be based off that instead of its RenderStyle.
2499
2500         Test: css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
2501
2502         * rendering/RenderBox.cpp:
2503         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2504
2505 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2506
2507         Need special-case toJS(IDBAny) for IDBCursorWithValue
2508         https://bugs.webkit.org/show_bug.cgi?id=87963
2509
2510         Reviewed by George Staikos.
2511
2512         No new tests, this is for indexedDB, which is not working for JSC binding.
2513         When indexedDB working for JSC, all the indexdb test cases should apply.
2514
2515         * bindings/js/JSIDBAnyCustom.cpp:
2516         (WebCore::toJS):
2517
2518 2012-06-05  Michal Mocny  <mmocny@google.com>
2519
2520         [chromium] Set default memory allocation limit bytes when GL_CHROMIUM_gpu_memory_manager is not supported by graphics context.
2521         https://bugs.webkit.org/show_bug.cgi?id=87996
2522
2523         Reviewed by James Robinson.
2524
2525         Soon we hope to have renderers not manage there own memory allocation limits, and rely exclusively on the
2526         allocation given by GpuMemoryManager.  However, when the graphics context does not support the
2527         GL_CHROMIUM_gpu_memory_manager extension, such as the one used by DumpRenderTree, we must default the
2528         memory allocation limit to some non-0 value.
2529
2530         * platform/graphics/chromium/LayerRendererChromium.cpp:
2531         (WebCore::LayerRendererChromium::initialize):
2532         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2533         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
2534         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2535         (WebCore):
2536         (DebugScopedSetMainThreadFromEither):
2537         (WebCore::DebugScopedSetMainThreadFromEither::DebugScopedSetMainThreadFromEither):
2538         (WebCore::DebugScopedSetMainThreadFromEither::~DebugScopedSetMainThreadFromEither):
2539
2540 2012-06-05  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
2541
2542         [Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES
2543         https://bugs.webkit.org/show_bug.cgi?id=78720
2544
2545         Reviewed by Noam Rosenthal.
2546
2547         Functions are removed from GraphicsContext3DQt that already implemented
2548         in GraphicsContext3DCommon. Macros that not supported at GLES have been
2549         changed to their appropriate pair that found in GraphicsContext3D
2550         (e.g. GL_FRAMEBUFFER_EXT to GraphicsContext3D::FRAMEBUFFER).
2551         It was needed because OpenGLES does not support these macros.
2552         Extensions3DQt is removed beceause it has never been used.
2553         Some functions have been moved fron GraphicsContext3DCommon to *OpenGL
2554         and *OpenGLES to provide specialization.
2555         The "m_depthStencilBuffer" member is added to Qt port because it uses
2556         "m_depthStencilBuffer" like the other platforms.
2557
2558         * Target.pri:
2559         * platform/graphics/GraphicsContext3D.h:
2560         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2561         (WebCore::GraphicsContext3D::depthRange):
2562         (WebCore):
2563         (WebCore::GraphicsContext3D::clearDepth):
2564         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2565         (WebCore::GraphicsContext3D::prepareTexture):
2566         (WebCore::GraphicsContext3D::readRenderingResults):
2567         (WebCore::GraphicsContext3D::reshape):
2568         (WebCore::GraphicsContext3D::copyTexImage2D):
2569         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2570         (WebCore::GraphicsContext3D::readPixels):
2571         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2572         (WebCore::GraphicsContext3D::reshapeFBOs):
2573         (WebCore::GraphicsContext3D::depthRange):
2574         (WebCore):
2575         (WebCore::GraphicsContext3D::clearDepth):
2576         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2577         (WebCore::GraphicsContext3D::isGLES2Compliant):
2578         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer):
2579         (WebCore::GraphicsContext3D::GraphicsContext3D):
2580         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2581         (WebCore):
2582
2583 2012-06-05  Vitaly Buka  <vitalybuka@chromium.org>
2584
2585         Special layout handler should be done on top frame being printed.
2586         https://bugs.webkit.org/show_bug.cgi?id=88201
2587
2588         Reviewed by Brady Eidson.
2589
2590         No new tests. Root case is already covered by tests.
2591         Case described in the issue can be reproduced only by direct call
2592         to Frame::setPrinting of subframe. Probably it's not possible with
2593         layout tests.
2594
2595         * page/Frame.cpp:
2596         (WebCore::Frame::setPrinting):
2597         Use shouldUsePrintingLayout to choose proper version of forceLayout().
2598         (WebCore::Frame::shouldUsePrintingLayout):
2599         Checks if current frame is the top frame being printed.
2600         * rendering/RenderView.cpp:
2601         (WebCore::RenderView::shouldUsePrintingLayout): Forward to Frame.
2602
2603 2012-06-05  Max Feil  <mfeil@rim.com>
2604
2605         [BlackBerry] Conditionally enlarge HTML5 video controls in fullscreen mode
2606         https://bugs.webkit.org/show_bug.cgi?id=87551
2607
2608         Reviewed by Antonio Gomes.
2609
2610         Changes to make media controls larger in fullscreen mode. The
2611         BlackBerry media controls used to be sized by a combination
2612         of CSS styles specified in mediaControlsBlackBerry.css and
2613         hard coded constants in RenderThemeBlackBerry.cpp. This patch
2614         moves all the dimensional sizes to a common location, i.e.
2615         RenderThemeBlackBerry.cpp. Having all the logic in C++ code allows
2616         more complex decision making for when and how much to enlarge the
2617         media controls. Currently the controls are enlarged by a factor
2618         of 2 if the document is in fullscreen mode, the video element
2619         is the current fullscreen element, and the deviceScaleFactor of
2620         the page is less than 2.0. This avoids overly large controls
2621         on pages which are already at least doubling the size of the
2622         controls via viewport meta tag device-width settings. In other
2623         words, if the CSS pixels are already enlarged compared to device
2624         pixels by a factor of at least 2 in length and width.
2625
2626         In order to accomplish this, I had to add a new Element* parameter
2627         to RenderTheme::adjustSliderThumbSize(). This is needed so
2628         that fullscreen mode can be checked and the deviceScaleFactor
2629         retrieved. I feel that this does not have a big impact on the
2630         code and the other ports, for which I will simply be adding the
2631         additional parameter in their platform code.
2632
2633         Tests:
2634         video-controls-enlarged-fullscreen-meta.html
2635         video-controls-enlarged-fullscreen-nometa.html
2636
2637         * css/mediaControlsBlackBerry.css:
2638         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2639         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2640         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2641         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2642         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2643         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2644         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2645         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2646         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2647         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2648         * html/shadow/SliderThumbElement.cpp:
2649         (WebCore::RenderSliderThumb::updateAppearance):
2650         * platform/blackberry/RenderThemeBlackBerry.cpp:
2651         (WebCore):
2652         (WebCore::determineRenderSlider):
2653         (WebCore::determineFullScreenMultiplier):
2654         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
2655         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
2656         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
2657         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
2658         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
2659         * platform/blackberry/RenderThemeBlackBerry.h:
2660         (RenderThemeBlackBerry):
2661         * platform/efl/RenderThemeEfl.cpp:
2662         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
2663         * platform/efl/RenderThemeEfl.h:
2664         (RenderThemeEfl):
2665         * platform/gtk/RenderThemeGtk.h:
2666         * platform/gtk/RenderThemeGtk2.cpp:
2667         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2668         * platform/gtk/RenderThemeGtk3.cpp:
2669         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2670         * platform/qt/RenderThemeQt.cpp:
2671         (WebCore::RenderThemeQt::adjustSliderThumbSize):
2672         * platform/qt/RenderThemeQt.h:
2673         (RenderThemeQt):
2674         * platform/qt/RenderThemeQtMobile.cpp:
2675         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
2676         * platform/qt/RenderThemeQtMobile.h:
2677         (RenderThemeQtMobile):
2678         * rendering/RenderThemeChromiumLinux.cpp:
2679         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
2680         * rendering/RenderThemeChromiumLinux.h:
2681         (RenderThemeChromiumLinux):
2682         * rendering/RenderThemeChromiumSkia.cpp:
2683         (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
2684         * rendering/RenderThemeChromiumSkia.h:
2685         (RenderThemeChromiumSkia):
2686         * rendering/RenderThemeChromiumWin.cpp:
2687         (WebCore):
2688         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
2689         * rendering/RenderThemeChromiumWin.h:
2690         (RenderThemeChromiumWin):
2691         * rendering/RenderThemeMac.h:
2692         (RenderThemeMac):
2693         * rendering/RenderThemeSafari.cpp:
2694         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2695         * rendering/RenderThemeSafari.h:
2696         (RenderThemeSafari):
2697         * rendering/RenderThemeWin.cpp:
2698         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2699         * rendering/RenderThemeWin.h:
2700         (RenderThemeWin):
2701         * rendering/RenderThemeWinCE.cpp:
2702         (WebCore::RenderThemeWinCE::adjustSliderThumbSize):
2703         * rendering/RenderThemeWinCE.h:
2704         (RenderThemeWinCE):
2705         * rendering/RenderTheme.cpp:
2706         (WebCore::RenderTheme::adjustStyle):
2707         (WebCore::RenderTheme::adjustMediaControlStyle):
2708         (WebCore):
2709         (WebCore::RenderTheme::adjustSliderThumbStyle):
2710         (WebCore::RenderTheme::adjustSliderThumbSize):
2711         * rendering/RenderTheme.h:
2712         (RenderTheme):
2713
2714 2012-06-05  Stephanie Lewis  <slewis@apple.com>
2715
2716         https://bugs.webkit.org/show_bug.cgi?id=88370
2717         Memory sampler should trigger low memory signal
2718
2719         Reviewed by Geoff Garen.
2720
2721         No new tests. Verify by running stress test which crashes 
2722         in a few minutes without the fix.
2723
2724         Fix assumption in block code.  We could get in a state where timer_event_source
2725         had already been released before the block ran.
2726
2727         * platform/mac/MemoryPressureHandlerMac.mm:
2728         (WebCore::MemoryPressureHandler::holdOff):
2729
2730 2012-06-05  Yoshifumi Inoue  <yosin@chromium.org>
2731
2732         [Forms] Introduce InputNumber type as an alias of double for replacing it to Decimal
2733         https://bugs.webkit.org/show_bug.cgi?id=88275
2734
2735         Reviewed by Kent Tamura.
2736
2737         This patch introduced InputNumber type as alias of double to be
2738         replaced to Decimal and convertDoubleToInputNumber and 
2739         convertToInputNumberToDouble for reducing size of patch when we
2740         introduce Decimal type.
2741
2742         This patch added new vairables to use const variable to reduce
2743         copy operation when introducing Decimal type.
2744
2745         In the implementation, we use InputNumber, will be Decimal, however some methods in IDL
2746         use double. To clarify internal usage of value and external usage, thit patch renamed
2747         following functions:
2748
2749         - parseToDouble => parseNumber
2750         - setValueAsNumber => setValueAsDouble and setValueAsInputNumber
2751         - valueAsNumber => valueAsDouble
2752
2753         This patch is a part of introducing Decimal, https://bugs.webkit.org/show_bug.cgi?id=80009
2754
2755         No new tests. This patch doesn't change behavior.
2756
2757         * html/BaseDateAndTimeInputType.cpp:
2758         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replaced parseToNumber() to valueAsDouble()
2759         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Inserted convertDoubleToInputNumber.
2760         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Use new function parseToDouble().
2761         (WebCore::BaseDateAndTimeInputType::setValueAsInputNumber): Added.
2762         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
2763         (WebCore::BaseDateAndTimeInputType::parseToNumber): This is replacement of parseToDouble().
2764         (WebCore::BaseDateAndTimeInputType::parseToDouble): Added for valueAsDate and valueAsDouble.
2765         (WebCore::BaseDateAndTimeInputType::serialize): Changed parameter type to InputNumber.
2766         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Replace double to InputNumber for getAllowdStep.
2767         * html/BaseDateAndTimeInputType.h:
2768         (BaseDateAndTimeInputType):
2769         * html/DateInputType.cpp:
2770         (WebCore::DateInputType::createStepRange): Replaced double to InputNumber.
2771         * html/DateInputType.h:
2772         (DateInputType):
2773         * html/DateTimeInputType.cpp:
2774         (WebCore::DateTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
2775         (WebCore::DateTimeInputType::createStepRange): Replaced double to InputNumber.
2776         * html/DateTimeInputType.h:
2777         (DateTimeInputType):
2778         * html/DateTimeLocalInputType.cpp:
2779         (WebCore::DateTimeLocalInputType::createStepRange): Replaced double to InputNumber.
2780         * html/DateTimeLocalInputType.h:
2781         (DateTimeLocalInputType):
2782         * html/HTMLInputElement.cpp:
2783         (WebCore::HTMLInputElement::getAllowedValueStep): Changed parameter type to InputNumber.
2784         (WebCore::HTMLInputElement::valueAsNumber): Use InputType::valueAsDouble.
2785         (WebCore::HTMLInputElement::setValueAsNumber): Use InputType::valueAsDouble.
2786         * html/HTMLInputElement.h:
2787         (HTMLInputElement):
2788         * html/InputType.cpp:
2789         (WebCore::InputType::valueAsDouble): Replacement of valueAsNumber.
2790         (WebCore::InputType::setValueAsDouble): Replacement of valueAsNumber.
2791         (WebCore::InputType::setValueAsInputNumber): Replacement of valueAsNumber.
2792         (WebCore::InputType::rangeUnderflow): Replaced double to InputNumber.
2793         (WebCore::InputType::rangeOverflow): Replaced double to InputNumber.
2794         (WebCore::InputType::defaultValueForStepUp): Changed return type to InputNumber.
2795         (WebCore::InputType::isInRange): Replaced double to InputNumber.
2796         (WebCore::InputType::isOutOfRange): Replaced double to InputNumber.
2797         (WebCore::InputType::stepMismatch): Replaced double to InputNumber.
2798         (WebCore::InputType::validationMessage): Replaced double to InputNumber.
2799         (WebCore::InputType::parseToNumber): Replacement of parseToDouble.
2800         (WebCore::InputType::parseToNumberOrNaN): Added for reducing number of std::numeric_limits<double>::quiet_NaN().
2801         (WebCore::InputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
2802         (WebCore::InputType::serialize): Changed parameter type to InputNumber.
2803         (WebCore::InputType::applyStep): Replaced double to InputNumber.
2804         (WebCore::InputType::getAllowedValueStep): Changed parameter type to InputNumber.
2805         (WebCore::InputType::stepUpFromRenderer): Replaced double to InputNumber.
2806         * html/InputType.h:
2807         (InputType):
2808         * html/MonthInputType.cpp:
2809         (WebCore::MonthInputType::defaultValueForStepUp): Changed return type to InputNumber.
2810         (WebCore::MonthInputType::createStepRange): Replaced double to InputNumber.
2811         (WebCore::MonthInputType::parseToNumber): Replacement of parseToDouble.
2812         * html/MonthInputType.h:
2813         (MonthInputType):
2814         * html/NumberInputType.cpp:
2815         (WebCore::NumberInputType::valueAsDouble): Replacement of valueAsNumber. Changed to use parseToDoubleForNumberType.
2816         (WebCore::NumberInputType::setValueAsDouble):  Replacement of setValueAsNumber.  Changed to use serializeForNumberType.
2817         (WebCore::NumberInputType::setValueAsInputNumber): Replacement of setValueAsNumber.
2818         (WebCore::NumberInputType::createStepRange): Replaced double to InputNumber.
2819         (WebCore::NumberInputType::parseToNumber): Replacement of parseToDouble.
2820         (WebCore::NumberInputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
2821         (WebCore::NumberInputType::serialize):
2822         * html/NumberInputType.h:
2823         (NumberInputType):
2824         * html/RangeInputType.cpp:
2825         (WebCore::ensureMaximum): Replaced double to InputNumber.
2826         (WebCore::RangeInputType::valueAsDouble): Replacement of valueAsNumber.
2827         (WebCore::RangeInputType::setValueAsInputNumber):  Replacement of setValueAsNumber.
2828         (WebCore::RangeInputType::createStepRange): Replaced double to InputNumber.
2829         (WebCore::RangeInputType::handleKeydownEvent): Replaced double to InputNumber.
2830         (WebCore::RangeInputType::parseToNumber): Replacement of parseToDouble.
2831         (WebCore::RangeInputType::serialize): Changed parameter type to InputNumber.
2832         (WebCore::RangeInputType::sanitizeValue): Replaced double to InputNumber.
2833         * html/RangeInputType.h:
2834         (RangeInputType):
2835         * html/StepRange.cpp:
2836         (WebCore::StepRange::StepRange): Replaced double to InputNumber.
2837         (WebCore::StepRange::acceptableError): Replaced double to InputNumber.
2838         (WebCore::StepRange::alignValueForStep): Replaced double to InputNumber.
2839         (WebCore):
2840         (WebCore::StepRange::clampValue): Replaced double to InputNumber.
2841         (WebCore::StepRange::stepMismatch): Replaced double to InputNumber.
2842         * html/StepRange.h:
2843         (WebCore::convertDoubleToInputNumber): Added.
2844         (WebCore::convertInputNumberToDouble): Added.
2845         (WebCore::StepRange::NumberWithDecimalPlaces::NumberWithDecimalPlaces): Replaced double to InputNumber.
2846         (WebCore::StepRange::StepDescription::defaultValue): Replaced double to InputNumber.
2847         (StepRange):
2848         (WebCore::StepRange::maximum): Replaced double to InputNumber.
2849         (WebCore::StepRange::minimum): Replaced double to InputNumber.
2850         (WebCore::StepRange::step): Replaced double to InputNumber.
2851         (WebCore::StepRange::stepBase): Replaced double to InputNumber.
2852         (WebCore::StepRange::defaultValue): Replaced double to InputNumber.
2853         (WebCore::StepRange::proportionFromValue): Replaced double to InputNumber.
2854         (WebCore::StepRange::valueFromProportion): Replaced double to InputNumber.
2855         * html/TimeInputType.cpp:
2856         (WebCore::TimeInputType::defaultValueForStepUp): Replaced double to InputNumber.
2857         (WebCore::TimeInputType::createStepRange): Replaced double to InputNumber.
2858         * html/TimeInputType.h:
2859         (TimeInputType):
2860         * html/WeekInputType.cpp:
2861         (WebCore::WeekInputType::createStepRange): Replaced double to InputNumber.
2862         * html/WeekInputType.h:
2863         (WeekInputType):
2864         * html/shadow/CalendarPickerElement.cpp:
2865         (WebCore::CalendarPickerElement::writeDocument): Replaced double to InputNumber.
2866         * html/shadow/SliderThumbElement.cpp:
2867         (WebCore::sliderPosition): Replaced double to InputNumber.
2868         (WebCore::RenderSliderThumb::layout): Replaced double to InputNumber.
2869         (WebCore::SliderThumbElement::setPositionFromPoint): Replaced double to InputNumber.
2870
2871 2012-06-05  Ryosuke Niwa  <rniwa@webkit.org>
2872
2873         Build fix after r119527.
2874
2875         * dom/ViewportArguments.cpp:
2876         (WebCore::computeViewportAttributes):
2877
2878 2012-06-05  Martin Robinson  <mrobinson@igalia.com>
2879
2880         [Cairo] [OpenGL] Enable GL_OES_standard_derivatives
2881         https://bugs.webkit.org/show_bug.cgi?id=87583
2882
2883         Reviewed by Alejandro G. Castro.
2884
2885         No new tests. This is covered by oes-standard-derivatives.html
2886         in the Khronos WebGL conformance tests, which may one day be part
2887         of the WebKit test suite.
2888
2889         Activate the GL_OES_standard_derivatives on Cairo along with
2890         Qt and Mac.
2891
2892         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2893         (WebCore::Extensions3DOpenGL::ensureEnabled):
2894         (WebCore::Extensions3DOpenGL::isEnabled):
2895
2896 2012-06-05  Simon Fraser  <simon.fraser@apple.com>
2897
2898         Avoid creating compositing layers for preserve-3d without transformed descendants
2899         https://bugs.webkit.org/show_bug.cgi?id=88115
2900
2901         Reviewed by Antti Koivisto.
2902         
2903         Avoid creating compositing layers, and therefore using excess backing store,
2904         for elements that have -webkit-transform-style: preserve-3d, but no 3D-transformed
2905         descendants that would be affected by that preserve-3d.
2906         
2907         Test: compositing/layer-creation/no-compositing-for-preserve-3d.html
2908
2909         * rendering/RenderLayer.h: Replace the "mustOverlap" flag with a enum
2910         that describes the different reasons for indirect compositing, so that
2911         we can use that information to decide whether to allocate backing store.
2912         (WebCore::RenderLayer::setIndirectCompositingReason):
2913         (WebCore::RenderLayer::indirectCompositingReason):
2914         (WebCore::RenderLayer::mustCompositeForIndirectReasons):
2915         * rendering/RenderLayer.cpp:
2916         (WebCore::RenderLayer::RenderLayer): Initialize m_indirectCompositingReason
2917
2918         * rendering/RenderLayerCompositor.h: New out param for computeCompositingRequirements()
2919         that is uses to indicate that a 3d-transformed descendant has been encountered.
2920         Rename requiresCompositingWhenDescendantsAreCompositing() to requiresCompositingForIndirectReason(),
2921         and return the reason as an out param.
2922         
2923         * rendering/RenderLayerCompositor.cpp:
2924         (WebCore::RenderLayerCompositor::updateCompositingLayers): Pass in the saw3DTransform
2925         param to computeCompositingRequirements().
2926         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Return a flag
2927         from computeCompositingRequirements() that is set to true if we've seen descendants
2928         that have 3d transforms. This is later used to decide whether to composite for
2929         perspective or preserve-3d.
2930         Change the "mustOverlapCompositedLayers" code to use the new "indirect compositing"
2931         enum flags.
2932         After enumerating children, call requiresCompositingForIndirectReason() and 
2933         record the reason in the layer.
2934         (WebCore::RenderLayerCompositor::needsToBeComposited): Use mustCompositeForIndirectReasons() now.
2935         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Consult the indirect compositing
2936         reason rather than just looking for the overlap flag.
2937         (WebCore::RenderLayerCompositor::reasonForCompositing): Now that we have more information
2938         about indirect compositing reasons, the logging can be more detailed.
2939         (WebCore::RenderLayerCompositor::requiresCompositingForTransform): This now only looks
2940         for 3d transforms. We now treat perspective and perserve-3d as "indirect" reasons, because
2941         whether they composite depends on descendants having non-affine transforms.
2942         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): Includes the logic
2943         previously in requiresCompositingWhenDescendantsAreCompositing(), and now determines
2944         whether to composite for preserve-3d and perspective, based on whether we have transformed descendants.
2945
2946 2012-06-05  Levi Weintraub  <leviw@chromium.org>
2947
2948         Block selection gaps painted not properly pixel snapped
2949         https://bugs.webkit.org/show_bug.cgi?id=88000
2950
2951         Reviewed by Ryosuke Niwa.
2952
2953         Fixes for selection painting in both inline line heights and block gaps. We were unintentionally
2954         flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the
2955         logical left and right values in logical(Left|Right)SelectionGap to properly align our block
2956         selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine.
2957
2958         We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting
2959         routine. Now we're properly rounding.
2960
2961         Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
2962
2963         * rendering/InlineTextBox.cpp:
2964         (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding.
2965         * rendering/RenderBlock.cpp:
2966         (WebCore::blockDirectionOffset): Fix incorrect flooring in return value.
2967         (WebCore::inlineDirectionOffset): Ditto.
2968         (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This
2969         implementation rounded the final x value instead of properly rounding our block offset then flooring
2970         the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap
2971         the y offset and height.
2972         (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting.
2973         (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel
2974         alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order
2975         to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the
2976         inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method.
2977         (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right.
2978
2979 2012-06-05  Adam Barth  <abarth@webkit.org>
2980
2981         Remove support for target-densitydpi in the viewport meta tag
2982         https://bugs.webkit.org/show_bug.cgi?id=88047
2983
2984         Reviewed by Kenneth Rohde Christiansen.
2985
2986         The target-densitydpi parameter was originally implemented on Android,
2987         but it does not appear to be widely used and introduces significant
2988         implementation complexity because it forces us to track three scale
2989         factors (defaultDeviceScaleFactor, deviceScaleFactor, and
2990         pageScaleFactor) rather than just two (deviceScaleFactor and
2991         pageScaleFactor).
2992
2993         There don't appear to be many web sites that use target-densitydpi
2994         because it is not supported on iOS.  There are also concerns from the
2995         standards community about the design of the feature.  It seems our best
2996         course of action is to remove target-densitydpi and address these use
2997         cases via other mechanisms, such as responsive images and device units
2998         in CSS because those approaches are likely to be implemented broadly.
2999
3000         * dom/ViewportArguments.cpp:
3001         (WebCore::computeViewportAttributes):
3002         (WebCore):
3003         (WebCore::setViewportFeature):
3004         (WebCore::viewportErrorMessageTemplate):
3005         (WebCore::viewportErrorMessageLevel):
3006         * dom/ViewportArguments.h:
3007         (WebCore::ViewportArguments::ViewportArguments):
3008         (ViewportArguments):
3009         (WebCore::ViewportArguments::operator==):
3010
3011 2012-06-05  Erik Arvidsson  <arv@chromium.org>
3012
3013         [V8] Improve variable resolution order on window
3014         https://bugs.webkit.org/show_bug.cgi?id=84247
3015
3016         Reviewed by Ojan Vafai.
3017
3018         This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.
3019
3020         Test: fast/dom/Window/window-property-shadowing-onclick.html
3021
3022         * bindings/v8/V8DOMWindowShell.cpp:
3023         (WebCore::V8DOMWindowShell::initContextIfNeeded): Set the flag as we initialize V8.
3024         * bindings/v8/WorkerContextExecutionProxy.cpp:
3025         (WebCore::WorkerContextExecutionProxy::initIsolate): Ditto.
3026
3027 2012-06-05  Ojan Vafai  <ojan@chromium.org>
3028
3029         Delete dead code from RenderBox::computeLogicalWidthInRegion
3030         https://bugs.webkit.org/show_bug.cgi?id=88353
3031
3032         Reviewed by Tony Chang.
3033
3034         No new tests obviously since this is dead code.
3035
3036         * rendering/RenderBox.cpp:
3037         (WebCore::RenderBox::computeLogicalWidthInRegion):
3038
3039 2012-06-05  Greg Billock  <gbillock@google.com>
3040
3041         New constructor for WebIntent to be used for delivery
3042         https://bugs.webkit.org/show_bug.cgi?id=87143
3043
3044         Reviewed by Darin Fisher.
3045
3046         * Modules/intents/Intent.cpp:
3047         (WebCore::Intent::setExtras):
3048         (WebCore):
3049         * Modules/intents/Intent.h:
3050         (Intent):
3051
3052 2012-06-01  Ojan Vafai  <ojan@chromium.org>
3053
3054         Change overrideSizes to be content-box instead of border-box
3055         https://bugs.webkit.org/show_bug.cgi?id=88116
3056
3057         Reviewed by Tony Chang.
3058
3059         Previously, the code used border-box everywhere except for one place
3060         where it used content-box when setting the override size. Conversely,
3061         it subtracted the borderAndPaddingSize everywhere it grabbed the override
3062         size except for one.
3063
3064         Instead, make the override size override the content-box size.
3065         Converging on using the border-box size would be tricky given RenderTableCell's
3066         tricky management of intrinsic padding.
3067
3068         There is no behavior change except in RenderBox::availableLogicalHeightUsing,
3069         which fixes a table test.
3070
3071         * rendering/RenderBox.cpp:
3072         (WebCore::RenderBox::setOverrideLogicalContentHeight):
3073         (WebCore::RenderBox::setOverrideLogicalContentWidth):
3074         (WebCore::RenderBox::overrideLogicalContentWidth):
3075         (WebCore::RenderBox::overrideLogicalContentHeight):
3076         (WebCore::RenderBox::computeLogicalWidthInRegion):
3077         (WebCore::RenderBox::computeLogicalHeight):
3078         (WebCore::RenderBox::computePercentageLogicalHeight):
3079         (WebCore::RenderBox::availableLogicalHeightUsing):
3080         We were incorrectly subtracting the borderAndPaddingLogicalWidth instead
3081         of the borderAndPaddingLogicalHeight.
3082
3083         * rendering/RenderBox.h:
3084         (RenderBox):
3085         * rendering/RenderDeprecatedFlexibleBox.cpp:
3086         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3087         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3088         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3089         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
3090         * rendering/RenderFlexibleBox.cpp:
3091         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
3092         (WebCore::RenderFlexibleBox::setLogicalOverrideSize):
3093         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
3094         * rendering/RenderTableCell.cpp:
3095         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
3096
3097 2012-06-05  Andy Estes  <aestes@apple.com>
3098
3099         REGRESSION (r118197): PluginStrategy should be used even if ENABLE(NETSCAPE_PLUGIN_API) is false
3100         https://bugs.webkit.org/show_bug.cgi?id=88296
3101
3102         Reviewed by Dan Bernstein.
3103
3104         refresh() and initPlugins() should call into PluginStrategy even if
3105         ENABLE(NETSCAPE_PLUGIN_API) is false. Some ports support non-Netscape
3106         plug-ins, so PluginStrategy should be consulted even if Netscape
3107         plug-ins specifically are disabled.
3108
3109         Ports that support platform strategies but not Netscape plug-ins should
3110         handle this inside their PluginStrategy rather than modifying generic
3111         plug-in code.
3112
3113         * plugins/PluginData.cpp:
3114         (WebCore::PluginData::refresh):
3115         (WebCore::PluginData::initPlugins):
3116
3117 2012-06-05  Douglas Stockwell  <dstockwell@chromium.org>
3118
3119         Crash when modifying fixed-position elements in a detached frame
3120         https://bugs.webkit.org/show_bug.cgi?id=88288
3121
3122         Reviewed by James Robinson.
3123
3124         Test: fast/block/positioning/fixed-position-detached-frame.html
3125
3126         * css/StyleResolver.cpp:
3127         (WebCore::StyleResolver::collectMatchingRulesForList):
3128
3129 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
3130
3131         Web Inspector: render timeline paint category dark green
3132         https://bugs.webkit.org/show_bug.cgi?id=88333
3133
3134         Reviewed by Pavel Feldman.
3135
3136         - Added a new, dark-green color for timeline events.
3137
3138         * WebCore.gypi: Added timelineBarDarkGreen.png
3139         * inspector/front-end/Images/timelineBarDarkGreen.png: Added.
3140         * inspector/front-end/Images/timelineCheckmarks.png: Added a dark-green checkbox.
3141         * inspector/front-end/Images/timelineDots.png: Added a dark-green dot.
3142         * inspector/front-end/TimelinePresentationModel.js:
3143         (WebInspector.TimelinePresentationModel.categories):
3144         * inspector/front-end/WebKit.qrc: Added timelineBarDarkGreen.png.
3145         * inspector/front-end/timelinePanel.css:
3146         (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox):
3147         (.timeline-category-painting .timeline-graph-bar):
3148         (.popover .timeline-painting):
3149         (.timeline-category-painting .timeline-tree-icon):
3150
3151 2012-06-05  Alexei Filippov  <alexeif@chromium.org>
3152
3153         Web Inspector: serialize edge counts instead of indexes in heap snapshot
3154         https://bugs.webkit.org/show_bug.cgi?id=88324
3155
3156         The serialized node structure currently holds an index
3157         of its first containment edge in the edges array.
3158         The index can be quite big (up to 7 digits for large snapshots).
3159         The patch changes the serialization format to pass
3160         node containment edge count instead. For most nodes the count
3161         is just a single digit number.
3162         This reduces serialized snapshot size and therefore its transfer time.
3163
3164         Reviewed by Yury Semikhatsky.
3165
3166         * inspector/front-end/HeapSnapshot.js:
3167         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
3168         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
3169         (WebInspector.HeapSnapshotNode.prototype._ordinal):
3170         (WebInspector.HeapSnapshotNodeIterator):
3171         (WebInspector.HeapSnapshot.prototype._init):
3172         (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):
3173         (WebInspector.HeapSnapshot.prototype._buildRetainers):
3174         (WebInspector.HeapSnapshot.prototype._bfs):
3175         (WebInspector.HeapSnapshot.prototype._buildAggregates):
3176         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
3177         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
3178         (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
3179         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
3180
3181 2012-06-05  Arpita Bahuguna  <arpitabahuguna@gmail.com>
3182
3183         CSS 2.1 failure: border-conflict-element-021a
3184         https://bugs.webkit.org/show_bug.cgi?id=86885
3185
3186         Reviewed by Julien Chaffraix.
3187
3188         When two adjacent table row groups (thead, tbody, tfoot) have the same border-width
3189         and the same border-style in a 'border-collapse: collapse' table the color of the border
3190         from the top-most table row wins.
3191
3192         Tests: fast/table/border-collapsing/adjacent-row-groups-multi.html
3193                fast/table/border-collapsing/adjacent-row-groups.html
3194
3195         * rendering/RenderTable.cpp:
3196         (WebCore::RenderTable::paintObject):
3197         Currently each row group is sent for paint from top (firstChild) to bottom thereby causing
3198         the borders of the bottom-most row group (which is painted last) to overlap over the
3199         previous row-group. This breaks the precedence for collapsed borders between adjacent cells.
3200
3201         This fix thus reverses the order in which the row-groups/sections are passed for painting.
3202         Additional change has been done to iterate over the RenderTableSections directly.
3203
3204         (WebCore):
3205         (WebCore::RenderTable::bottomSection):
3206         * rendering/RenderTable.h:
3207         New function has been added to obtain the last section of the table.
3208
3209         (RenderTable):
3210         * rendering/RenderTableSection.h:
3211         (RenderTableSection):
3212         RenderTableSection's paint() method has now been made public so as to make it accessible
3213         from RenderTable.
3214
3215 2012-06-05  Csaba Osztrogonác  <ossy@webkit.org>
3216
3217         [Qt][Win] Fix IDL dependency generation
3218         https://bugs.webkit.org/show_bug.cgi?id=88304
3219
3220         Reviewed by Tor Arne Vestbø.
3221
3222         * DerivedSources.pri:
3223
3224 2012-06-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3225
3226         Unreviewed, rolling out r119467, r119471, and r119476.
3227         http://trac.webkit.org/changeset/119467
3228         http://trac.webkit.org/changeset/119471
3229         http://trac.webkit.org/changeset/119476
3230         https://bugs.webkit.org/show_bug.cgi?id=88332
3231
3232         it broke chromium-mac static initializers test.\ (Requested by
3233         loislo on #webkit).
3234
3235         * WebCore.gyp/WebCore.gyp:
3236         * WebCore.gypi:
3237         * platform/graphics/FontPlatformData.h:
3238         (FontPlatformData):
3239         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3240         (WebCore::FontPlatformData::platformDataInit):
3241         (WebCore::FontPlatformData::platformDataAssign):
3242         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Removed.
3243         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Removed.
3244         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Removed.
3245         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Removed.
3246         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Removed.
3247         * platform/graphics/mac/FontComplexTextMac.cpp:
3248         (WebCore::Font::selectionRectForComplexText):
3249         (WebCore::Font::drawComplexText):
3250         (WebCore::Font::floatWidthForComplexText):
3251         (WebCore::Font::offsetForPositionForComplexText):
3252
3253 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
3254
3255         Web Inspector: SHIFT key as helper to color adjustment in color picker
3256         https://bugs.webkit.org/show_bug.cgi?id=88319
3257
3258         Reviewed by Pavel Feldman.
3259
3260         With Shift depressed, the dragger in the color picker will snap to the horizontal
3261         or vertical axis while dragging, depending on which axis offset is greater.
3262
3263         * inspector/front-end/Spectrum.js:
3264         (WebInspector.Spectrum.colorDragStart):
3265         (WebInspector.Spectrum.colorDrag):
3266         (WebInspector.Spectrum.draggable.move):
3267         (WebInspector.Spectrum.draggable.start):
3268
3269 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
3270
3271         Web Inspector: aggregate all events before first frame into a fake frame
3272         https://bugs.webkit.org/show_bug.cgi?id=88229
3273
3274         - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
3275
3276         * inspector/front-end/TimelineFrameController.js:
3277         (WebInspector.TimelineFrameController.prototype._addRecord):
3278         (WebInspector.TimelineFrameController.prototype._flushFrame):
3279         (WebInspector.TimelineFrameController.prototype._createFrame):
3280
3281 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
3282
3283         JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB
3284         https://bugs.webkit.org/show_bug.cgi?id=88283
3285
3286         Reviewed by Kentaro Hara.
3287
3288         No new tests, idb not working for JSC yet.
3289
3290         * bindings/js/Dictionary.cpp:
3291         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
3292         * bindings/js/Dictionary.h:
3293         (Dictionary):
3294         * bindings/js/JSDictionary.cpp:
3295         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
3296         (WebCore):
3297         * bindings/js/JSDictionary.h:
3298         (JSDictionary):
3299
3300 2012-06-05  Dongwoo Im  <dw.im@samsung.com>
3301
3302         Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
3303         https://bugs.webkit.org/show_bug.cgi?id=73176
3304
3305         Reviewed by Adam Barth.
3306
3307         Two more APIs are added in Custom Scheme Handler specification.
3308         http://dev.w3.org/html5/spec/Overview.html#custom-handlers
3309         One is 'isProtocolHandlerRegistered' to query whether the specific URL
3310         is registered or not.
3311         The other is 'unregisterProtocolHandler' to remove the registered URL.
3312
3313         Test: fast/dom/unregister-protocol-handler.html
3314
3315         * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
3316         * loader/EmptyClients.h: Add prototypes.
3317         (EmptyChromeClient):
3318         (WebCore::EmptyChromeClient::isProtocolHandlerRegistered):
3319         (WebCore::EmptyChromeClient::unregisterProtocolHandler):
3320         * page/ChromeClient.h:
3321         (ChromeClient):
3322         * page/NavigatorRegisterProtocolHandler.cpp:
3323         (WebCore):
3324         (WebCore::customHandlersStateString):
3325         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered.
3326         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler.
3327         * page/NavigatorRegisterProtocolHandler.h:
3328         (NavigatorRegisterProtocolHandler):
3329         * page/NavigatorRegisterProtocolHandler.idl:
3330
3331 2012-06-04  Kinuko Yasuda  <kinuko@chromium.org>
3332
3333         Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests
3334         https://bugs.webkit.org/show_bug.cgi?id=85174
3335
3336         Reviewed by Kentaro Hara.
3337
3338         This fixes a crash problem which could happen when the constructor is
3339         given an array which contains String-type item(s).
3340
3341         There're still some Text mismatches between v8 results and
3342         JSC results, most of them are v8 not throwing exception
3343         when it is given an object whose toString() method throws
3344         exception.  (The issue will be addresse in a separate patch.)
3345
3346         Test: fast/files/blob-constructor.html
3347
3348         * bindings/v8/custom/V8BlobCustom.cpp:
3349         (WebCore::V8Blob::constructorCallback):
3350
3351 2012-06-05  Kentaro Hara  <haraken@chromium.org>
3352
3353         Remove unnecessary constructor of SelectorQueryCache
3354         https://bugs.webkit.org/show_bug.cgi?id=87942
3355
3356         Reviewed by Ryosuke Niwa.
3357
3358         Per the comment from darin@ (https://bugs.webkit.org/show_bug.cgi?id=87942#c27),
3359         this patch removes an inline constructor that has no arguments.
3360         To have the compiler generate the constructor,
3361         this patch also removes WTF_MAKE_NONCOPYABLE().
3362
3363         No tests. No change in behavior.
3364
3365         * dom/SelectorQuery.h:
3366         (SelectorQueryCache):
3367
3368 2012-06-05  Kentaro Hara  <haraken@chromium.org>
3369
3370         Remove unused methods from SelectorQuery.h
3371         https://bugs.webkit.org/show_bug.cgi?id=88289
3372
3373         Reviewed by Antti Koivisto.
3374
3375         This patch removes SelectorDataList::size() and
3376         SelectorDataList::SelectorDataList().
3377         SelectorDataList::size() is not used by anybody.
3378         SelectorDataList::SelectorDataList() can be auto-generated
3379         by a compiler.
3380
3381         No tests. No change in behavior.
3382
3383         * dom/SelectorQuery.cpp:
3384         * dom/SelectorQuery.h:
3385         (SelectorDataList):
3386
3387 2012-06-05  Kent Tamura  <tkent@chromium.org>
3388
3389         Build fix for r119470.
3390
3391         * loader/EmptyClients.cpp: Add #include "IntentRequest.h".
3392
3393 2012-06-05  Kent Tamura  <tkent@chromium.org>
3394
3395         Remove unused function: Document::formElements
3396         https://bugs.webkit.org/show_bug.cgi?id=88272
3397
3398         Reviewed by Kentaro Hara.
3399
3400         No new tests. No behavior change.
3401
3402         * dom/Document.h:
3403         (Document): remove formElements(). It was used for radio group
3404         validation, but the current code doesn't use it any more.
3405
3406 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
3407
3408         Unreviewed build fix on Chromium mac
3409
3410         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3411         (WebCore::isAATFont):
3412
3413 2012-06-05  Kent Tamura  <tkent@chromium.org>
3414
3415         Move some function definitions in EmptyClients.h to EmptyClients.cpp
3416         https://bugs.webkit.org/show_bug.cgi?id=88285
3417
3418         Reviewed by Ryosuke Niwa.
3419
3420         If we have definitions of functions with RefPtr<> in EmptyClients.h like
3421
3422             virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
3423
3424         and a source file includes EmptyClient.h, the source file needs to
3425         include FileChooser.h though the source file doesn't use FileChooser
3426         class explicitly because the definition of runOpenPanel() needs to call
3427         FileChooser::deref().
3428         To avoid this, we had better move such functions to EmptyClients.cpp.
3429
3430         No new tests. No behavior changes.
3431
3432         * loader/EmptyClients.cpp: Move such functions from EmptyClients.h to
3433         here, and move EmptyPopupMenu and EmptySearchPopupMenu too because
3434         they're used only by EmptyChromeClient.
3435         (WebCore):
3436         (EmptyPopupMenu):
3437         (WebCore::EmptyPopupMenu::show):
3438         (WebCore::EmptyPopupMenu::hide):
3439         (WebCore::EmptyPopupMenu::updateFromElement):
3440         (WebCore::EmptyPopupMenu::disconnectClient):
3441         (EmptySearchPopupMenu):
3442         (WebCore::EmptySearchPopupMenu::popupMenu):
3443         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
3444         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
3445         (WebCore::EmptySearchPopupMenu::enabled):
3446         (WebCore::EmptyChromeClient::createPopupMenu):
3447         (WebCore::EmptyChromeClient::createSearchPopupMenu):
3448         (WebCore::EmptyChromeClient::createColorChooser):
3449         (WebCore::EmptyChromeClient::runOpenPanel):
3450         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3451         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3452         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
3453         (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
3454         (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
3455         (WebCore::EmptyFrameLoaderClient::createFrame):
3456         (WebCore::EmptyFrameLoaderClient::createPlugin):
3457         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
3458         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin):
3459         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
3460         (WebCore::EmptyFrameLoaderClient::dispatchIntent):
3461         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
3462         (WebCore::EmptyEditorClient::registerUndoStep):
3463         (WebCore::EmptyEditorClient::registerRedoStep):
3464         (WebCore::EmptyContextMenuClient::customizeMenu):
3465         * loader/EmptyClients.h: Move such function definitions to
3466         EmptyClient.cpp, and append OVERRIDE.
3467         (EmptyChromeClient):
3468         (EmptyFrameLoaderClient):
3469         (EmptyTextCheckerClient):
3470         (EmptyEditorClient):
3471         (EmptyContextMenuClient):
3472         * svg/graphics/SVGImage.cpp: Remove unnecessary #includes.
3473
3474 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
3475
3476         Web Inspector: "-webkit"-prefixed properties are considered inherited in the Computed Style pane
3477         https://bugs.webkit.org/show_bug.cgi?id=88257
3478
3479         Reviewed by Pavel Feldman.
3480
3481         Canonical names for properties should be used when checking if they are inherited (since only canonical names
3482         are put into the usedProperties set).
3483
3484         * inspector/front-end/StylesSidebarPane.js:
3485         (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):
3486
3487 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
3488
3489         [Chromium] Implement font shaping with font-feature-settings on Mac
3490         https://bugs.webkit.org/show_bug.cgi?id=69826
3491
3492         Reviewed by Tony Chang.
3493
3494         Add HarfBuzz-ng text shaper.
3495         Chromium mac port uses it as secondary text shaper to support OpenType features.
3496         HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and
3497         corresponding font is not an AAT font.
3498
3499         No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port.
3500
3501         * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies.
3502         * WebCore.gypi: Added harfbuzz-ng files.
3503         * platform/graphics/FontPlatformData.h:
3504         (FontPlatformData): Added m_harfbuzzFace.
3505         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3506         (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace.
3507         (WebCore::FontPlatformData::platformDataAssign): Ditto.
3508         (WebCore):
3509         (WebCore::isAATFont):
3510         (WebCore::FontPlatformData::harfbuzzFace):
3511         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added.
3512         (WebCore):
3513         (WebCore::harfbuzzFaceCache):
3514         (WebCore::HarfBuzzFace::HarfBuzzFace):
3515         (WebCore::HarfBuzzFace::~HarfBuzzFace):
3516         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added.
3517         (WebCore):
3518         (HarfBuzzFace):
3519         (WebCore::HarfBuzzFace::create):
3520         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added.
3521         (WebCore):
3522         (WebCore::floatToHarfBuzzPosition):
3523         (WebCore::getGlyph):
3524         (WebCore::getGlyphHorizontalAdvance):
3525         (WebCore::getGlyphHorizontalOrigin):
3526         (WebCore::getGlyphExtents):
3527         (WebCore::harfbuzzCoreTextGetFontFuncs):
3528         (WebCore::releaseTableData):
3529         (WebCore::harfbuzzCoreTextGetTable):
3530         (WebCore::HarfBuzzFace::createFace):
3531         (WebCore::HarfBuzzFace::createFont):
3532         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
3533         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added.
3534         (WebCore):
3535         (WebCore::harfbuzzPositionToFloat):
3536         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
3537         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
3538         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
3539         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
3540         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3541         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
3542         (WebCore::HarfBuzzShaper::setFontFeatures):
3543         (WebCore::HarfBuzzShaper::shape):
3544         (WebCore::HarfBuzzShaper::setupHarfBuzzRun):
3545         (WebCore::HarfBuzzShaper::shapeHarfBuzzRun):
3546         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
3547         (WebCore::HarfBuzzShaper::offsetForPosition):
3548         (WebCore::HarfBuzzShaper::selectionRect):
3549         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added.
3550         (WebCore):
3551         (HarfBuzzShaper):
3552         (WebCore::HarfBuzzShaper::totalWidth):
3553         (HarfBuzzRun):
3554         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
3555         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
3556         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
3557         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
3558         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
3559         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
3560         * platform/graphics/mac/FontComplexTextMac.cpp:
3561         (WebCore):
3562         (WebCore::preferHarfBuzz): Added.
3563         (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists.
3564         (WebCore::Font::drawComplexText): Ditto.
3565         (WebCore::Font::floatWidthForComplexText): Ditto.
3566         (WebCore::Font::offsetForPositionForComplexText): Ditto.
3567
3568 2012-06-05  Li Yin  <li.yin@intel.com>
3569
3570         IETC: FileList.item(-1) should return null instead of raising
3571         https://bugs.webkit.org/show_bug.cgi?id=77899
3572
3573         Reviewed by Kentaro Hara.
3574
3575         IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
3576         Accroding to http://es5.github.com/#x9.6
3577         When the index is negative, it should not raise exception.
3578         Firefox and IE returns null when there is not indexth File object.
3579
3580         Test: fast/files/file-list-test.html
3581
3582         * fileapi/FileList.idl:
3583
3584 2012-06-05  Adam Barth  <abarth@webkit.org>
3585
3586         EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse
3587         https://bugs.webkit.org/show_bug.cgi?id=88270
3588
3589         Reviewed by James Robinson.
3590
3591         This patch adds a setting analogous to deviceSupportsTouch to determine
3592         whether the device supports mouse. We then don't dispatch fake mouse
3593         events on devices that don't have a mouse in the first place.
3594
3595         Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
3596
3597         * page/EventHandler.cpp:
3598         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
3599         * page/Settings.cpp:
3600         (WebCore::Settings::Settings):
3601         * page/Settings.h:
3602         (WebCore::Settings::setDeviceSupportsMouse):
3603         (WebCore::Settings::deviceSupportsMouse):
3604         (Settings):
3605         * testing/InternalSettings.cpp:
3606         (WebCore::InternalSettings::InternalSettings):
3607         (WebCore::InternalSettings::restoreTo):
3608         (WebCore::InternalSettings::setDeviceSupportsMouse):
3609         (WebCore):
3610         * testing/InternalSettings.h:
3611         (InternalSettings):
3612         * testing/InternalSettings.idl:
3613
3614 2012-06-04  Simon Fraser  <simon.fraser@apple.com>
3615
3616         Leaking ClipRects
3617         https://bugs.webkit.org/show_bug.cgi?id=88282
3618
3619         Reviewed by Dan Bernstein.
3620
3621         In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
3622         was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
3623         there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
3624
3625         * rendering/RenderLayer.cpp:
3626         (WebCore::RenderLayer::updateClipRects):
3627         * rendering/RenderLayer.h:
3628         (WebCore::ClipRects::ClipRects):
3629
3630 2012-06-04  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
3631
3632         Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
3633         https://bugs.webkit.org/show_bug.cgi?id=88259
3634
3635         Reviewed by Ryosuke Niwa.
3636
3637         Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
3638         and floats to wrap incorrectly.
3639
3640         Tests: fast/sub-pixel/float-containing-block-with-margin.html
3641                fast/sub-pixel/float-with-right-margin-zoom.html
3642                fast/sub-pixel/inline-block-with-padding.html
3643
3644         * platform/FractionalLayoutUnit.h:
3645         (WebCore::operator+=):
3646         Add missing float version of += operator thus avoiding a silent cast to
3647         int loosing precision.
3648         
3649         * rendering/RenderBlockLineLayout.cpp:
3650         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
3651         (WebCore::LineWidth::updateAvailableWidth):
3652         Change LineWidth left/right to floating point and instead of rounding the
3653         left and right edge separately.
3654         
3655         * rendering/RenderFlexibleBox.cpp:
3656         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3657         Use explicit cast to avoid compiler ambiguity warning.
3658
3659 2012-06-04  Tony Chang  <tony@chromium.org>
3660
3661         CSS property 'order' should be a number rather than an int
3662         https://bugs.webkit.org/show_bug.cgi?id=88111
3663
3664         Reviewed by Ojan Vafai.
3665
3666         This changed in the spec:
3667         http://dev.w3.org/csswg/css3-flexbox/#order
3668
3669         I also fixed the compile with CSS3_FLEXBOX disabled.
3670
3671         No new tests, covered by existing tests.
3672
3673         * css/CSSComputedStyleDeclaration.cpp:
3674         (WebCore):
3675         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3676         * css/CSSParser.cpp:
3677         (WebCore::CSSParser::parseValue):
3678         * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
3679         (WebCore::CSSProperty::isInheritedProperty):
3680         * css/StyleBuilder.cpp:
3681         (WebCore::StyleBuilder::StyleBuilder):
3682         * css/StyleResolver.cpp:
3683         (WebCore::StyleResolver::collectMatchingRulesForList):
3684         * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
3685         (RenderFlexibleBox::OrderIterator):
3686         * rendering/RenderFlexibleBox.h:
3687         * rendering/style/RenderStyle.h:
3688         * rendering/style/StyleRareNonInheritedData.h:
3689         (StyleRareNonInheritedData):
3690
3691 2012-06-04  Hugo Parente Lima  <hugo.lima@openbossa.org>
3692
3693         Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
3694         https://bugs.webkit.org/show_bug.cgi?id=88243
3695
3696         Reviewed by Adam Barth.
3697
3698         No new tests needed, this just rename a compiler flag.
3699
3700         * dom/Document.cpp:
3701         (WebCore::Document::setDocType):
3702         * dom/ViewportArguments.h:
3703         * html/HTMLMetaElement.cpp:
3704         (WebCore::HTMLMetaElement::process):
3705
3706 2012-06-04  Dana Jansens  <danakj@chromium.org>
3707
3708         [chromium] Remove redundant setNeedsCommit when prepareToDraw fails
3709         https://bugs.webkit.org/show_bug.cgi?id=88246
3710
3711         Reviewed by James Robinson.
3712
3713         When prepareToDraw fails it explicitly calls setNeedsCommit, but the
3714         scheduler already takes care of this for it. When a frame is not
3715         successfully drawn, the scheduler state machine sets the needsCommit
3716         bit itself.
3717
3718         This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
3719
3720         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3721         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3722
3723 2012-06-04  Takashi Toyoshima  <toyoshim@chromium.org>
3724
3725         [WebSocket] Send requires super linear time against data size
3726         https://bugs.webkit.org/show_bug.cgi?id=87383
3727
3728         Reviewed by Kent Tamura.
3729
3730         WebSocket send operation requires super linear time to send data
3731         against data size. This is because removing sent data in Vector<char>
3732         always requires data copy.
3733         Introduced wtf/StreamBuffer realizes O(n) buffer operations.
3734         This patch is only for optimization. No new tests are needed.
3735
3736         * platform/network/SocketStreamHandleBase.cpp:
3737         (WebCore::SocketStreamHandleBase::sendPendingData):
3738         * platform/network/SocketStreamHandleBase.h:
3739         (SocketStreamHandleBase):
3740
3741 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3742
3743         Mock scrollbars differ by 1px in DRT vs. WKTR
3744         https://bugs.webkit.org/show_bug.cgi?id=80879
3745
3746         Rubber-stamped by Ryosuke Niwa.
3747
3748         Disable r119431 except for Apple Mac port.
3749
3750         * platform/ScrollbarThemeComposite.cpp:
3751         (WebCore::ScrollbarThemeComposite::thumbLength):
3752
3753 2012-06-04  Jeffrey Pfau  <jpfau@apple.com>
3754
3755         Document cleanup can get confused if parser still exists
3756         https://bugs.webkit.org/show_bug.cgi?id=88250
3757
3758         Reviewed by Geoffrey Garen.
3759
3760         No new tests; no behavior changes.
3761
3762         * dom/Document.cpp:
3763         (WebCore::Document::removedLastRef): Detach parser earlier
3764
3765 2012-06-04  Andrew Lo  <anlo@rim.com>
3766
3767         [BlackBerry] Split AnimationFrameRateController into its own file
3768         https://bugs.webkit.org/show_bug.cgi?id=88242
3769
3770         Reviewed by Antonio Gomes.
3771
3772         Include new header file to reflect re-organization of platform animation
3773         header files.
3774
3775         * platform/graphics/DisplayRefreshMonitor.h:
3776
3777 2012-06-04  Dana Jansens  <danakj@chromium.org>
3778
3779         [chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer.
3780         https://bugs.webkit.org/show_bug.cgi?id=88252
3781
3782         Reviewed by James Robinson.
3783
3784         CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never
3785         set to be non-null currently. Instead of making this a special case, we
3786         move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set
3787         the pointer on every layer during commit via the TreeSynchronizer's walk
3788         through the layer tree.
3789
3790         Unit tests: Tested by TreeSynchronizer tests.
3791
3792         * platform/graphics/chromium/TreeSynchronizer.cpp:
3793         (WebCore::TreeSynchronizer::synchronizeTrees):
3794         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
3795         * platform/graphics/chromium/TreeSynchronizer.h:
3796         (WebCore):
3797         (TreeSynchronizer):
3798         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3799         (WebCore::CCLayerImpl::CCLayerImpl):
3800         * platform/graphics/chromium/cc/CCLayerImpl.h:
3801         (WebCore):
3802         (WebCore::CCLayerImpl::layerTreeHostImpl):
3803         (WebCore::CCLayerImpl::setLayerTreeHostImpl):
3804         (CCLayerImpl):
3805         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3806         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3807         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3808         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
3809         (WebCore::CCVideoLayerImpl::setNeedsRedraw):
3810         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3811
3812 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3813
3814         Mock scrollbars differ by 1px in DRT vs. WKTR
3815         https://bugs.webkit.org/show_bug.cgi?id=80879
3816
3817         Reviewed by Simon Fraser.
3818
3819         Round the length of the scrollbar thumb instead of truncating it.
3820
3821         No new tests, fixes a mismatch between pixel results from DRT and WKTR.
3822         Change is covered by all existing tests with scrollbars run with low tolerance.
3823
3824         * platform/ScrollbarThemeComposite.cpp:
3825         (WebCore::ScrollbarThemeComposite::thumbLength):
3826
3827 2012-06-04  Anders Carlsson  <andersca@apple.com>
3828
3829         Fix an unused result warning when building with clang.
3830
3831         * platform/cf/BinaryPropertyList.cpp:
3832         (WebCore::BinaryPropertyListWriter::writePropertyList):
3833
3834 2012-06-04  Ami Fischman  <fischman@chromium.org>
3835
3836         Don't crash when re-parenting a removed HTMLMediaElement
3837         https://bugs.webkit.org/show_bug.cgi?id=88058
3838
3839         Reviewed by Eric Carlson.
3840
3841         Test: media/media-reparent.html
3842
3843         * html/HTMLMediaElement.cpp:
3844         (WebCore::HTMLMediaElement::userCancelledLoad): Clear the pending load flags because any pending load has been cancelled.
3845
3846 2012-06-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3847
3848         Unreviewed, rolling out r119421 and r119425.
3849         http://trac.webkit.org/changeset/119421
3850         http://trac.webkit.org/changeset/119425
3851         https://bugs.webkit.org/show_bug.cgi?id=88256
3852
3853         not reliable, let's have a do-over (Requested by kling on
3854         #webkit).
3855
3856         * dom/Element.cpp:
3857         (WebCore::Element::detachAttribute):
3858         (WebCore::Element::removeAttribute):
3859         (WebCore::Element::attributes):
3860         (WebCore::Element::setAttributeInternal):
3861         (WebCore::Element::parserSetAttributes):
3862         (WebCore::Element::hasEquivalentAttributes):
3863         (WebCore::Element::createAttributeData):
3864         (WebCore):
3865         (WebCore::Element::setAttributeNode):
3866         (WebCore::Element::removeAttributeNode):
3867         (WebCore::Element::getAttributeNode):
3868         (WebCore::Element::getAttributeNodeNS):
3869         (WebCore::Element::hasAttribute):
3870         (WebCore::Element::hasAttributeNS):
3871         (WebCore::Element::normalizeAttributes):
3872         (WebCore::Element::cloneAttributesFromElement):
3873         * dom/Element.h:
3874         (WebCore::Element::attributeData):
3875         (Element):
3876         (WebCore::Element::ensureAttributeData):
3877         (WebCore::Element::updatedAttributeData):
3878         (WebCore::Element::ensureUpdatedAttributeData):
3879         * dom/ElementAttributeData.cpp:
3880         (WebCore::ElementAttributeData::attrIfExists):
3881         (WebCore::ElementAttributeData::ensureAttr):
3882         (WebCore::ElementAttributeData::setAttr):
3883         (WebCore::ElementAttributeData::removeAttr):
3884         (WebCore::ElementAttributeData::setClass):
3885         (WebCore):
3886         (WebCore::ElementAttributeData::ensureInlineStyle):
3887         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
3888         (WebCore::ElementAttributeData::destroyInlineStyle):
3889         (WebCore::ElementAttributeData::addAttribute):
3890         (WebCore::ElementAttributeData::removeAttribute):
3891         (WebCore::ElementAttributeData::isEquivalent):
3892         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
3893         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
3894         (WebCore::ElementAttributeData::cloneDataFrom):
3895         (WebCore::ElementAttributeData::clearAttributes):
3896         (WebCore::ElementAttributeData::replaceAttribute):
3897         (WebCore::ElementAttributeData::getAttributeNode):
3898         * dom/ElementAttributeData.h:
3899         (WebCore::ElementAttributeData::create):
3900         (ElementAttributeData):
3901         (WebCore::ElementAttributeData::setIdForStyleResolution):
3902         (WebCore::ElementAttributeData::setAttributeStyle):
3903         (WebCore::ElementAttributeData::length):
3904         (WebCore::ElementAttributeData::isEmpty):
3905         (WebCore::ElementAttributeData::attributeItem):
3906         (WebCore::ElementAttributeData::getAttributeItem):
3907         (WebCore::ElementAttributeData::ElementAttributeData):
3908         (WebCore::ElementAttributeData::attributeVector):
3909         (WebCore::ElementAttributeData::clonedAttributeVector):
3910         (WebCore::ElementAttributeData::getAttributeItemIndex):
3911         * dom/StyledElement.cpp:
3912         (WebCore::StyledElement::style):
3913         (WebCore::StyledElement::classAttributeChanged):
3914         (WebCore::StyledElement::removeInlineStyleProperty):
3915         (WebCore::StyledElement::addSubresourceAttributeURLs):
3916         * html/parser/HTMLConstructionSite.cpp:
3917         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3918         * xml/parser/XMLDocumentParserQt.cpp:
3919         (WebCore::XMLDocumentParser::XMLDocumentParser):
3920
3921 2012-06-04  Andreas Kling  <kling@webkit.org>
3922
3923         Unreviewed build fixes for cr-android and Qt.
3924
3925         * dom/ElementAttributeData.h:
3926         (WebCore::ElementAttributeData::setClass):
3927         Change ElementAttributeData::setClass() to take an AtomicString instead of a String.
3928         The only call site has an AtomicString anyway.
3929         * xml/parser/XMLDocumentParserQt.cpp:
3930         (WebCore::XMLDocumentParser::XMLDocumentParser): Add missing const.
3931
3932 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3933
3934         [chromium] Fix software rendering for device-scale-factor > 1
3935         https://bugs.webkit.org/show_bug.cgi?id=88136
3936
3937         Reviewed by Darin Fisher.
3938
3939         Test: fast/hidpi/device-scale-factor-paint.html
3940
3941         * WebCore.exp.in:
3942         * testing/InternalSettings.cpp:
3943         (WebCore::InternalSettings::setDeviceScaleFactor):
3944         (WebCore):
3945         * testing/InternalSettings.h:
3946         (InternalSettings):
3947         * testing/InternalSettings.idl:
3948
3949 2012-06-04  Andreas Kling  <kling@webkit.org>
3950
3951         Make ElementAttributeData a variable-sized object to reduce memory use.
3952         <http://webkit.org/b/88240>
3953
3954         Reviewed by Antti Koivisto.
3955
3956         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
3957         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
3958         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
3959         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
3960
3961         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
3962         that nothing tries to mutate an element with a raw attribute array.
3963
3964         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
3965         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
3966
3967         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
3968         This is a 35% reduction in DOM attribute memory use.
3969
3970         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
3971         adding of "class" attributes. For more static pages, savings are even greater.
3972
3973         * dom/Element.cpp:
3974         (WebCore::Element::detachAttribute):
3975         (WebCore::Element::removeAttribute):
3976         (WebCore::Element::attributes):
3977         (WebCore::Element::setAttributeInternal):
3978         (WebCore::Element::parserSetAttributes):
3979         (WebCore::Element::hasEquivalentAttributes):
3980         (WebCore::Element::setAttributeNode):
3981         (WebCore::Element::removeAttributeNode):
3982         (WebCore::Element::getAttributeNode):
3983         (WebCore::Element::getAttributeNodeNS):
3984         (WebCore::Element::hasAttribute):
3985         (WebCore::Element::hasAttributeNS):
3986         (WebCore::Element::normalizeAttributes):
3987         (WebCore::Element::cloneAttributesFromElement):
3988         (WebCore::Element::createMutableAttributeData):
3989         * dom/Element.h:
3990         (WebCore::Element::attributeData):
3991         (Element):
3992         (WebCore::Element::updatedAttributeData):
3993         (WebCore::Element::ensureAttributeData):
3994         (WebCore::Element::ensureUpdatedAttributeData):
3995         (WebCore::Element::mutableAttributeData):
3996         * dom/ElementAttributeData.cpp:
3997         (WebCore::ElementAttributeData::createImmutable):
3998         (WebCore::ElementAttributeData::ElementAttributeData):
3999         (WebCore::ElementAttributeData::~ElementAttributeData):
4000         (WebCore::ElementAttributeData::attrIfExists):
4001         (WebCore::ElementAttributeData::ensureAttr):
4002         (WebCore::ElementAttributeData::setAttr):
4003         (WebCore::ElementAttributeData::removeAttr):
4004         (WebCore::ElementAttributeData::ensureInlineStyle):
4005         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
4006         (WebCore::ElementAttributeData::destroyInlineStyle):
4007         (WebCore::ElementAttributeData::addAttribute):
4008         (WebCore::ElementAttributeData::removeAttribute):
4009         (WebCore::ElementAttributeData::isEquivalent):
4010         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
4011         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
4012         (WebCore::ElementAttributeData::cloneDataFrom):
4013         (WebCore::ElementAttributeData::clearAttributes):
4014         (WebCore::ElementAttributeData::replaceAttribute):
4015         (WebCore::ElementAttributeData::getAttributeNode):
4016         * dom/ElementAttributeData.h:
4017         (ElementAttributeData):
4018         (WebCore::ElementAttributeData::setClass):
4019         (WebCore::ElementAttributeData::setIdForStyleResolution):
4020         (WebCore::ElementAttributeData::inlineStyle):
4021         (WebCore::ElementAttributeData::setAttributeStyle):
4022         (WebCore::ElementAttributeData::isMutable):
4023         (WebCore::ElementAttributeData::makeMutable):
4024         (WebCore::ElementAttributeData::length):
4025         (WebCore::ElementAttributeData::isEmpty):
4026         (WebCore::ElementAttributeData::array):
4027         (WebCore::ElementAttributeData::attributeItem):
4028         (WebCore::ElementAttributeData::getAttributeItem):
4029         (WebCore::ElementAttributeData::getAttributeItemIndex):
4030         * dom/StyledElement.cpp:
4031         (WebCore::StyledElement::style):
4032         (WebCore::StyledElement::classAttributeChanged):
4033         (WebCore::StyledElement::removeInlineStyleProperty):
4034         (WebCore::StyledElement::addSubresourceAttributeURLs):
4035         * html/parser/HTMLConstructionSite.cpp:
4036         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
4037         * xml/parser/XMLDocumentParserQt.cpp:
4038         (WebCore::XMLDocumentParser::XMLDocumentParser):
4039
4040 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
4041
4042         [chromium] Combobox options and autofill options should not be scaled for device-scale factor
4043         https://bugs.webkit.org/show_bug.cgi?id=87921
4044
4045         Reviewed by Darin Fisher.
4046
4047         Chrome takes care of scaling the combobox/autofill lists in the browser side. So it is not
4048         necessary to scale here. This change reverts parts of changes in r111539.
4049
4050         Manually tested with different scale factors.
4051
4052         * platform/chromium/PopupListBox.cpp:
4053         (WebCore::PopupListBox::paint):
4054         (WebCore::PopupListBox::paintRow):
4055         (WebCore::PopupListBox::getRowHeight):
4056         * platform/chromium/PopupListBox.h:
4057         (PopupContainerSettings):
4058         * platform/chromium/PopupMenuChromium.cpp:
4059         (WebCore::PopupMenuChromium::show):
4060         * rendering/RenderMenuList.cpp: