Update label for blacklisted plug-in
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-29  John Sullivan  <sullivan@apple.com>
2
3         Update label for blacklisted plug-in
4         https://bugs.webkit.org/show_bug.cgi?id=87767
5         rdar://problem/11550048
6         
7         Reviewed by Kevin Decker.
8
9         * English.lproj/Localizable.strings:
10         Regenerated.
11         
12         * platform/LocalizedStrings.cpp:
13         (WebCore::insecurePluginVersionText):
14         Changed this string.
15
16 2012-05-29  Julien Chaffraix  <jchaffraix@webkit.org>
17
18         REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout
19         https://bugs.webkit.org/show_bug.cgi?id=87536
20
21         Reviewed by Tony Chang.
22
23         Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html
24                fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html
25                fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html
26                fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html
27
28         The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately).
29         The issue is that we would count the borders and paddings twice for the border-box case which would lead
30         to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing.
31
32         * rendering/FixedTableLayout.cpp:
33         (WebCore::FixedTableLayout::calcWidthArray):
34         Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches
35         what RenderBox and the rendering code does generally. Also refactored the code to avoid the need
36         for local variables and make it more readable.
37
38 2012-05-25  Ojan Vafai  <ojan@chromium.org>
39
40         Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly
41         https://bugs.webkit.org/show_bug.cgi?id=58453
42
43         Reviewed by Tony Chang.
44
45         Test: css3/flexbox/align-absolute-child.html
46
47         * rendering/RenderFlexibleBox.cpp:
48         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
49         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
50         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
51         When adjusting positioned items, adjust their static position, not their location.
52         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
53         (WebCore::RenderFlexibleBox::flipForWrapReverse):
54         * rendering/RenderFlexibleBox.h:
55
56 2012-05-29  Abhishek Arya  <inferno@chromium.org>
57
58         Crash due to text fragment destruction when updating first-letter block.
59         https://bugs.webkit.org/show_bug.cgi?id=87751
60
61         Reviewed by Eric Seidel.
62
63         Test: fast/text/text-fragment-first-letter-update-crash.html
64
65         * rendering/RenderObject.cpp:
66         (WebCore::RenderObject::setStyle):
67
68 2012-05-29  David Hyatt  <hyatt@apple.com>
69
70         https://bugs.webkit.org/show_bug.cgi?id=87764
71         
72         Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock.
73         
74         Also stub out ensureColumnSets() and write a comment describing how it's going to work.
75
76         Reviewed by Anders Carlsson.
77
78         * rendering/RenderMultiColumnBlock.cpp:
79         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
80         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
81         (WebCore):
82         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
83         * rendering/RenderMultiColumnBlock.h:
84         (WebCore::RenderMultiColumnBlock::columnHeight):
85         (WebCore::RenderMultiColumnBlock::setColumnHeight):
86         (RenderMultiColumnBlock):
87
88 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
89
90         Unreviewed, rolling out r118620.
91         http://trac.webkit.org/changeset/118620
92         https://bugs.webkit.org/show_bug.cgi?id=87760
93
94         This patch causes regression to read an empty file/blob via
95         FileReader (Requested by jianli on #webkit).
96
97         * fileapi/FileReader.cpp:
98         (WebCore::FileReader::stringResult):
99
100 2012-05-29  Andreas Kling  <kling@webkit.org>
101
102         Make StylePropertySet a variable-sized object to reduce memory use.
103         <http://webkit.org/b/87506>
104
105         Reviewed by Antti Koivisto.
106
107         Make immutable StylePropertySet objects variable-sized and allocate exactly
108         the space needed to hold the CSSProperty objects passed at construction.
109         This lets us avoid the memory overhead of Vector<CSSProperty, 4>.
110
111         Renamed StylePropertySet::adopt* to create and createImmutable since they no
112         longer adopt the incoming vector. More cleanup will follow in this area.
113
114         This reduces memory usage across the board - the more CSS declarations,
115         the bigger the benefit. As an example, we save around ~0.5MB on wsj.com.
116
117         * css/CSSComputedStyleDeclaration.cpp:
118         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
119         * css/CSSParser.cpp:
120         (WebCore::CSSParser::createStylePropertySet):
121         * css/StylePropertySet.cpp:
122         (WebCore::StylePropertySet::createImmutable):
123         (WebCore::StylePropertySet::StylePropertySet):
124         (WebCore::StylePropertySet::~StylePropertySet):
125         (WebCore::StylePropertySet::copyPropertiesFrom):
126         (WebCore::StylePropertySet::removeProperty):
127         (WebCore::StylePropertySet::setProperty):
128         (WebCore::StylePropertySet::parseDeclaration):
129         (WebCore::StylePropertySet::addParsedProperties):
130         (WebCore::StylePropertySet::asText):
131         (WebCore::StylePropertySet::merge):
132         (WebCore::StylePropertySet::addSubresourceStyleURLs):
133         (WebCore::StylePropertySet::removePropertiesInSet):
134         (WebCore::StylePropertySet::findPropertyWithId):
135         (WebCore::StylePropertySet::removeEquivalentProperties):
136         (WebCore::StylePropertySet::copyPropertiesInSet):
137         (WebCore::StylePropertySet::averageSizeInBytes):
138         (SameSizeAsStylePropertySet):
139         (WebCore::StylePropertySet::append):
140         * css/StylePropertySet.h:
141         (WebCore::StylePropertySet::create):
142         (StylePropertySet):
143         (WebCore::StylePropertySet::propertyAt):
144         (WebCore::StylePropertySet::propertyCount):
145         (WebCore::StylePropertySet::isEmpty):
146         (WebCore::StylePropertySet::array):
147         * dom/StyledElement.cpp:
148         (WebCore::StyledElement::updateAttributeStyle):
149
150 2012-05-29  David Hyatt  <hyatt@apple.com>
151
152         https://bugs.webkit.org/show_bug.cgi?id=87759
153         
154         Pull the initial page logical height checking for columns into its own separate function. This
155         will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
156         effect of cleaning up layoutBlock even for the existing code.
157
158         Reviewed by Anders Carlsson.
159
160         * rendering/RenderBlock.cpp:
161         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
162         (WebCore):
163         (WebCore::RenderBlock::layoutBlock):
164         * rendering/RenderBlock.h:
165         (RenderBlock):
166
167 2012-05-29  Victor Carbune  <victor@rosedu.org>
168
169         Update cue event dispatching for zero and negative duration cues
170         https://bugs.webkit.org/show_bug.cgi?id=85143
171
172         Reviewed by Eric Carlson.
173
174         Updated existing test.
175
176         * html/HTMLMediaElement.cpp:
177         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly
178         treated event dispatching for zero and negative duration cues.
179         (WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't
180         handle invalid cues with intervals - negative cues need to be treated
181         as zero-length cues as they are always missed cues anyway.
182         (WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
183
184 2012-05-29  MORITA Hajime  <morrita@google.com>
185
186         ShadowRoot.getElementById() returns removed node.
187         https://bugs.webkit.org/show_bug.cgi?id=62184
188
189         Deregitration of m_elementsById map is done at Element::removedFrom()
190         But the tree scope of the removed node is already reset from a shadow root
191         to a document.
192
193         This change lookup the old shadow root through its parent node and
194         deregitrater the node against it.
195
196         Reviewed by Dimitri Glazkov.
197
198         Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html
199
200         * dom/Element.cpp:
201         (WebCore::treeScopeOfParent):
202         (WebCore):
203         (WebCore::Element::removedFrom):
204         * dom/Element.h:
205         (Element):
206         (WebCore::Element::updateId):
207         (WebCore):
208
209 2012-05-29  Dana Jansens  <danakj@chromium.org>
210
211         [chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect
212         https://bugs.webkit.org/show_bug.cgi?id=87677
213
214         Reviewed by Adrienne Walker.
215
216         When a contributing surface is visited, and we have not visited another
217         surface, then we know the surface is completely unoccluded. However, the
218         root scissor rect should still be applied, and anything outside of it
219         should be considered occluded.
220
221         Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor
222
223         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
224         (WebCore::RenderSurfaceChromium::targetRenderSurface):
225         (WebCore):
226         * platform/graphics/chromium/RenderSurfaceChromium.h:
227         (RenderSurfaceChromium):
228         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
229         (WebCore::::unoccludedContributingSurfaceContentRect):
230         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
231         (WebCore::CCRenderSurface::targetRenderSurface):
232         (WebCore):
233         * platform/graphics/chromium/cc/CCRenderSurface.h:
234         (CCRenderSurface):
235
236 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
237
238         [BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl
239         https://bugs.webkit.org/show_bug.cgi?id=87706
240
241         Reviewed by Antonio Gomes.
242
243         Because we use authentication callback mechanism of libcurl,
244         which will take care of all the authentication communication
245         between UA and server, so the only thing we need to do is to
246         provide credential information when authentication callback
247         is triggered. By using this we don't need to process
248         intermediate headers for each http authentication scheme.
249
250         Implemented interface function notifyAuthReceived() in
251         NetworkJob to handle the authentication notification from
252         networking thread.
253         When the authentication callback is triggered, we should
254         cancel the current loading request and restart a new one with
255         credential information attached which comes from
256         credentialStorage or user input.
257
258         Internally reviewed by Joe Mason <jmason@rim.com>.
259
260         No new tests since there is no behavior change.
261
262         * platform/network/blackberry/NetworkJob.cpp:
263         (WebCore::NetworkJob::notifyAuthReceived):
264         (WebCore):
265         (WebCore::NetworkJob::handleNotifyHeaderReceived):
266         (WebCore::NetworkJob::sendRequestWithCredentials):
267         * platform/network/blackberry/NetworkJob.h:
268         (NetworkJob):
269
270 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
271
272         [BlackBerry] http authentication challenge issue when loading subresource
273         https://bugs.webkit.org/show_bug.cgi?id=87660
274
275         Reviewed by Rob Buis.
276
277         We should try to store the credential information as soon as we
278         receive http status notification which indicates that the
279         authentication succeeds, instead of storing credentials when the
280         main resource receives notify done which is too late for loading
281         subresource.
282
283         Internally reviewed by Joe Mason <jmason@rim.com>
284
285         No new tests since there is no change in behavior.
286
287         * platform/network/blackberry/NetworkJob.cpp:
288         (WebCore::NetworkJob::handleNotifyStatusReceived):
289         (WebCore::NetworkJob::handleNotifyClose):
290
291 2012-05-29  Alexey Proskuryakov  <ap@apple.com>
292
293         [Mac] Move DefaultFonts.plist to C++ code
294         https://bugs.webkit.org/show_bug.cgi?id=87560
295         <rdar://problem/11466119>
296
297         Reviewed by Dan Bernstein.
298
299         * DerivedSources.make:
300         * Resources/DefaultFonts.plist.in: Removed.
301         * WebCore.xcodeproj/project.pbxproj:
302         * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
303         Instead of having a separate configuration file, just hardcode the settings in C++.
304
305 2012-05-29  Alexei Filippov  <alexeif@chromium.org>
306
307         Web Inspector: Retainers are missing for all objects
308         https://bugs.webkit.org/show_bug.cgi?id=87655
309
310         Reviewed by Yury Semikhatsky.
311
312         * inspector/front-end/HeapSnapshotDataGrids.js:
313         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
314
315 2012-05-29  Philippe Normand  <pnormand@igalia.com>
316
317         [GStreamer] Video sink doesn't respect WebKit code style
318         https://bugs.webkit.org/show_bug.cgi?id=87693
319
320         Reviewed by Alexis Menard.
321
322         No change in behavior of the sink, this patch only adapts the code
323         style to WebKit's.
324
325         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
326         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
327         (_WebKitVideoSinkPrivate):
328         (webkitVideoSinkTimeoutCallback):
329         (webkitVideoSinkRender):
330         (webkitVideoSinkDispose):
331         (unlockBufferMutex):
332         (webkitVideoSinkUnlock):
333         (webkitVideoSinkUnlockStop):
334         (webkitVideoSinkStop):
335         (webkitVideoSinkStart):
336         (webkitVideoSinkMarshalVoidAndMiniObject):
337         (webkit_video_sink_class_init):
338         (webkitVideoSinkNew):
339         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
340         (_WebKitVideoSink):
341         (_WebKitVideoSinkClass):
342
343 2012-05-29  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
344
345         [Qt] Uninitialized shader compiler when GLES is used
346         https://bugs.webkit.org/show_bug.cgi?id=87712
347
348         The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization
349         of shader compiler to compile shader codes for ES-platforms as well.
350
351         Reviewed by Noam Rosenthal.
352
353         * platform/graphics/qt/GraphicsContext3DQt.cpp:
354         (WebCore::GraphicsContext3D::GraphicsContext3D):
355
356 2012-05-29  Taiju Tsuiki  <tzik@chromium.org>
357
358         Add InspectorFileSystemAgent::FrontendProvider
359         https://bugs.webkit.org/show_bug.cgi?id=87635
360
361         InspectorFileSystemAgent needs weak reference to its frontend to perform
362         asynchronous operation.
363
364         Reviewed by Yury Semikhatsky.
365
366         * inspector/InspectorFileSystemAgent.cpp:
367         (InspectorFileSystemAgent::FrontendProvider):
368         (WebCore):
369         (WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent):
370         (WebCore::InspectorFileSystemAgent::enable):
371         (WebCore::InspectorFileSystemAgent::disable):
372         (WebCore::InspectorFileSystemAgent::setFrontend):
373         (WebCore::InspectorFileSystemAgent::clearFrontend):
374         (WebCore::InspectorFileSystemAgent::restore):
375         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
376         * inspector/InspectorFileSystemAgent.h:
377         (InspectorFileSystemAgent):
378
379 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
380
381         REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection
382         https://bugs.webkit.org/show_bug.cgi?id=87614
383
384         Reviewed by Kent Tamura.
385
386         This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl
387         methods which was implemented in HTMLFormControlElement at r109729 and
388         updates CSS pseudo class checker to check "optgroup" element.
389
390         Tests: fast/forms/select/optgroup-clicking.html
391                fast/forms/select/optgroup-disabled.html
392                fast/forms/select/optgroup-rendering.html
393
394         * css/SelectorChecker.cpp:
395         (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. 
396         We checked tag name "optgroup" in addition isFormControlElement.
397         * css/StyleResolver.cpp:
398         (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled.
399         * html/HTMLOptGroupElement.cpp:
400         (WebCore::HTMLOptGroupElement::disabled): Added.
401         * html/HTMLOptGroupElement.h:
402         (HTMLOptGroupElement): Added isEnabledFormControl.
403
404 2012-05-29  Alexander Pavlov  <apavlov@chromium.org>
405
406         [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
407         https://bugs.webkit.org/show_bug.cgi?id=87735
408
409         Reviewed by Kent Tamura.
410
411         This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
412
413         No new tests, as popups are not testable in Chromium.
414
415         * platform/chromium/PopupContainer.cpp:
416         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
417
418 2012-05-29  Andrei Bucur  <abucur@adobe.com>
419
420         [CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset
421         https://bugs.webkit.org/show_bug.cgi?id=87491
422
423         This patch updates the CSSOM property name overflow to overset. There are no changes in functionality.
424         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
425
426         Reviewed by Andreas Kling.
427
428         Test: fast/regions/webkit-named-flow-overset.html
429
430         * dom/WebKitNamedFlow.cpp:
431         (WebCore::WebKitNamedFlow::overset):
432         * dom/WebKitNamedFlow.h:
433         (WebKitNamedFlow):
434         * dom/WebKitNamedFlow.idl:
435         * rendering/RenderFlowThread.cpp:
436         (WebCore::RenderFlowThread::RenderFlowThread):
437         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
438         * rendering/RenderFlowThread.h:
439
440 2012-05-29  Andreas Kling  <kling@webkit.org>
441
442         Give StylePropertySet a proper mutability flag.
443         <http://webkit.org/b/87675>
444
445         Reviewed by Antti Koivisto.
446
447         Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects
448         constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable.
449         This is clean-up and prep work for implementing a more efficient storage scheme for immutable
450         StylePropertySets (fixed-size array instead of vector) as the vast majority of them are
451         unlikely to ever mutate during their lifetime.
452
453         Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify
454         an immutable object.
455
456         Also made properties() const on StyleRule and friends, which brought some additional code
457         churn along with it.
458
459         * css/CSSComputedStyleDeclaration.cpp:
460         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
461         * css/CSSFontFaceRule.cpp:
462         (WebCore::CSSFontFaceRule::style):
463         (WebCore::CSSFontFaceRule::reattach):
464         * css/CSSFontFaceSrcValue.cpp:
465         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
466         * css/CSSFontFaceSrcValue.h:
467         (CSSFontFaceSrcValue):
468         * css/CSSPageRule.cpp:
469         (WebCore::CSSPageRule::style):
470         (WebCore::CSSPageRule::reattach):
471         * css/CSSPrimitiveValue.cpp:
472         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
473         * css/CSSPrimitiveValue.h:
474         (CSSPrimitiveValue):
475         * css/CSSReflectValue.cpp:
476         (WebCore::CSSReflectValue::addSubresourceStyleURLs):
477         * css/CSSReflectValue.h:
478         (CSSReflectValue):
479         * css/CSSStyleRule.cpp:
480         (WebCore::CSSStyleRule::style):
481         (WebCore::CSSStyleRule::reattach):
482         * css/CSSValue.cpp:
483         (WebCore::CSSValue::addSubresourceStyleURLs):
484         * css/CSSValue.h:
485         (CSSValue):
486         * css/CSSValueList.cpp:
487         (WebCore::CSSValueList::addSubresourceStyleURLs):
488         * css/CSSValueList.h:
489         (CSSValueList):
490         * css/StylePropertySet.cpp:
491         (WebCore::StylePropertySet::StylePropertySet):
492         (WebCore::StylePropertySet::setCSSParserMode):
493         (WebCore):
494         (WebCore::StylePropertySet::copyPropertiesFrom):
495         (WebCore::StylePropertySet::removeShorthandProperty):
496         (WebCore::StylePropertySet::removeProperty):
497         (WebCore::StylePropertySet::setProperty):
498         (WebCore::StylePropertySet::parseDeclaration):
499         (WebCore::StylePropertySet::addParsedProperties):
500         (WebCore::StylePropertySet::addParsedProperty):
501         (WebCore::StylePropertySet::merge):
502         (WebCore::StylePropertySet::addSubresourceStyleURLs):
503         (WebCore::StylePropertySet::removePropertiesInSet):
504         (WebCore::StylePropertySet::findPropertyWithId):
505         (WebCore::StylePropertySet::removeEquivalentProperties):
506         (WebCore::StylePropertySet::copyPropertiesInSet):
507         * css/StylePropertySet.h:
508         (WebCore::StylePropertySet::adopt):
509         (WebCore::StylePropertySet::adoptMutable):
510         (StylePropertySet):
511         (WebCore::StylePropertySet::isMutable):
512         * css/StyleResolver.cpp:
513         (WebCore::StyleResolver::addMatchedProperties):
514         (WebCore::StyleResolver::collectMatchingRulesForList):
515         * css/StyleResolver.h:
516         (StyleResolver):
517         * css/StyleRule.cpp:
518         (WebCore::StyleRule::mutableProperties):
519         (WebCore):
520         (WebCore::StyleRulePage::mutableProperties):
521         (WebCore::StyleRuleFontFace::mutableProperties):
522         * css/StyleRule.h:
523         (WebCore::StyleRule::properties):
524         (StyleRule):
525         (WebCore::StyleRuleFontFace::properties):
526         (StyleRuleFontFace):
527         (WebCore::StyleRulePage::properties):
528         (StyleRulePage):
529         * dom/ElementAttributeData.cpp:
530         (WebCore::ElementAttributeData::ensureInlineStyle):
531         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
532         * editing/EditingStyle.cpp:
533         (WebCore::styleFromMatchedRulesForElement):
534         * svg/SVGFontFaceElement.cpp:
535         (WebCore::SVGFontFaceElement::parseAttribute):
536         (WebCore::SVGFontFaceElement::rebuildFontFace):
537         (WebCore::SVGFontFaceElement::removedFrom):
538
539 2012-05-29  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
540
541         [EFL] Refactoring. Get rid of unnecessary singleCharacterString() function
542         https://bugs.webkit.org/show_bug.cgi?id=87654
543
544         Reviewed by Csaba Osztrogonác.
545
546         Evas key events already provide key string, so no practical need for singleCharacterString() 
547         evaluating the event string from keyname.
548         Modified code related functionality is already covered with fast/events and fast/forms tests.
549
550         * platform/efl/EflKeyboardUtilities.cpp:
551         * platform/efl/PlatformKeyboardEventEfl.cpp:
552         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
553
554 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
555
556         Unreviewed: Web Inspector: single line fix after r118742.
557
558         * inspector/front-end/HeapSnapshotView.js:
559         (WebInspector.HeapProfileHeader.prototype.saveToFile):
560
561 2012-05-29  Kentaro Hara  <haraken@chromium.org>
562
563         Remove m_rootNode and m_selectorChecker from SelectorQuery.h
564         https://bugs.webkit.org/show_bug.cgi?id=87650
565
566         Reviewed by Antti Koivisto.
567
568         To avoid parsing CSS selectors every time, I am planning to cache
569         SelectorQuery objects into a HashMap, which will be defined in
570         Node::querySelector(). To make the size of SelectorQuery small,
571         this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h.
572
573         Tests: fast/dom/SelectorAPI/*. No change in test results.
574
575         * dom/Node.cpp:
576         (WebCore::Node::querySelector):
577         (WebCore::Node::querySelectorAll):
578         * dom/SelectorQuery.cpp:
579         (WebCore::SelectorQuery::SelectorQuery):
580         (WebCore):
581         (WebCore::SelectorQuery::queryAll):
582         (WebCore::SelectorQuery::queryFirst):
583         * dom/SelectorQuery.h:
584         (SelectorQuery):
585
586 2012-05-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
587
588         Web Inspector: Tabbed Settings Screen
589         https://bugs.webkit.org/show_bug.cgi?id=87497
590
591         Reviewed by Yury Semikhatsky.
592
593         Combine settings screen and shortcuts screen
594         to a single tabbed settings screen.
595         This will make shortcuts screen more discoverable.
596
597         * inspector/front-end/HelpScreen.js:
598         (WebInspector.HelpScreen): Make titled tamplate optional.
599         (WebInspector.HelpScreen.prototype._createCloseButton): Extract method.
600         * inspector/front-end/SettingsScreen.js:
601         (WebInspector.SettingsScreen): Split initialization and UI construction.
602         (WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection):
603         (WebInspector.SettingsScreen.prototype._createSettingsTabView):
604         Extract GUI construction method.
605         (WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane):
606         Make GUI construction lazy.
607         (WebInspector.SettingsScreen.prototype.selectTab):
608         Add method for external tab swithching.
609         (WebInspector.SettingsScreen.prototype.wasShown):
610         Make GUI construction lazy.
611         (WebInspector.SettingsScreenTabbedPane):
612         Extend class to access protected member.
613         (WebInspector.SettingsController.prototype._buttonClicked):
614         Change "showSettingsScreen" visibility and parameters.
615         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
616         Preserve settings screen state.
617         (WebInspector.SettingsController.prototype.showSettingsScreen):
618         Change method visibility and parameters.
619         * inspector/front-end/ShortcutsScreen.js:
620         (WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen.
621         (WebInspector.ShortcutsScreen.prototype._createShortcutsTabView):
622         Refactoring of GUI construction.
623         (WebInspector.ShortcutsSection.prototype.renderSection):
624         Ditto.
625         * inspector/front-end/helpScreen.css:
626         (.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings.
627         (.help-window-main ::-webkit-resizer): Ditto.
628         (.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto.
629         (.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto.
630         (.help-window-main ::-webkit-scrollbar-track:vertical): Ditto.
631         (body:not(.compact) #settings-screen .tabbed-pane): Fix container height.
632         (#settings-screen .tabbed-pane-header): Ditto.
633         (#settings-screen .tabbed-pane-header-tabs): Adjust spacing.
634         (#settings-screen .tabbed-pane-header-tab): Adjust style.
635         (#settings-screen .help-close-button): Adjust spacing.
636         (#settings-screen .tabbed-pane-header-tab.selected):
637         Erase line below active tab.
638         (#settings-screen .tabbed-pane-content): Adjust spacing.
639         (#settings-screen .help-content): Ditto.
640         * inspector/front-end/inspector.js:
641         (WebInspector.documentKeyDown): Use Settings screen to show shortcuts.
642
643 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
644
645         Web Inspector: REGRESSION: load heap snapshot doesn't work.
646         https://bugs.webkit.org/show_bug.cgi?id=87642
647
648         HeapSnapshotReceiver interface was introduced.
649         It declares the API for HeapSnapshotLoader, HeapSnapshotLoaderProxy and HeapSnapshotSaveToFileReceiver.
650         The HeapProfileHeader was refactored and tests were added.
651
652         Reviewed by Yury Semikhatsky.
653
654         * inspector/front-end/HeapSnapshotLoader.js:
655         (WebInspector.HeapSnapshotLoader):
656         (WebInspector.HeapSnapshotLoader.prototype.startLoading):
657         (WebInspector.HeapSnapshotLoader.prototype.dispose):
658         (WebInspector.HeapSnapshotLoader.prototype._reset):
659         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
660         * inspector/front-end/HeapSnapshotProxy.js:
661         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
662         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
663         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
664         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
665         * inspector/front-end/HeapSnapshotView.js:
666         (WebInspector.HeapSnapshotReceiver):
667         (WebInspector.HeapSnapshotReceiver.prototype.startLoading):
668         (WebInspector.HeapSnapshotReceiver.prototype.pushJSONChunk):
669         (WebInspector.HeapSnapshotReceiver.prototype.finishLoading):
670         (WebInspector.HeapSnapshotReceiver.prototype.dispose):
671         (WebInspector.HeapProfileHeader):
672         (WebInspector.HeapProfileHeader.prototype.load):
673         (WebInspector.HeapProfileHeader.prototype._setupWorker):
674         (WebInspector.HeapProfileHeader.prototype.dispose):
675         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate):
676         (WebInspector.HeapProfileHeader.prototype.pushJSONChunk):
677         (WebInspector.HeapProfileHeader.prototype._parsed):
678         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
679         (WebInspector.HeapProfileHeader.prototype.saveToFile):
680         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
681         (WebInspector.HeapProfileHeader.prototype.loadFromFile):
682         (WebInspector.HeapProfileHeader.prototype._loadNextChunk):
683         (WebInspector.HeapProfileHeader.prototype._nextChunkLoaded):
684         (WebInspector.HeapProfileHeader.prototype._createFileReader):
685         (WebInspector.HeapSnapshotSaveToFileReceiver):
686         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.startLoading):
687         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.pushJSONChunk):
688         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.finishLoading):
689         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.dispose):
690         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._startSavingSnapshot):
691         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._saveStatusUpdate):
692         * inspector/front-end/ProfilesPanel.js:
693         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement.onChange):
694         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
695         (WebInspector.ProfilesPanel.prototype._loadFromFile):
696
697 2012-05-29  Eric Seidel  <eric@webkit.org>
698
699         Add HTMLIFrameElement.seamless property accessor now that seamless is enabled and works
700         https://bugs.webkit.org/show_bug.cgi?id=87708
701
702         Reviewed by Adam Barth.
703
704         Lots of tests in fast/frames/seamless cover this property.
705
706         * html/HTMLIFrameElement.idl:
707
708 2012-05-29  Kentaro Hara  <haraken@chromium.org>
709
710         [Performance] Optimize querySelector() and querySelectorAll() by removing
711         redundant dummy style sheet creations
712         https://bugs.webkit.org/show_bug.cgi?id=87627
713
714         Reviewed by Antti Koivisto.
715
716         This patch improves performance of querySelector("#id") by 4.2% ~ 17.7%
717         in Safari and Chromium.
718
719         Performance tests: https://bugs.webkit.org/attachment.cgi?id=144288
720
721         The performance test results in my desktop:
722
723         [Safari/Mac]
724         document.querySelector("#headId") :               13.60 ms =>  12.40 ms  +9.68%
725         document.querySelector("#duplicatedId") :         14.80 ms =>  14.20 ms  +4.23%
726         document.querySelector("#tailId") :               13.80 ms =>  12.20 ms  +13.11%
727         document.querySelectorAll("#headId") :            17.80 ms =>  14.60 ms  +21.92%
728         document.querySelectorAll("#duplicatedId") :     513.80 ms => 471.60 ms  +8.95%
729         document.querySelectorAll("#tailId") :            19.20 ms =>  16.40 ms  +17.07%
730         document.querySelector("h1") :                    14.40 ms =>  13.60 ms  +5.88%
731         document.querySelector("h2") :                    14.80 ms =>  13.80 ms  +7.25%
732         document.querySelector("h3") :                   312.00 ms => 306.60 ms  +1.76%
733         document.querySelectorAll("h1") :                322.00 ms => 314.60 ms  +2.35%
734         document.querySelectorAll("h2") :                481.00 ms => 420.60 ms  +14.36%
735         document.querySelectorAll("h3") :                326.80 ms => 315.80 ms  +3.48%
736         document.querySelector(".headClass") :            16.20 ms =>  15.40 ms  +5.19%
737         document.querySelector(".duplicatedClass") :      17.00 ms =>  15.40 ms  +10.39%
738         document.querySelector(".tailClass") :           369.60 ms => 362.60 ms  +1.93%
739         document.querySelectorAll(".headClass") :        388.20 ms => 377.60 ms  +2.81%
740         document.querySelectorAll(".duplicatedClass") :  605.00 ms => 581.20 ms  +4.09%
741         document.querySelectorAll(".tailClass") :        401.60 ms => 391.40 ms  +2.61%
742
743         [Chromium/Linux]
744         ocument.querySelector("#headId") :                16.00 ms =>  13.60 ms  +17.65%
745         document.querySelector("#duplicatedId") :         16.80 ms =>  15.40 ms  +9.09%
746         document.querySelector("#tailId") :               16.00 ms =>  13.60 ms  +17.65%
747         document.querySelectorAll("#headId") :            29.00 ms =>  25.00 ms  +16.00%
748         document.querySelectorAll("#duplicatedId") :     561.40 ms => 505.20 ms  +11.12%
749         document.querySelectorAll("#tailId") :            34.00 ms =>  26.80 ms  +26.87%
750         document.querySelector("h1") :                    18.20 ms =>  15.80 ms  +15.19%
751         document.querySelector("h2") :                    19.00 ms =>  16.60 ms  +14.46%
752         document.querySelector("h3") :                   280.40 ms => 274.00 ms  +2.34%
753         document.querySelectorAll("h1") :                300.20 ms => 365.20 ms  -17.80%
754         document.querySelectorAll("h2") :                487.60 ms => 504.20 ms  -3.29%
755         document.querySelectorAll("h3") :                349.40 ms => 324.00 ms  +7.84%
756         document.querySelector(".headClass") :            18.40 ms =>  16.00 ms  +15.00%
757         document.querySelector(".duplicatedClass") :      19.40 ms =>  16.20 ms  +19.75%
758         document.querySelector(".tailClass") :           349.60 ms => 345.40 ms  +1.22%
759         document.querySelectorAll(".headClass") :        382.80 ms => 378.20 ms  +1.22%
760         document.querySelectorAll(".duplicatedClass") :  550.80 ms => 574.20 ms  -4.08%
761         document.querySelectorAll(".tailClass") :        381.00 ms => 387.00 ms  -1.55%
762
763         I've found that StyleSheetInternal::create() in CSSParser::parseSelector()
764         is a bottleneck of querySelector() and querySelectorAll().
765
766         void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorList)
767         {
768             RefPtr<StyleSheetInternal> dummyStyleSheet = StyleSheetInternal::create();
769             setStyleSheet(dummyStyleSheet.get());
770             ...;
771         }
772
773         This patch removes a dummy style sheet. Previously the dummy style sheet
774         was needed to avoid null checks of m_styleSheet in CSSGrammer.y.
775         This patch fixes CSSGrammer.y so that it works fine with a null m_styleSheet.
776
777         Tests: fast/dom/SelectorAPI/*. No change in the test results.
778
779         * css/CSSGrammar.y:
780         * css/CSSParser.cpp:
781         (WebCore::CSSParser::parseSelector):
782
783 2012-05-29  Nikolas Zimmermann  <nzimmermann@rim.com>
784
785         SVGViewSpec DOM bindings aka SVGSVGElement.currentView is unimplemented
786         https://bugs.webkit.org/show_bug.cgi?id=15495
787
788         Reviewed by Rob Buis.
789
790         Finish SVGViewSpec implementation and expose it to the Web. Numerous smaller bugs are fixed:
791         - SVGViewSpec and all of its contents should be read-only. Enforce that and test it.
792           Add a new enum to SVGPropertyInfo so that each SVGAnimatedProperty knows if its content is supposed to be read-write or read-only.
793         - Make the 'transform' attribute of SVGViewSpec exposable by switching to a SVGTransformListProperty - it can now be accessed from JS.
794         - Assure that following XXXString methods are in sync with the corresponding SVG DOM interfaces
795             readonly attribute DOMString viewBoxString;
796             readonly attribute DOMString preserveAspectRatioString;
797             readonly attribute DOMString transformString;
798             readonly attribute DOMString viewTargetString;
799         - Cleanup code in svg/properties that was intended to handle SVGViewSpec. Turns out lot of the complexity was unncessary, and can be removed.
800         - Move SVGFitToViewBox to the same pattern SVGZoomAndPan uses since two days, that avoids any virtual function calls for attribute parsing.
801         - Create/expose ObjectiveC/JS bindings for SVGViewSpec.
802         - Enable SVGViewSpec constructor.
803
804         Tests: svg/custom/linking-a-03-b-all-expected.svg
805                svg/dom/SVGViewSpec-defaults.html
806                svg/dom/SVGViewSpec.html
807                svg/dom/complex-svgView-specification.html
808                svg/dom/viewspec-parser.html
809
810         * CMakeLists.txt:
811         * DerivedSources.cpp:
812         * DerivedSources.make:
813         * DerivedSources.pri:
814         * GNUmakefile.list.am:
815         * Target.pri:
816         * WebCore.gyp/WebCore.gyp:
817         * WebCore.gypi:
818         * WebCore.order:
819         * WebCore.vcproj/WebCore.vcproj:
820         * WebCore.xcodeproj/project.pbxproj:
821         * bindings/js/JSSVGLengthCustom.cpp:
822         (WebCore::JSSVGLength::setValue):
823         (WebCore::JSSVGLength::convertToSpecifiedUnits):
824         * bindings/objc/DOMSVG.h:
825         * bindings/scripts/CodeGeneratorJS.pm:
826         (GenerateImplementation):
827         (NativeToJSValue):
828         * bindings/scripts/CodeGeneratorObjC.pm:
829         (GenerateImplementation):
830         * bindings/scripts/CodeGeneratorV8.pm:
831         (GenerateNormalAttrGetter):
832         (GenerateNormalAttrSetter):
833         (GenerateFunctionCallback):
834         * bindings/v8/custom/V8SVGLengthCustom.cpp:
835         (WebCore::V8SVGLength::valueAccessorSetter):
836         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
837         * page/DOMWindow.idl:
838         * rendering/svg/RenderSVGResourcePattern.cpp:
839         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
840         * svg/SVGFitToViewBox.cpp:
841         * svg/SVGFitToViewBox.h:
842         (SVGFitToViewBox):
843         (WebCore::SVGFitToViewBox::parseAttribute):
844         * svg/SVGMarkerElement.cpp:
845         (WebCore::SVGMarkerElement::orientTypePropertyInfo):
846         (WebCore::SVGMarkerElement::parseAttribute):
847         (WebCore::SVGMarkerElement::synchronizeOrientType):
848         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
849         * svg/SVGPathElement.cpp:
850         (WebCore::SVGPathElement::dPropertyInfo):
851         (WebCore::SVGPathElement::svgAttributeChanged):
852         (WebCore::SVGPathElement::pathByteStream):
853         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
854         (WebCore::SVGPathElement::synchronizeD):
855         * svg/SVGPathSegWithContext.h:
856         (WebCore::SVGPathSegWithContext::animatedProperty):
857         * svg/SVGPatternElement.cpp:
858         (WebCore::SVGPatternElement::parseAttribute):
859         * svg/SVGPolyElement.cpp:
860         (WebCore::SVGPolyElement::pointsPropertyInfo):
861         (WebCore::SVGPolyElement::parseAttribute):
862         (WebCore::SVGPolyElement::synchronizePoints):
863         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
864         * svg/SVGRect.h:
865         * svg/SVGSVGElement.cpp:
866         (WebCore::SVGSVGElement::~SVGSVGElement):
867         (WebCore::SVGSVGElement::currentView):
868         (WebCore::SVGSVGElement::parseAttribute):
869         (WebCore::SVGSVGElement::currentViewBoxRect):
870         (WebCore::SVGSVGElement::viewBoxToViewTransform):
871         (WebCore::SVGSVGElement::setupInitialView):
872         (WebCore::SVGSVGElement::inheritViewAttributes):
873         * svg/SVGSVGElement.h:
874         (SVGSVGElement):
875         * svg/SVGSVGElement.idl:
876         * svg/SVGSymbolElement.cpp:
877         (WebCore::SVGSymbolElement::parseAttribute):
878         * svg/SVGTests.cpp:
879         (WebCore::SVGTests::requiredFeaturesPropertyInfo):
880         (WebCore::SVGTests::requiredExtensionsPropertyInfo):
881         (WebCore::SVGTests::systemLanguagePropertyInfo):
882         (WebCore::SVGTests::synchronizeRequiredFeatures):
883         (WebCore::SVGTests::synchronizeRequiredExtensions):
884         (WebCore::SVGTests::synchronizeSystemLanguage):
885         * svg/SVGTextContentElement.cpp:
886         (WebCore::SVGTextContentElement::textLengthPropertyInfo):
887         (WebCore::SVGTextContentElement::synchronizeTextLength):
888         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
889         * svg/SVGViewElement.cpp:
890         (WebCore::SVGViewElement::parseAttribute):
891         * svg/SVGViewElement.h:
892         * svg/SVGViewSpec.cpp:
893         (WebCore::SVGViewSpec::viewBoxPropertyInfo):
894         (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
895         (WebCore::SVGViewSpec::transformPropertyInfo):
896         (WebCore::SVGViewSpec::SVGViewSpec):
897         (WebCore::SVGViewSpec::viewBoxIdentifier):
898         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
899         (WebCore::SVGViewSpec::transformIdentifier):
900         (WebCore::SVGViewSpec::setZoomAndPan):
901         (WebCore::SVGViewSpec::setTransformString):
902         (WebCore::SVGViewSpec::transformString):
903         (WebCore::SVGViewSpec::viewBoxString):
904         (WebCore::SVGViewSpec::preserveAspectRatioString):
905         (WebCore::SVGViewSpec::viewTarget):
906         (WebCore::SVGViewSpec::transform):
907         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
908         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
909         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
910         (WebCore::SVGViewSpec::reset):
911         (WebCore::SVGViewSpec::parseViewSpec):
912         * svg/SVGViewSpec.h:
913         (WebCore::SVGViewSpec::~SVGViewSpec):
914         (SVGViewSpec):
915         (WebCore::SVGViewSpec::create):
916         (WebCore::SVGViewSpec::setViewTargetString):
917         (WebCore::SVGViewSpec::setZoomAndPan):
918         (WebCore::SVGViewSpec::contextElement):
919         (WebCore::SVGViewSpec::resetContextElement):
920         (WebCore::SVGViewSpec::transformBaseValue):
921         (WebCore::SVGViewSpec::viewBoxAnimated):
922         (WebCore::SVGViewSpec::viewBox):
923         (WebCore::SVGViewSpec::viewBoxBaseValue):
924         (WebCore::SVGViewSpec::setViewBoxBaseValue):
925         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
926         (WebCore::SVGViewSpec::preserveAspectRatio):
927         (WebCore::SVGViewSpec::preserveAspectRatioBaseValue):
928         (WebCore::SVGViewSpec::setPreserveAspectRatioBaseValue):
929         * svg/SVGViewSpec.idl:
930         * svg/properties/SVGAnimatedProperty.h:
931         (WebCore::SVGAnimatedProperty::isReadOnly):
932         (WebCore::SVGAnimatedProperty::setIsReadOnly):
933         (SVGAnimatedProperty):
934         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
935         (WebCore::SVGAnimatedProperty::lookupWrapper):
936         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
937         * svg/properties/SVGAnimatedPropertyMacros.h:
938         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
939         (SVGSynchronizableAnimatedProperty):
940         * svg/properties/SVGAnimatedPropertySynchronizer.h: Removed.
941         * svg/properties/SVGAttributeToPropertyMap.h:
942         * svg/properties/SVGListProperty.h:
943         * svg/properties/SVGListPropertyTearOff.h:
944         (SVGListPropertyTearOff):
945         (WebCore::SVGListPropertyTearOff::isReadOnly):
946         * svg/properties/SVGPathSegListPropertyTearOff.h:
947         (SVGPathSegListPropertyTearOff):
948         (WebCore::SVGPathSegListPropertyTearOff::isReadOnly):
949         * svg/properties/SVGProperty.h:
950         (SVGProperty):
951         * svg/properties/SVGPropertyInfo.h:
952         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
953         (SVGPropertyInfo):
954         * svg/properties/SVGPropertyTearOff.h:
955         (WebCore::SVGPropertyTearOff::isReadOnly):
956         * svg/properties/SVGStaticListPropertyTearOff.h:
957         (SVGStaticListPropertyTearOff):
958         (WebCore::SVGStaticListPropertyTearOff::isReadOnly):
959
960 2012-05-29  Kent Tamura  <tkent@chromium.org>
961
962         REGRESSION (r90971): the cursor is painted “behind” the placeholder text
963         https://bugs.webkit.org/show_bug.cgi?id=87155
964
965         Reviewed by Hajime Morita.
966
967         This regression happened only on platforms on which
968         RenderTheme::shouldShowPlaceholderWhenFocused() returns true.
969
970         Because the order of renderers for the editable node and the placeholder
971         node was:
972          - A renderer for the editable node
973          - A renderer for the placeholder node,
974         The text caret was painted, then the palceholder was painted.
975
976         We should not use z-index in the built-in shadow nodes. So the patch
977         fixes this bug by re-ordering these renderers.
978
979         Tests: fast/forms/input-placeholder-paint-order-2.html
980                fast/forms/input-placeholder-paint-order.html
981                fast/forms/textarea/textarea-placeholder-paint-order-2.html
982                fast/forms/textarea/textarea-placeholder-paint-order.html
983
984         * html/HTMLTextFormControlElement.cpp:
985         (WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
986         Added. Reorder the order of renderers so that the placeholder renderer
987         precedes the inner text renderer.
988         * html/HTMLTextFormControlElement.h: Add fixPlaceholderRenderer() declaration.
989
990         * html/HTMLTextAreaElement.cpp:
991         (WebCore::HTMLTextAreaElement::attach): Calls fixPlaceholderRenderer().
992         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
993         ditto. Also, use innerTextElement() to improvde code readability.
994         * html/HTMLTextAreaElement.h:
995         (HTMLTextAreaElement): Overrides attach().
996
997         * html/TextFieldInputType.cpp:
998         (WebCore::TextFieldInputType::updatePlaceholderText):
999         Calls fixPlaceholderRenderer().
1000         (WebCore::TextFieldInputType::attach): ditto.
1001         * html/TextFieldInputType.h:
1002         (TextFieldInputType): Overrides attach().
1003
1004 2012-05-28  Kentaro Hara  <haraken@chromium.org>
1005
1006         [V8] Implement V8Binding::v8Null(isolate) and use it in CodeGeneratorV8.pm
1007         https://bugs.webkit.org/show_bug.cgi?id=87692
1008
1009         Reviewed by Adam Barth.
1010
1011         Since v8::Null(isolate) crashes if we pass a NULL isolate, we are planning
1012         to pass Isolate to v8::Null() in the following steps:
1013
1014         [1] Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
1015         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
1016         v8Null(isolate) calls v8::Null(isolate).
1017
1018         [2] In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional
1019         'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
1020
1021         [3] In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional
1022         'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
1023
1024         This bug fixes [1] by implementing V8Binding::v8Null(isolate). Also this patch uses
1025         V8Binding::v8Null(isolate) in bindings/v8/*.{h,cpp}.
1026
1027         No tests. No behavior change.
1028
1029         * bindings/scripts/CodeGeneratorV8.pm:
1030         (GenerateHeader):
1031         (NativeToJSValue):
1032         * bindings/scripts/test/V8/V8Float64Array.h:
1033         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1034         (WebCore::toV8):
1035         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1036         (WebCore::toV8):
1037         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1038         (WebCore::toV8):
1039         * bindings/scripts/test/V8/V8TestEventTarget.h:
1040         (WebCore::toV8):
1041         * bindings/scripts/test/V8/V8TestException.h:
1042         (WebCore::toV8):
1043         * bindings/scripts/test/V8/V8TestInterface.h:
1044         (WebCore::toV8):
1045         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1046         (WebCore::toV8):
1047         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1048         (WebCore::toV8):
1049         * bindings/scripts/test/V8/V8TestNode.h:
1050         (WebCore::toV8):
1051         * bindings/scripts/test/V8/V8TestObj.h:
1052         (WebCore::toV8):
1053         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1054         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
1055         (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
1056         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1057         (WebCore::toV8):
1058         * bindings/v8/V8Binding.h:
1059         (WebCore::v8Null):
1060         (WebCore):
1061         (WebCore::v8DateOrNull):
1062         * bindings/v8/V8DOMWrapper.cpp:
1063         * bindings/v8/V8DOMWrapper.h:
1064         (WebCore):
1065
1066 2012-05-28  Kent Tamura  <tkent@chromium.org>
1067
1068         Fix a crash in HTMLFormControlElement::disabled().
1069         https://bugs.webkit.org/show_bug.cgi?id=86534
1070
1071         Reviewed by Ryosuke Niwa.
1072
1073         Stop to hold pointers of fildset and legend elements. We can avoid it by
1074         holding ancestor's disabled state.
1075
1076         The ancesotr's disabled state should be invalidated when
1077          - fieldset's disabled value is changed.
1078          - fieldset's children is updated because a legend position might be changed.
1079          - A form control is attached to or detached from a tree.
1080
1081         No new tests. It's almost impossible to make a reliable test.
1082
1083         * html/HTMLFieldSetElement.cpp:
1084         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
1085         Added. Invalidate disabled state of form controls under the specified node.
1086         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1087         Uses invalidateDisabledStateUnder().
1088         (WebCore::HTMLFieldSetElement::childrenChanged):
1089         Added new override function. We need invalidate disabled state of form
1090         controls under legend elements.
1091
1092         * html/HTMLFieldSetElement.h:
1093         (HTMLFieldSetElement): Add invalidateDisabledStateUnder() and childrenChanged().
1094
1095         * html/HTMLFormControlElement.cpp:
1096         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1097         Remove initialization of the removed data members.
1098         Initialize m_ancestorDisabledState.
1099         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
1100         Update m_ancestorDisabledState. It should be
1101         AncestorDisabledStateDisabled if the control is under a disabled
1102         fieldset and not under the first legend child of the disabled filedset.
1103         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
1104         Invalidate m_ancestorDisabledState.
1105         (WebCore::HTMLFormControlElement::insertedInto): ditto.
1106         (WebCore::HTMLFormControlElement::removedFrom): ditto.
1107         (WebCore::HTMLFormControlElement::disabled):
1108         Calls updateAncestorDisabledState() if needed.
1109         (WebCore::HTMLFormControlElement::recalcWillValidate):
1110         Remove unnecessary check for m_legendAncestor.
1111
1112         * html/HTMLFormControlElement.h:
1113         (HTMLFormControlElement):
1114         - Rename updateFieldSetAndLegendAncestor() to updateAncestorDisabledState(), and make it private.
1115         - Remove m_fieldSetAncestor, m_legendAncestor, and m_fieldSetAncestorValid.
1116         - Add m_ancestorDisabledState.
1117
1118 2012-05-28  Takashi Toyoshima  <toyoshim@chromium.org>
1119
1120         [WebSocket] Receiving reserved close codes, 1005, 1006, and 1015 must appear as code=1006 and wasClean=false
1121         https://bugs.webkit.org/show_bug.cgi?id=87084
1122
1123         Reviewed by Kent Tamura.
1124
1125         Status codes 1005, 1006, and 1015 are forbidden to be sent in actual close frames.
1126         If a client received these frames, the client should handle them as broken.
1127         Close frames containing invalid body size are the same as these forbidden cases.
1128         Update close-code-and-reason tests to verify this patch.
1129
1130         * Modules/websockets/WebSocket.cpp: Handle AbnormalClosure as wasClean == false
1131         (WebCore::WebSocket::didClose):
1132         * Modules/websockets/WebSocketChannel.cpp: Handle close frames' status code carefully
1133         (WebCore::WebSocketChannel::processFrame):
1134         * Modules/websockets/WebSocketChannel.h: Update on newly defined close event codes
1135
1136 2012-05-28  Kentaro Hara  <haraken@chromium.org>
1137
1138         [V8] Avoid passing NULL to an 'isolate' parameter
1139         https://bugs.webkit.org/show_bug.cgi?id=87689
1140
1141         Reviewed by Adam Barth.
1142
1143         v8::Null(isolate) crashes if we pass a NULL isolate.
1144         Thus we are planning to replace v8::Null()s in a following way:
1145
1146         - Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
1147         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
1148         v8Null(isolate) calls v8::Null(isolate).
1149
1150         - In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a
1151         non-optional 'isolate' parameter.
1152         (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
1153
1154         - In V8 bindings, we replace v8::Null() with v8Null(isolate) for an
1155         optional 'isolate' parameter.
1156         (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
1157
1158         However, currently we cannot do the replacement mechanically, since some code
1159         pass NULL to a non-optional 'isolate' parameter. In other words, currently
1160         "non-optional" does not guarantee that 'isolate' is not NULL.
1161
1162         This patch removes all the code that passes NULL to a non-optional 'isolate'
1163         parameter. This will enable us to achieve the replacement mechanically.
1164
1165         No tests. No behavior change.
1166
1167         * bindings/scripts/CodeGeneratorV8.pm:
1168         (GenerateCallbackImplementation):
1169         (NativeToJSValue):
1170         * bindings/scripts/test/V8/V8TestCallback.cpp:
1171         (WebCore::V8TestCallback::callbackWithClass1Param):
1172         (WebCore::V8TestCallback::callbackWithClass2Param):
1173         (WebCore::V8TestCallback::callbackWithStringList):
1174         (WebCore::V8TestCallback::callbackRequiresThisToPass):
1175         * bindings/scripts/test/V8/V8TestObj.cpp:
1176         (WebCore::V8TestObj::installPerContextProperties):
1177         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
1178         (WebCore::V8SQLStatementErrorCallback::handleEvent):
1179         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1180         (WebCore::V8MutationCallback::handleEvent):
1181
1182 2012-05-28  Kent Tamura  <tkent@chromium.org>
1183
1184         Form controls in <fieldset disabled> should not be validated.
1185         https://bugs.webkit.org/show_bug.cgi?id=87381
1186
1187         Reviewed by Hajime Morita.
1188
1189         We need to use disabeld() instead of m_disabled to calculate
1190         willValidate property. Also, we need to update willValidate if
1191         necessary.
1192
1193         Test: fast/forms/fieldset/validation-in-fieldset.html
1194
1195         * html/HTMLFieldSetElement.cpp:
1196         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1197          - Do not traverse this.
1198          - Calls ancestorDisabledStateWasChanged() instead of
1199           setNeedsStyleRecalc() because we'd like to do additional tasks.
1200         * html/HTMLFormControlElement.cpp:
1201         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
1202         Added. Just calls disabledAttributeChanged().
1203         (WebCore::HTMLFormControlElement::parseAttribute):
1204         Do not call setNeedsWillValidateCheck() whenever an attribute is updated.
1205         It should be called only if disabled or readonly attribute is updated.
1206         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
1207         Add setNeedsWillValidateCheck(). It was moved from parseAttribute().
1208         (WebCore::HTMLFormControlElement::insertedInto):
1209         Invalidate ancestor information.
1210         (WebCore::HTMLFormControlElement::recalcWillValidate):
1211         Use disabled() instead of m_disabled. disabled() takes care of
1212         ancestor's disabled state.
1213         * html/HTMLFormControlElement.h:
1214         (HTMLFormControlElement):
1215
1216 2012-05-28  Rakesh KN  <rakesh.kn@motorola.com>
1217
1218         [Forms] HTMLFieldSetElement.idl doesn't have elements attribute.
1219         https://bugs.webkit.org/show_bug.cgi?id=80110
1220
1221         Reviewed by Kent Tamura.
1222
1223         Implemented elements attribute for HTMLFieldSetElement. This is spec'ed at
1224         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-fieldset-elements
1225
1226         Tests: fast/forms/fieldset/fieldset-elements.html
1227                fast/forms/fieldset/fieldset-form-collection-radionode-list.html
1228
1229         * dom/Node.cpp:
1230         (WebCore::Node::radioNodeList):
1231         Extended ASSERT to assert if not HTMLFieldSetElement or HTMLFormElement.
1232         * html/HTMLFieldSetElement.cpp:
1233         (WebCore::HTMLFieldSetElement::elements):
1234         Elements attribute implementation.
1235         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
1236         Update the formcontrol elements collections if dom tree got modified.
1237         (WebCore::HTMLFieldSetElement::associatedElements):
1238         FormControl elements collection accessor.
1239         (WebCore::HTMLFieldSetElement::length):
1240         Number of elements in the fieldset group.
1241         * html/HTMLFieldSetElement.h:
1242         Added elements collection member and form control collection members.
1243         * html/HTMLFieldSetElement.idl:
1244         Added elements attribute.
1245         * html/HTMLFormCollection.cpp:
1246         (WebCore::HTMLFormCollection::formControlElements):
1247         Added support for HTMLFieldSetElement, based on base element type gets its associated elements.
1248         (WebCore::HTMLFormCollection::numberOfFormControlElements): Ditto
1249         (WebCore::HTMLFormCollection::getNamedFormItem): Process image elements only for form element.
1250         (WebCore::HTMLFormCollection::updateNameCache): Ditto
1251         * html/RadioNodeList.cpp:
1252         (WebCore::RadioNodeList::RadioNodeList):
1253         DynamicSubTree root element is decided based on the type whether base element is form or fieldset element.
1254         Renamed m_formElement to m_baseElement.
1255         (WebCore::RadioNodeList::~RadioNodeList):
1256         Renamed m_formElement to m_baseElement.
1257         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
1258         Form element specific changes moved under form element check.
1259         * html/RadioNodeList.h:
1260         (WebCore::RadioNodeList::create):
1261         (RadioNodeList):
1262         Renamed m_formElement to m_baseElement.
1263
1264 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1265
1266         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
1267         https://bugs.webkit.org/show_bug.cgi?id=80135
1268
1269         Reviewed by Rob Buis.
1270
1271         RIM PR: 145660
1272         Fixed a regression introduced by r111810, we should cancel the new
1273         request when user press cancel button in http authentication challenge
1274         dialog, and we should also allow sending empty username and password
1275         with the request.
1276         Also removed redundant codes which checked the existence of the
1277         FrameLoaderClient pointer, as we've already moved authenticationChallenge()
1278         out of class FrameLoaderClient, it is not needed.
1279
1280         Manual test added. Testing http authentication dialog relies on user interaction.
1281
1282         Resubmit the patch reverted by r115104 after the digest infinite loop
1283         issue for BlackBerry porting get identified and fixed.
1284
1285         Internally reviewed by Joe Mason <jmason@rim.com>
1286
1287         * platform/blackberry/PageClientBlackBerry.h:
1288         * platform/network/blackberry/NetworkJob.cpp:
1289         (WebCore::NetworkJob::sendRequestWithCredentials):
1290
1291 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1292
1293         [BlackBerry] http authentication challenge issue when loading favicon
1294         https://bugs.webkit.org/show_bug.cgi?id=87665
1295
1296         Reviewed by Rob Buis.
1297
1298         Provide the TargetType when generating a favicon loading
1299         request. Loading favicons is triggered after the main resource
1300         has been loaded and parsed, so if we cancel the authentication
1301         challenge when loading main resource, we should also cancel
1302         loading the favicon when it starts to load. If not we will
1303         receive another challenge after we canceled the main resource
1304         loading, which may confuse the user.
1305
1306         Internally reviewed by Joe Mason <jmason@rim.com>
1307
1308         No new tests because of no behavior changes.
1309
1310         * loader/icon/IconLoader.cpp:
1311         (WebCore::IconLoader::startLoading):
1312         * platform/network/blackberry/NetworkJob.cpp:
1313         (WebCore::NetworkJob::sendRequestWithCredentials):
1314
1315 2012-05-28  MORITA Hajime  <morrita@google.com>
1316
1317         Rename FrameLoaderClient::shadowDOMAllowed() to allowShadowDOM()
1318         https://bugs.webkit.org/show_bug.cgi?id=87101
1319
1320         Reviewed by Kentaro Hara.
1321
1322         No new tests. No behavior change.
1323
1324         * bindings/generic/ContextEnabledFeatures.cpp:
1325         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
1326         * loader/FrameLoaderClient.h:
1327         (WebCore::FrameLoaderClient::allowShadowDOM):
1328
1329 2012-05-28  David Barton  <dbarton@mathscribe.com>
1330
1331         mathml/presentation/mo-stretch.html and mroot-pref-width.html tests fail on Mac
1332         https://bugs.webkit.org/show_bug.cgi?id=86786
1333
1334         Reviewed by Darin Adler.
1335
1336         The fix to https://bugs.webkit.org/show_bug.cgi?id=84167 changed inline-table baselines,
1337         including for <mtable>. We therefore have to correct <mtable>'s vertical-align CSS
1338         property.
1339
1340         Tested by existing tests mo-stretch.html, row-alignment.xhtml, and tables.xhtml.
1341
1342         * css/mathml.css:
1343         (mtable):
1344
1345 2012-05-28  Luke Macpherson  <macpherson@chromium.org>
1346
1347         Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability.
1348         https://bugs.webkit.org/show_bug.cgi?id=87078
1349
1350         Reviewed by Darin Adler.
1351
1352         This patch implements a number of improvements to filteredProperties:
1353         1) Make the code more linearly readable by separating out handling of important and non-important properties.
1354         2) Eliminate one BitArray instance (reduces hot memory so more cache friendly).
1355         3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property.
1356         The key algorithmic change is to add properties in decreasing precedence:
1357         a) Iterating once per (important, !important) so that important properties are visited first.
1358         b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence.
1359
1360         Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list.
1361         In particular fast/css contains test cases for important corner cases like duplicated important properties.
1362
1363         * css/CSSParser.cpp:
1364         (WebCore::CSSParser::createStylePropertySet):
1365         * css/CSSProperty.h:
1366         Add vector traits so that CSSProperty can just be memset by vector without calling constructor.
1367
1368 2012-05-28  MORITA Hajime  <morrita@google.com>
1369
1370         Can't edit <input> elements with :first-letter
1371         https://bugs.webkit.org/show_bug.cgi?id=87615
1372
1373         Reviewed by Kent Tamura.
1374
1375         A check using canHaveGeneratedChildren() should cover not only
1376         button and menulist, but also RenderTextControl.
1377         This change pulles canHaveGeneratedChildren() up
1378         from RenderDeprecatedFlexibleBox to RenderObject,
1379         and lets RenderTextControl override it.
1380
1381         Test: fast/forms/input-first-letter-edit.html
1382
1383         * rendering/RenderBlock.cpp:
1384         (WebCore):
1385         (WebCore::RenderBlock::styleDidChange):
1386         (WebCore::RenderBlock::updateFirstLetter):
1387         * rendering/RenderBlock.h: Removed a static function canHaveGeneratedChildren()
1388         (RenderBlock):
1389         * rendering/RenderDeprecatedFlexibleBox.h:
1390         * rendering/RenderObject.cpp:
1391         (WebCore):
1392         (WebCore::RenderObject::canHaveGeneratedChildren): Added.
1393         * rendering/RenderObject.h:
1394         (RenderObject):
1395         * rendering/RenderTextControl.h:
1396
1397 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1398
1399         [BlackBerry] Add support for layers with scale invariant size
1400         https://bugs.webkit.org/show_bug.cgi?id=87601
1401
1402         Reviewed by Rob Buis.
1403
1404         To support layers that have a "floating" appearance, i.e. don't change size
1405         when the web page is drawn at a different scale, we add a new layer property
1406         named "sizeIsScaleInvariant".
1407
1408         The anchor position will still be given in document coordinates for these
1409         "floating" layers, so this is well suited for interface elements like selection
1410         handles whose size is always the same but move with the web page contents.
1411
1412         PR #156812
1413
1414         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1415         (WebCore::LayerCompositingThread::setDrawTransform):
1416         (WebCore::LayerCompositingThread::drawTextures):
1417         (WebCore::LayerCompositingThread::drawMissingTextures):
1418         * platform/graphics/blackberry/LayerCompositingThread.h:
1419         (LayerCompositingThread):
1420         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
1421         (LayerCompositingThreadClient):
1422         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
1423         * platform/graphics/blackberry/LayerData.h:
1424         (WebCore::LayerData::LayerData):
1425         (WebCore::LayerData::sizeIsScaleInvariant):
1426         (LayerData):
1427         * platform/graphics/blackberry/LayerRenderer.cpp:
1428         (WebCore::LayerRenderer::LayerRenderer):
1429         (WebCore::LayerRenderer::compositeLayers):
1430         (WebCore::LayerRenderer::updateLayersRecursive):
1431         (WebCore::LayerRenderer::compositeLayersRecursive):
1432         * platform/graphics/blackberry/LayerRenderer.h:
1433         (LayerRenderer):
1434         * platform/graphics/blackberry/LayerTiler.cpp:
1435         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1436         (WebCore::LayerTiler::drawTextures):
1437         (WebCore::LayerTiler::drawMissingTextures):
1438         (WebCore::LayerTiler::drawTexturesInternal):
1439         * platform/graphics/blackberry/LayerTiler.h:
1440         (LayerTiler):
1441         * platform/graphics/blackberry/LayerWebKitThread.h:
1442         (WebCore::LayerWebKitThread::setSizeIsScaleInvariant):
1443         (LayerWebKitThread):
1444
1445 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1446
1447         [BlackBerry] Make it possible to manipulate layers on the compositing thread
1448         https://bugs.webkit.org/show_bug.cgi?id=87602
1449
1450         Reviewed by Rob Buis.
1451
1452         Normally, layers are manipulated on the WebKit thread, and the changes are
1453         synced to the compositing thread during the next accelerated compositing commit
1454         operation.
1455
1456         However, for overlay layers the ability to manipulate layers on the compositing
1457         thread is necessary for adequate user interface responsiveness.
1458
1459         Two mechanisms are added:
1460         1. For a layer with a WebKit-thread counterpart, you can temporarily override
1461         attributes or add animations whose output override attributes.
1462         2. For a layer with no WebKit-thread counterpart, you can now directly set the
1463         compositing thread values for attributes. If you attempt to do this for layers
1464         that do have a WebKit-thread counterpart, the compositing thread values will
1465         be overwritten at the time of the next commit, which makes the override
1466         mechanism more useful there.
1467
1468         PR #156812
1469
1470         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1471         (WebCore::LayerCompositingThread::addSublayer):
1472         (WebCore):
1473         (WebCore::LayerCompositingThread::updateAnimations):
1474         (WebCore::LayerCompositingThread::removeAnimation):
1475         (WebCore::LayerCompositingThread::override):
1476         (WebCore::LayerCompositingThread::clearOverride):
1477         * platform/graphics/blackberry/LayerCompositingThread.h:
1478         (LayerOverride):
1479         (WebCore::LayerOverride::create):
1480         (WebCore::LayerOverride::setPosition):
1481         (WebCore::LayerOverride::setAnchorPoint):
1482         (WebCore::LayerOverride::setBounds):
1483         (WebCore::LayerOverride::setTransform):
1484         (WebCore::LayerOverride::setOpacity):
1485         (WebCore::LayerOverride::addAnimation):
1486         (WebCore::LayerOverride::LayerOverride):
1487         (WebCore):
1488         (LayerCompositingThread):
1489         (WebCore::LayerCompositingThread::setPosition):
1490         (WebCore::LayerCompositingThread::setAnchorPoint):
1491         (WebCore::LayerCompositingThread::setBounds):
1492         (WebCore::LayerCompositingThread::setSizeIsScaleInvariant):
1493         (WebCore::LayerCompositingThread::setTransform):
1494         (WebCore::LayerCompositingThread::setOpacity):
1495         (WebCore::LayerCompositingThread::setNeedsTexture):
1496         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1497         (WebCore::LayerWebKitThread::LayerWebKitThread):
1498         (WebCore::LayerWebKitThread::commitOnCompositingThread):
1499         * platform/graphics/blackberry/LayerWebKitThread.h:
1500         (LayerWebKitThread):
1501         (WebCore::LayerWebKitThread::clearOverride):
1502
1503 2012-05-28  Rob Flack  <flackr@chromium.org>
1504
1505         [chromium] Only increase size of Combo Box Options when displayed on touch screen
1506         https://bugs.webkit.org/show_bug.cgi?id=85921
1507
1508         Reviewed by Adam Barth.
1509
1510         Adds a flag to set whether the current device is a touch screen, independent of whether touch events are supported and use this for the combo box sizing.
1511
1512         No new tests as this is a flag change and covered by existing tests: WebKit/chromium/tests/PopupMenuTest.cpp
1513
1514         * page/Settings.cpp:
1515         (WebCore::Settings::Settings):
1516         * page/Settings.h:
1517         (WebCore::Settings::setDeviceSupportsTouch):
1518         (WebCore::Settings::deviceSupportsTouch):
1519         (Settings):
1520         * platform/chromium/PopupListBox.cpp:
1521         (WebCore::PopupListBox::getRowHeight):
1522         * platform/chromium/PopupListBox.h:
1523         (PopupContainerSettings):
1524         * platform/chromium/PopupMenuChromium.cpp:
1525         (WebCore::PopupMenuChromium::show):
1526
1527 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1528
1529         [BlackBerry] Make custom compositing thread layers more flexible
1530         https://bugs.webkit.org/show_bug.cgi?id=87600
1531
1532         Reviewed by Rob Buis.
1533
1534         Introduce a LayerCompositingThreadClient that's used to fine tune the
1535         behaviour of custom layers. Let the LayerTiler be a
1536         LayerCompositingThreadClient and thus decouple it from
1537         LayerCompositingThread. Adjust method signatures to allow a one-to-many
1538         relationship between Client and Layer.
1539
1540         Remove the old LayerCompositingThread::drawCustom() in favour of this new
1541         Client interface.
1542
1543         PR #156812
1544
1545         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1546         (WebCore::LayerCompositingThread::create):
1547         (WebCore::LayerCompositingThread::LayerCompositingThread):
1548         (WebCore::LayerCompositingThread::~LayerCompositingThread):
1549         (WebCore::LayerCompositingThread::deleteTextures):
1550         (WebCore::LayerCompositingThread::drawTextures):
1551         (WebCore::LayerCompositingThread::hasMissingTextures):
1552         (WebCore::LayerCompositingThread::drawMissingTextures):
1553         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
1554         (WebCore::LayerCompositingThread::bindContentsTexture):
1555         (WebCore::LayerCompositingThread::setVisible):
1556         (WebCore::LayerCompositingThread::scheduleCommit):
1557         * platform/graphics/blackberry/LayerCompositingThread.h:
1558         (WebCore):
1559         (LayerCompositingThread):
1560         * platform/graphics/blackberry/LayerCompositingThreadClient.h: Added.
1561         (WebCore):
1562         (LayerCompositingThreadClient):
1563         (WebCore::LayerCompositingThreadClient::~LayerCompositingThreadClient):
1564         (WebCore::LayerCompositingThreadClient::bindContentsTexture):
1565         (WebCore::LayerCompositingThreadClient::hasMissingTextures):
1566         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
1567         (WebCore::LayerCompositingThreadClient::scheduleCommit):
1568         * platform/graphics/blackberry/LayerRenderer.cpp:
1569         (WebCore::LayerRenderer::drawDebugBorder):
1570         * platform/graphics/blackberry/LayerTiler.cpp:
1571         (WebCore::LayerTiler::LayerTiler):
1572         (WebCore::LayerTiler::layerCompositingThreadDestroyed):
1573         (WebCore::LayerTiler::layerVisibilityChanged):
1574         (WebCore::LayerTiler::uploadTexturesIfNeeded):
1575         (WebCore::LayerTiler::deleteTextures):
1576         (WebCore::LayerTiler::scheduleCommit):
1577         (WebCore):
1578         (WebCore::LayerTiler::bindContentsTexture):
1579         * platform/graphics/blackberry/LayerTiler.h:
1580         (LayerTiler):
1581         (WebCore::LayerTiler::hasMissingTextures):
1582         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1583         (WebCore::LayerWebKitThread::LayerWebKitThread):
1584         * platform/graphics/blackberry/LayerWebKitThread.h:
1585         (LayerWebKitThread):
1586
1587 2012-05-25  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1588
1589         WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
1590         https://bugs.webkit.org/show_bug.cgi?id=42328
1591
1592         Reviewed by Eric Seidel.
1593
1594         Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this
1595         change will allow more tests to run in WebKitTestRunner and DRT for ports that weren't
1596         implementing this function before.
1597         This patch also refactors InspectorController::enableProfiler() and
1598         InspectorController::disableProfiler() to InspectorController::setProfilerEnabled(bool).
1599
1600         * WebCore.exp.in:
1601         * inspector/InspectorController.cpp:
1602         (WebCore::InspectorController::profilerEnabled):
1603         (WebCore::InspectorController::setProfilerEnabled):
1604         * inspector/InspectorController.h:
1605         (InspectorController):
1606         * testing/InternalSettings.cpp:
1607         (WebCore::InternalSettings::InternalSettings):
1608         (WebCore::InternalSettings::restoreTo):
1609         (WebCore::InternalSettings::setJavaScriptProfilingEnabled):
1610         (WebCore):
1611         * testing/InternalSettings.h:
1612         (InternalSettings):
1613         * testing/InternalSettings.idl:
1614
1615 2012-05-28  Yong Li  <yoli@rim.com>
1616
1617         Crash on incomplete :not().
1618         https://bugs.webkit.org/show_bug.cgi?id=86673
1619
1620         Reviewed by Antti Koivisto.
1621
1622         Add back null-checks for incomplete :not() class
1623         which were dropped by r81845.
1624
1625         * css/CSSSelector.cpp:
1626         (WebCore::CSSSelector::specificityForOneSelector):
1627         (WebCore::CSSSelector::selectorText):
1628         * css/SelectorChecker.cpp:
1629         (WebCore::SelectorChecker::checkOneSelector):
1630         (WebCore::SelectorChecker::determineLinkMatchType):
1631
1632 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
1633
1634         FileWriterSync binding should have no static table
1635         https://bugs.webkit.org/show_bug.cgi?id=87645
1636
1637         Reviewed by George Staikos.
1638
1639         FileWriterSync could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
1640
1641         Covered by existing test: fast/filesystem/workers/sync-operations.html.
1642
1643         * Modules/filesystem/FileWriterSync.idl:
1644
1645 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1646
1647         [BlackBerry] Add an overlay layer
1648         https://bugs.webkit.org/show_bug.cgi?id=87567
1649
1650         Reviewed by Antonio Gomes.
1651
1652         The overlay layer allows us to have compositing layers even though the
1653         web page is not currently using accelerated compositing.
1654
1655         These layers can be used to implement tap highlight, inspector overlay
1656         and more.
1657
1658         The WebCore changes support the overlay layer functionality in WebKit
1659         by making it possible to add animations from the compositing thread
1660         without them being instantly overwritten during the next commit.
1661
1662         Also a new custom layer type is added, which allow an overlay layer to
1663         draw itself using raw OpenGL calls. An instance of a custom subclass of
1664         LayerCompositingThread must be provided when creating the
1665         LayerWebKitThread. Then, the custom layer can be used as the content
1666         layer of a GraphicsLayer, or by itself.
1667
1668         Reviewed internally by Filip Spacek.
1669
1670         PR #154335
1671
1672         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1673         (WebCore::LayerCompositingThread::~LayerCompositingThread):
1674         (WebCore::LayerCompositingThread::deleteTextures):
1675         (WebCore::LayerCompositingThread::drawTextures):
1676         (WebCore::LayerCompositingThread::drawMissingTextures):
1677         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
1678         (WebCore::LayerCompositingThread::setVisible):
1679         (WebCore::LayerCompositingThread::scheduleCommit):
1680         * platform/graphics/blackberry/LayerCompositingThread.h:
1681         (WebCore::LayerCompositingThread::addAnimation):
1682         (WebCore::LayerCompositingThread::setRunningAnimations):
1683         (WebCore::LayerCompositingThread::setSuspendedAnimations):
1684         (LayerCompositingThread):
1685         (WebCore::LayerCompositingThread::drawCustom):
1686         * platform/graphics/blackberry/LayerData.h:
1687         (LayerData):
1688         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1689         (WebCore::LayerWebKitThread::LayerWebKitThread):
1690         (WebCore):
1691         (WebCore::LayerWebKitThread::~LayerWebKitThread):
1692         (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
1693         (WebCore::LayerWebKitThread::startAnimations):
1694         (WebCore::LayerWebKitThread::commitOnCompositingThread):
1695         (WebCore::LayerWebKitThread::setNeedsDisplayInRect):
1696         (WebCore::LayerWebKitThread::setNeedsDisplay):
1697         (WebCore::LayerWebKitThread::setIsMask):
1698         (WebCore::LayerWebKitThread::setRunningAnimations):
1699         (WebCore::LayerWebKitThread::setSuspendedAnimations):
1700         * platform/graphics/blackberry/LayerWebKitThread.h:
1701         (LayerWebKitThread):
1702
1703 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
1704
1705         ProgressEvent JSC binding should have no static table
1706         https://bugs.webkit.org/show_bug.cgi?id=87365
1707
1708         Reviewed by George Staikos.
1709
1710         ProgressEvent could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
1711
1712         Covered by existing test: fast/filesystem/workers/file-writer-events.html.
1713
1714         * dom/ProgressEvent.idl:
1715
1716 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1717
1718         [BlackBerry] Update WebPageCompositor::render() API
1719         https://bugs.webkit.org/show_bug.cgi?id=87565
1720
1721         Reviewed by Rob Buis.
1722
1723         The new API allows the embedder to specify the root transform and many
1724         OpenGL related parameters.
1725
1726         Also refactor the code to allow several sets of layers to be rendered,
1727         and to allow interleaving the rendering of layers with rendering of
1728         buffers and checkerboard.
1729
1730         Reviewed internally by Filip Spacek.
1731
1732         PR #154334
1733
1734         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1735         (WebCore::LayerCompositingThread::drawTextures):
1736         (WebCore::LayerCompositingThread::drawSurface):
1737         * platform/graphics/blackberry/LayerRenderer.cpp:
1738         (WebCore::LayerRenderer::orthoMatrix):
1739         (WebCore::LayerRenderer::LayerRenderer):
1740         (WebCore::LayerRenderer::prepareFrame):
1741         (WebCore):
1742         (WebCore::LayerRenderer::setViewport):
1743         (WebCore::LayerRenderer::compositeLayers):
1744         (WebCore::LayerRenderer::compositeBuffer):
1745         (WebCore::LayerRenderer::drawCheckerboardPattern):
1746         (WebCore::LayerRenderer::drawLayersOnSurfaces):
1747         (WebCore::LayerRenderer::prepareFrameRecursive):
1748         (WebCore::LayerRenderer::updateLayersRecursive):
1749         (WebCore::LayerRenderer::compositeLayersRecursive):
1750         (WebCore::LayerRenderer::updateScissorIfNeeded):
1751         (WebCore::LayerRenderingResults::addHolePunchRect):
1752         * platform/graphics/blackberry/LayerRenderer.h:
1753         (LayerRenderer):
1754
1755 2012-05-28  Antti Koivisto  <antti@apple.com>
1756
1757         REGRESSION(r96517): Attribute selector fails to match dynamically modified style attribute
1758         https://bugs.webkit.org/show_bug.cgi?id=87349
1759
1760         Reviewed by Andreas Kling.
1761         
1762         Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching
1763         style attribute are rare, disallow them from the fast path rather than making it more branchy.
1764
1765         Test: fast/css/dynamic-style-attribute-query.html
1766
1767         * css/SelectorChecker.cpp:
1768         (WebCore::isFastCheckableMatch):
1769
1770 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
1771
1772         Web Inspector: Expose function (closure) scopes in remote protocol
1773         https://bugs.webkit.org/show_bug.cgi?id=86861
1774
1775         Reviewed by Yury Semikhatsky.
1776
1777         A data transfer from V8's FunctionMirror via DebuggerScript.js via InjectedScriptHost is built.
1778         Scope field is added to protocol declaration similar to scopes of stack call frame.
1779         Test for function details is extended.
1780         JSC code binging got fixme for implemting the corresponding feature.
1781
1782         * bindings/js/JSInjectedScriptHostCustom.cpp:
1783         (WebCore::JSInjectedScriptHost::functionDetails):
1784         * bindings/v8/DebuggerScript.js:
1785         * bindings/v8/ScriptDebugServer.cpp:
1786         (WebCore::ScriptDebugServer::functionScopes):
1787         (WebCore):
1788         * bindings/v8/ScriptDebugServer.h:
1789         (ScriptDebugServer):
1790         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1791         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
1792         * inspector/InjectedScriptHost.cpp:
1793         (WebCore):
1794         (WebCore::InjectedScriptHost::scriptDebugServer):
1795         * inspector/InjectedScriptHost.h:
1796         (WebCore):
1797         (WebCore::InjectedScriptHost::init):
1798         (InjectedScriptHost):
1799         * inspector/InjectedScriptSource.js:
1800         (.):
1801         * inspector/Inspector.json:
1802         * inspector/InspectorController.cpp:
1803         (WebCore::InspectorController::InspectorController):
1804         * inspector/WorkerInspectorController.cpp:
1805         (WebCore::WorkerInspectorController::WorkerInspectorController):
1806
1807 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
1808
1809         [BlackBerry] Add a constructor to create a Path from an SkPath
1810         https://bugs.webkit.org/show_bug.cgi?id=87566
1811
1812         Reviewed by Antonio Gomes.
1813
1814         Skia allows the creation of more complex paths than WebCore would
1815         allow. This will be used in the BlackBerry port to implement a default
1816         tap highlight appearance.
1817
1818         Reviewed internally by Mike Lattanzio.
1819
1820         PR #154329
1821
1822         * platform/graphics/Path.h:
1823         (Path):
1824         * platform/graphics/skia/PathSkia.cpp:
1825         (WebCore):
1826         (WebCore::Path::Path):
1827
1828 2012-05-28  Alexis Menard  <alexis.menard@openbossa.org>
1829
1830         Unreviewed build fix for Mac on Lion.
1831
1832         * inspector/CodeGeneratorInspector.py:
1833
1834 2012-05-28  Keishi Hattori  <keishi@webkit.org>
1835
1836         Expose value localization function of HTMLInputElement
1837         https://bugs.webkit.org/show_bug.cgi?id=84356
1838
1839         Reviewed by Kent Tamura.
1840
1841         No new tests.
1842
1843         We want to localize the values that are defined in the datalist element.
1844         This adds HTMLInputElement::localizeValue() which will localize a given
1845         value.
1846
1847         * html/BaseDateAndTimeInputType.cpp:
1848         (WebCore::BaseDateAndTimeInputType::localizeValue):
1849         (WebCore):
1850         (WebCore::BaseDateAndTimeInputType::visibleValue):
1851         * html/BaseDateAndTimeInputType.h:
1852         (BaseDateAndTimeInputType):
1853         * html/HTMLInputElement.cpp:
1854         (WebCore::HTMLInputElement::localizeValue):
1855         (WebCore):
1856         * html/HTMLInputElement.h:
1857         (HTMLInputElement):
1858         * html/InputType.cpp:
1859         (WebCore::InputType::localizeValue):
1860         (WebCore):
1861         * html/InputType.h:
1862         (InputType):
1863         * html/NumberInputType.cpp:
1864         (WebCore::NumberInputType::localizeValue):
1865         (WebCore):
1866         (WebCore::NumberInputType::visibleValue):
1867         * html/NumberInputType.h:
1868         (NumberInputType):
1869
1870 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
1871
1872         Unreviewed. Test fix after r118670: saved timeline data may
1873         not have DOM counters data and MemoryStatistics object should
1874         take this into account.
1875
1876         * inspector/front-end/MemoryStatistics.js:
1877         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
1878
1879 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1880
1881         Unreviewed, rolling out r118580.
1882         http://trac.webkit.org/changeset/118580
1883         https://bugs.webkit.org/show_bug.cgi?id=87647
1884
1885         Caused webkit_unit_tests to crash on chromium. (Requested by
1886         bulach on #webkit).
1887
1888         * platform/graphics/chromium/ContentLayerChromium.cpp:
1889         (WebCore::ContentLayerPainter::create):
1890         (WebCore::ContentLayerPainter::paint):
1891         (WebCore::ContentLayerPainter::ContentLayerPainter):
1892         (ContentLayerPainter):
1893         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
1894         * platform/graphics/chromium/TiledLayerChromium.cpp:
1895         (UpdatableTile):
1896         (WebCore::UpdatableTile::UpdatableTile):
1897         (WebCore::TiledLayerChromium::updateTiles):
1898         * platform/graphics/chromium/TiledLayerChromium.h:
1899         (TiledLayerChromium):
1900         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1901         (WebCore::CCSettings::CCSettings):
1902         (CCSettings):
1903
1904 2012-05-28  Peter Beverloo  <peter@chromium.org>
1905
1906         &AElig doesn't get rendered as U+00C6
1907         https://bugs.webkit.org/show_bug.cgi?id=87465
1908
1909         Reviewed by Adam Barth.
1910
1911         The if-statement to check whether the first entry of a certain letter
1912         already exists in the index used .get(). The very first alphabetical
1913         entry is in position "0", which evaluates to false, causing the first
1914         entry to be ignored. Instead, use a "x not in y" check here.
1915
1916         Also update WebCore.gyp to list the create-html-entity-table script as
1917         an input for the action, to make sure the table will be recreated.
1918
1919         Test: html5lib/resources/entities02.dat
1920
1921         * WebCore.gyp/WebCore.gyp:
1922         * html/parser/create-html-entity-table:
1923
1924 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
1925
1926         Web Inspector: dom counters graphs vanish on switching between timeline views
1927         https://bugs.webkit.org/show_bug.cgi?id=87628
1928
1929         Reviewed by Vsevolod Vlasov.
1930
1931         MemoryStatistics object now listens to the TimelineModel events instead of being
1932         populated by timeline panel. This behavior mathes that of the overview pane.
1933
1934         * inspector/front-end/MemoryStatistics.js:
1935         (WebInspector.MemoryStatistics.prototype.addTimlineEvent):
1936         * inspector/front-end/TimelinePanel.js:
1937         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
1938         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1939
1940 2012-05-28  Marcus Bulach  <bulach@chromium.org>
1941
1942         [chromium] Buildfix: remove obsolete file from gypi.
1943         https://bugs.webkit.org/show_bug.cgi?id=87643
1944
1945         Reviewed by no-reviewer.
1946
1947         Following http://trac.webkit.org/changeset/118610.
1948         Removes reference to platform/graphics/gstreamer/ImageGStreamerCG.mm
1949
1950         * WebCore.gypi:
1951
1952 2012-05-28  MORITA Hajime  <morrita@google.com>
1953
1954         HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
1955         https://bugs.webkit.org/show_bug.cgi?id=87608
1956
1957         Reviewed by Kent Tamura.
1958
1959         Moved m_validationMessage clearance from detach() to removedFrom() and
1960         remove detach().
1961
1962         No new tests. This change has no visible difference. Upcoming changes rely on this though.
1963
1964         * html/HTMLFormControlElement.cpp:
1965         (WebCore::HTMLFormControlElement::removedFrom):
1966
1967 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
1968
1969         Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling
1970         https://bugs.webkit.org/show_bug.cgi?id=87624
1971
1972         Reviewed by Vsevolod Vlasov.
1973
1974         Keep record button state in sync with the current profiling state.
1975
1976         * inspector/front-end/ProfilesPanel.js:
1977         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
1978
1979 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1980
1981         Unreviewed, rolling out r118650.
1982         http://trac.webkit.org/changeset/118650
1983         https://bugs.webkit.org/show_bug.cgi?id=87639
1984
1985         Patch caused massive failures throughout the builders
1986         (Requested by zdobersek on #webkit).
1987
1988         * css/MediaQuery.cpp:
1989         (WebCore):
1990         (WebCore::MediaQuery::serialize):
1991         (WebCore::MediaQuery::MediaQuery):
1992         (WebCore::MediaQuery::cssText):
1993         * css/MediaQuery.h:
1994         (WebCore::MediaQuery::expressions):
1995         (WebCore::MediaQuery::mediaType):
1996         (MediaQuery):
1997         (WebCore::MediaQuery::copy):
1998         * css/MediaQueryEvaluator.cpp:
1999         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
2000         (WebCore::MediaQueryEvaluator):
2001         (WebCore::MediaQueryEvaluator::eval):
2002         (WebCore::aspect_ratioMediaFeatureEval):
2003         (WebCore::device_aspect_ratioMediaFeatureEval):
2004         (WebCore::transform_3dMediaFeatureEval):
2005         (WebCore::view_modeMediaFeatureEval):
2006         (WebCore::createFunctionMap):
2007         * css/MediaQueryEvaluator.h:
2008         (WebCore):
2009         (MediaQueryEvaluator):
2010         * css/StyleResolver.cpp:
2011         (WebCore):
2012         (WebCore::StyleResolver::collectMatchingRulesForList):
2013         * css/StyleResolver.h:
2014         (MediaQueryResult):
2015         (WebCore::MediaQueryResult::MediaQueryResult):
2016         (WebCore):
2017         (StyleResolver):
2018
2019 2012-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2020
2021         Move allowRoundingHacks to Internals interface
2022         https://bugs.webkit.org/show_bug.cgi?id=87328
2023
2024         Reviewed by Hajime Morita.
2025
2026         Add allowRoundingHacks function, because it is able to work in the
2027         cross-port way by means of the Internals interface.
2028
2029         In addition, a function is added in order to restore default setting values.
2030
2031         No new tests, since we are improving here the infra-structure for testing
2032         a specific method.
2033
2034         * testing/Internals.cpp:
2035         (WebCore::Internals::reset):
2036         (WebCore):
2037         (WebCore::Internals::resetDefaultsToConsistentValues):
2038         (WebCore::Internals::allowRoundingHacks):
2039         * testing/Internals.h:
2040         (Internals):
2041         * testing/Internals.idl:
2042
2043 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2044
2045         [BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
2046         https://bugs.webkit.org/show_bug.cgi?id=87579
2047
2048         Reviewed by George Staikos.
2049
2050         In function NetworkJob::startNewJobWithRequest, We should cancel the
2051         NetworkJob first before we start a new NetworkJob which reuses the
2052         resource handle of the old one. If we only set the m_handle = 0 of the
2053         old NetworkJob without cancelling itself, it will still receives data
2054         notification from network thread and handles the received data with
2055         the released resource handler, which will cause the crash.
2056
2057         No new tests because no behavior has changed.
2058
2059         * platform/network/blackberry/NetworkJob.cpp:
2060         (WebCore::NetworkJob::startNewJobWithRequest):
2061
2062 2012-05-27  MORITA Hajime  <morrita@google.com>
2063
2064         [Refactoring][ShadowDOM] Some ElementShadow methods can be inlined.
2065         https://bugs.webkit.org/show_bug.cgi?id=87617
2066
2067         Reviewed by Kentaro Hara.
2068
2069         Inlined ElementShadow::attachHost(), ElementShadow::detachHost() and
2070         ElementShadow::reattach()
2071
2072         No new tests. No behavior change.
2073
2074         * dom/Element.cpp:
2075         (WebCore::Element::attach):
2076         (WebCore::Element::detach):
2077         * dom/ElementShadow.cpp:
2078         (WebCore::ElememtnShadow::reattachHostChildrenAndShadow):
2079         * dom/ElementShadow.h:
2080         (ElementShadow):
2081
2082 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
2083
2084         Web Inspector: CodeGeneratorInspector.py: protect typed API from C++ implicit float to int cast
2085         https://bugs.webkit.org/show_bug.cgi?id=87183
2086
2087         Reviewed by Yury Semikhatsky.
2088
2089         An intermediate C++ class is introduced that uses C++ template technique to control actual type
2090         of its constructor argument.
2091         All input parameters of type "int" now have type ExactlyInt. 
2092         All usage sites are fixed accordingly.
2093
2094         * inspector/CodeGeneratorInspector.py:
2095         (TypeModel.RefPtrBased):
2096         (TypeModel.Enum):
2097         (TypeModel.ValueType):
2098         (TypeModel.ValueType.get_opt_output_type_):
2099         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
2100         (TypeModel.ExactlyInt):
2101         (TypeModel.ExactlyInt.__init__):
2102         (TypeModel.ExactlyInt.get_input_param_type_text):
2103         (TypeModel.ExactlyInt.get_opt_output_type_):
2104         (TypeModel.init_class):
2105         (ExactlyInt):
2106         * inspector/InspectorAgent.cpp:
2107         (WebCore::InspectorAgent::enable):
2108         (WebCore::InspectorAgent::didCreateWorker):
2109         (WebCore::InspectorAgent::didDestroyWorker):
2110         (WebCore::InspectorAgent::evaluateForTestInFrontend):
2111         * inspector/InspectorApplicationCacheAgent.cpp:
2112         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
2113         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2114         * inspector/InspectorDOMAgent.cpp:
2115         (WebCore::InspectorDOMAgent::buildObjectForNode):
2116         * inspector/InspectorMemoryAgent.cpp:
2117         (WebCore::jsHeapInfo):
2118         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2119         * inspector/PageRuntimeAgent.cpp:
2120         (WebCore::PageRuntimeAgent::notifyContextCreated):
2121
2122 2012-05-28  Kentaro Hara  <haraken@chromium.org>
2123
2124         Unreviewed. Rebaselined run-binding-tests results.
2125
2126         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2127         (WebCore::JSTestActiveDOMObjectOwner::finalize):
2128         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2129         (WebCore::JSTestCustomNamedGetterOwner::finalize):
2130         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2131         (WebCore::JSTestEventConstructorOwner::finalize):
2132         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2133         (WebCore::JSTestEventTargetOwner::finalize):
2134         * bindings/scripts/test/JS/JSTestException.cpp:
2135         (WebCore::JSTestExceptionOwner::finalize):
2136         * bindings/scripts/test/JS/JSTestInterface.cpp:
2137         (WebCore::JSTestInterfaceOwner::finalize):
2138         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2139         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
2140         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2141         (WebCore::JSTestNamedConstructorOwner::finalize):
2142         * bindings/scripts/test/JS/JSTestObj.cpp:
2143         (WebCore::JSTestObjOwner::finalize):
2144         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2145         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
2146         * bindings/scripts/test/V8/V8TestObj.cpp:
2147         (WebCore::V8TestObj::installPerContextProperties):
2148
2149 2012-05-28  Darin Adler  <darin@apple.com>
2150
2151         StyleResolver need not allocate each MediaQueryResult on the heap
2152         https://bugs.webkit.org/show_bug.cgi?id=75223
2153
2154         Reviewed by Daniel Bates.
2155
2156         * css/MediaQuery.cpp: Removed some comments that pointed to CSS documents.
2157         There is no guarantee these links will be valid over time.
2158         (WebCore::MediaQuery::MediaQuery): Rewrote for clarity, conventional WebKit coding
2159         style, and simplicity.
2160         (WebCore::MediaQuery::copy): Moved out of line; not performance critical, and this
2161         allows us to cut down header dependencies.
2162         (WebCore::MediaQuery::cssText): Updated for change to data member name.
2163
2164         * css/MediaQuery.h: Removed unneeded includes. Removed non-helpful argument name
2165         "exprs". Changed expressions function to return a reference instead of
2166         a pointer. Changed mediaType and cssText functions to return a reference. Renamed
2167         m_serializationCache to m_serializedQuery. Moved copy function out of header.
2168
2169         * css/MediaQueryEvaluator.cpp: Renamed EvalFunc to MediaFeatureEvaluationFunction.
2170         Broke a FIXME into three and reworded for clarity.
2171         (WebCore::MediaQueryEvaluator): Updated for name changes.
2172         (WebCore::MediaQueryEvaluator::eval): Rewrote this for clarity and to regularize
2173         the logic a bit.
2174         (WebCore::aspect_ratioMediaFeatureEval): Got rid of a != 0 that is contrary to the
2175         normal WebKit style.
2176         (WebCore::device_aspect_ratioMediaFeatureEval): Ditto.
2177         (WebCore::transform_3dMediaFeatureEval): Fixed mangled #if that was here.
2178         (WebCore::view_modeMediaFeatureEval): Replaced UNUSED_PARAM usage with ASSERT_UNUSED.
2179         (WebCore::createFunctionMap): Changed this so it returns the map so we can use a
2180         cleaner style in the caller.
2181         (WebCore::MediaQueryEvaluator::eval): Updated to take a reference and improved the
2182         comments and coding style a bit.
2183
2184         * css/MediaQueryEvaluator.h: Updated comment style. Removed unused constructor.
2185         Removed unneeded destructor declaration. Renamed m_expResult to m_mediaFeatureResult.
2186
2187         * css/StyleResolver.cpp: Moved the MediaQueryResult class into this file
2188         and made it a structure rather than a class.
2189         (WebCore::StyleResolver::addViewportDependentMediaQueryResult): Updated to take
2190         a reference argument instead of a pointer and for the new vector type.
2191         (WebCore::StyleResolver::affectedByViewportChange): Updated for above changes.
2192
2193         * css/StyleResolver.h: Removed many unneeded includes and forward declarations of
2194         classes, including now-unneeded include of MediaQueryExp.h. Replaced MediaQueryResult
2195         definition with a forward declaration. Changed addViewportDependentMediaQueryResult
2196         to take a reference instead of a pointer. Changed m_viewportDependentMediaQueryResults
2197         to be a vector of values rather than of pointers.
2198
2199 2012-05-27  Shinya Kawanaka  <shinyak@chromium.org>
2200
2201         cut, copy or paste event won't be fired in Shadow DOM.
2202         https://bugs.webkit.org/show_bug.cgi?id=87352
2203
2204         Reviewed by Dimitri Glazkov.
2205
2206         cut, copy or paste event was not fired in Shadow DOM.
2207         Since event re-targeting has been implemented, it should be safe to fire them in Shadow DOM now.
2208
2209         Tests: fast/dom/shadow/cppevent-in-shadow.html
2210                fast/dom/shadow/cppevent-input-in-shadow.html
2211
2212         * editing/Editor.cpp:
2213         (WebCore::Editor::findEventTargetFrom):
2214
2215 2012-05-27  Hayato Ito  <hayato@chromium.org>
2216
2217         Support multiple shadow roots in event dispatching.
2218         https://bugs.webkit.org/show_bug.cgi?id=87470
2219
2220         Reviewed by Dimitri Glazkov.
2221
2222         The current implementation does not set event's target correctly
2223         if an event happens on DOM tree with multiple shadow roots.  So
2224         this patch updates an event re-targeting algorithm so that it
2225         works even if it is applied to multiple shadow roots.
2226
2227         Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
2228
2229         * dom/ComposedShadowTreeWalker.cpp:
2230         (WebCore::ComposedShadowTreeWalker::traverseParentIncludingInsertionPointAndShadowRoot):
2231         * dom/EventDispatcher.cpp:
2232         (WebCore::EventDispatcher::ensureEventAncestors):
2233
2234 2012-05-27  Benjamin Poulain  <benjamin@webkit.org>
2235
2236         Minor code cleaning for the interface of MainResourceLoader
2237         https://bugs.webkit.org/show_bug.cgi?id=87607
2238
2239         Reviewed by Darin Adler.
2240
2241         * loader/MainResourceLoader.cpp:
2242         (WebCore::MainResourceLoader::MainResourceLoader):
2243         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
2244         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
2245         * loader/MainResourceLoader.h:
2246         (MainResourceLoader):
2247         -Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
2248         -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
2249         -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
2250          only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
2251
2252 2012-05-27  Yoshifumi Inoue  <yosin@chromium.org>
2253
2254         [WTF] Introduce UINT64_C to MathExtras.h
2255         https://bugs.webkit.org/show_bug.cgi?id=87485
2256
2257         Reviewed by Kent Tamura.
2258
2259         This patch introduces UINT64_C for all platforms to avoid using
2260         conditional compilation.
2261
2262         No new tests. This patch doesn't change behavior.
2263
2264         * Modules/websockets/WebSocketFrame.cpp:
2265         (WebCore::WebSocketFrame::parseFrame): Replace conditional compilation with UINT64_C.
2266
2267 2012-05-27  Luke Macpherson  <macpherson@chromium.org>
2268
2269         Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables.
2270         https://bugs.webkit.org/show_bug.cgi?id=87462
2271
2272         Reviewed by Dimitri Glazkov.
2273
2274         Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation.
2275         This will allow future code to re-use the array of transform names, and StringBuilder is generally faster.
2276
2277         Covered by existing CSS transform tests.
2278
2279         * css/WebKitCSSTransformValue.cpp:
2280         (WebCore):
2281         (WebCore::WebKitCSSTransformValue::customCssText):
2282
2283 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
2284
2285         [BlackBerry] Update color for tap highlight and selection
2286         https://bugs.webkit.org/show_bug.cgi?id=87606
2287
2288         Reviewed by Antonio Gomes.
2289
2290         PR #154813
2291
2292         * platform/blackberry/RenderThemeBlackBerry.cpp:
2293         (WebCore::RenderThemeBlackBerry::platformTapHighlightColor):
2294         (WebCore::RenderThemeBlackBerry::platformActiveSelectionBackgroundColor):
2295
2296 2012-05-27  Benjamin Poulain  <bpoulain@apple.com>
2297
2298         When pages are loaded from AppCache with DeferredLoading, willSendRequest() is never called
2299         https://bugs.webkit.org/show_bug.cgi?id=87582
2300
2301         Reviewed by Darin Adler.
2302
2303         Previously, there was a shortcut when a deferred MainResourceLoader is resumed: If the data
2304         was coming from AppCache we could jump directly to startDataLoadTimer().
2305
2306         The problem with the shortcut is willSendRequest() is never called in that particular case
2307         (substituteData + deferred-resume). The imbalance between willSendRequest() and didReceiveResponse()
2308         causes problems.
2309
2310         This patch removes the shortcut so that MainResourceLoader::loadNow() is used regardless of
2311         the deferred loading. The method MainResourceLoader::loadNow() handle the substituteData as if the loading
2312         was not deferred.
2313
2314         Test: http/tests/appcache/load-from-appcache-defer-resume-crash.html
2315
2316         * loader/MainResourceLoader.cpp:
2317         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2318         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
2319         Rename the method to be consistent with the attribute it uses, making the naming more explicit.
2320         (WebCore::MainResourceLoader::loadNow):
2321         (WebCore::MainResourceLoader::setDefersLoading):
2322         * loader/MainResourceLoader.h:
2323         (MainResourceLoader):
2324
2325 2012-05-27  David Kilzer  <ddkilzer@apple.com>
2326
2327         Use xcrun to find gperf path on platforms that use Xcode
2328         <http://webkit.org/b/87587>
2329
2330         Reviewed by Dan Bernstein.
2331
2332         * WebCore.xcodeproj/project.pbxproj:
2333         (Generate Derived Sources): Set GPERF environment variable using
2334         xcrun.
2335         * css/makeprop.pl: Use GPERF environment variable if set, else
2336         "gperf".
2337         * css/makevalues.pl: Ditto.
2338         * make-hash-tools.pl: Ditto.
2339
2340 2012-05-27  Li Yin  <li.yin@intel.com>
2341
2342         [FileAPI] FileReader should fire progress event when blob has been completely read into memory
2343         https://bugs.webkit.org/show_bug.cgi?id=87585
2344
2345         Reviewed by Kentaro Hara.
2346
2347         From Spec: http://www.w3.org/TR/FileAPI/#dfn-progress-event
2348         One progress event will fire when blob has been completely read into memory.
2349         Firefox, Opera and IE follows the spec.
2350         Webkit based browser doesn't do that, it only fires progress event at interval of 50ms.
2351         WebKit should add the behavior to make the conformance with the spec.
2352
2353         Tests: fast/files/file-reader-event-listener.html
2354
2355         * fileapi/FileReader.cpp:
2356         (WebCore::FileReader::didFinishLoading):
2357
2358 2012-05-26  Li Yin  <li.yin@intel.com>
2359
2360         [FileAPI] The result attribute of FileReader shuold use null to replace empty string
2361         https://bugs.webkit.org/show_bug.cgi?id=87578
2362
2363         Reviewed by Kentaro Hara.
2364
2365         From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr
2366         Before read method has been called or an error in reading has occurred,
2367         the result attribute should be null, not empty string.
2368
2369         Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based 
2370         browser don't.
2371         WebKit should change the returned value empty string into null to keep 
2372         conformance with the spec.
2373
2374         Tests: fast/files/read-file-async.html
2375                fast/files/blob-slice-test.html
2376                fast/files/read-blob-async.html
2377                fast/files/workers/worker-read-blob-async.html
2378                fast/files/workers/worker-read-file-async.html
2379
2380         * fileapi/FileReader.cpp:
2381         (WebCore::FileReader::stringResult):
2382
2383 2012-05-26  Andy Estes  <aestes@apple.com>
2384
2385         Fix the build when NETSCAPE_PLUGIN_API is disabled by marking a
2386         parameter as unused.
2387
2388         * plugins/PluginData.cpp:
2389         (WebCore::PluginData::initPlugins):
2390
2391 2012-05-26  Nate Chapin  <japhet@chromium.org>
2392
2393         Cancel CachedResource loads when the last client is removed.
2394         https://bugs.webkit.org/show_bug.cgi?id=35377
2395
2396         Reviewed by Darin Adler.
2397
2398         Test: http/tests/cache/cancel-in-progress-load.html
2399
2400         * loader/SubresourceLoader.cpp:
2401         (WebCore::SubresourceLoader::errorLoadingResource):
2402         * loader/cache/CachedCSSStyleSheet.cpp:
2403         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
2404         * loader/cache/CachedFont.cpp:
2405         (WebCore::CachedFont::allClientsRemoved):
2406         * loader/cache/CachedImage.cpp:
2407         (WebCore::CachedImage::allClientsRemoved):
2408         * loader/cache/CachedRawResource.cpp:
2409         (WebCore):
2410         * loader/cache/CachedRawResource.h:
2411         (WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors):
2412         * loader/cache/CachedResource.cpp:
2413         (WebCore::CachedResource::allClientsRemoved):
2414         (WebCore):
2415         * loader/cache/CachedResource.h:
2416         (CachedResource):
2417         * loader/cache/CachedScript.cpp:
2418         (WebCore::CachedScript::allClientsRemoved):
2419
2420 2012-05-26  Simon Fraser  <simon.fraser@apple.com>
2421
2422         fast/block/inline-children-root-linebox-crash.html asserts after r118567
2423         https://bugs.webkit.org/show_bug.cgi?id=87544
2424
2425         Reviewed by Darin Adler.
2426         
2427         RenderInline::offsetFromContainer() set offsetDependsOnPoint to true based
2428         on the container's flipped writing mode. However, offsetFromContainer() would
2429         then overwrite that, since it only checked for columns.
2430         
2431         Fix by having RenderInline::offsetFromContainer() check for flipping on
2432         the container. This fixes the assertion.
2433         
2434         The new testcase exercises fixes another issue; unlike mapLocalToAbsolute(),
2435         RenderGeometryMap::absoluteRect() didn't pass the rect center point through
2436         the mapping, which resulted in a different result in some flipping cases.
2437
2438         Test: compositing/geometry/flipped-blocks-inline-mapping.html
2439
2440         * rendering/RenderGeometryMap.cpp:
2441         (WebCore::RenderGeometryMap::absoluteRect):
2442         * rendering/RenderInline.cpp:
2443         (WebCore::RenderInline::offsetFromContainer):
2444         (WebCore::RenderInline::pushMappingToContainer):
2445
2446 2012-05-26  Geoffrey Garen  <ggaren@apple.com>
2447
2448         WebKit should be lazy-finalization-safe (esp. the DOM) v2
2449         https://bugs.webkit.org/show_bug.cgi?id=87581
2450
2451         Reviewed by Oliver Hunt.
2452
2453         * bindings/js/JSDOMGlobalObject.cpp:
2454         (WebCore::JSDOMGlobalObject::destroy):
2455         * bindings/js/JSDOMWindowBase.cpp:
2456         (WebCore::JSDOMWindowBase::destroy):
2457         * bindings/js/JSDOMWindowShell.cpp:
2458         (WebCore::JSDOMWindowShell::destroy):
2459         * bindings/js/JSNodeCustom.cpp:
2460         (WebCore::JSNodeOwner::finalize):
2461         * bindings/js/JSWorkerContextBase.cpp:
2462         (WebCore::JSWorkerContextBase::destroy):
2463         * bindings/scripts/CodeGeneratorJS.pm:
2464         (GenerateImplementation):
2465         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2466         (WebCore::JSTestActiveDOMObject::destroy):
2467         (WebCore::JSTestActiveDOMObjectOwner::finalize):
2468         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2469         (WebCore::JSTestCustomNamedGetter::destroy):
2470         (WebCore::JSTestCustomNamedGetterOwner::finalize):
2471         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2472         (WebCore::JSTestEventConstructor::destroy):
2473         (WebCore::JSTestEventConstructorOwner::finalize):
2474         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2475         (WebCore::JSTestEventTarget::destroy):
2476         (WebCore::JSTestEventTargetOwner::finalize):
2477         * bindings/scripts/test/JS/JSTestException.cpp:
2478         (WebCore::JSTestException::destroy):
2479         (WebCore::JSTestExceptionOwner::finalize):
2480         * bindings/scripts/test/JS/JSTestInterface.cpp:
2481         (WebCore::JSTestInterface::destroy):
2482         (WebCore::JSTestInterfaceOwner::finalize):
2483         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2484         (WebCore::JSTestMediaQueryListListener::destroy):
2485         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
2486         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2487         (WebCore::JSTestNamedConstructor::destroy):
2488         (WebCore::JSTestNamedConstructorOwner::finalize):
2489         * bindings/scripts/test/JS/JSTestObj.cpp:
2490         (WebCore::JSTestObj::destroy):
2491         (WebCore::JSTestObjOwner::finalize):
2492         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2493         (WebCore::JSTestSerializedScriptValueInterface::destroy):
2494         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
2495         * bridge/objc/objc_runtime.mm:
2496         (JSC::Bindings::ObjcFallbackObjectImp::destroy):
2497         * bridge/qt/qt_runtime.cpp:
2498         (JSC::Bindings::QtRuntimeMethod::destroy):
2499         * bridge/qt/qt_runtime_qt4.cpp:
2500         (JSC::Bindings::QtRuntimeMethod::destroy):
2501         * bridge/runtime_array.cpp:
2502         (JSC::RuntimeArray::destroy):
2503         * bridge/runtime_method.cpp:
2504         (JSC::RuntimeMethod::destroy):
2505         * bridge/runtime_object.cpp:
2506         (JSC::Bindings::RuntimeObject::destroy):
2507         * bridge/runtime_root.cpp:
2508         (JSC::Bindings::RootObject::finalize): Use static_cast instead of jsCast because
2509         jsCast does Structure-based validation, and our Structure is not guaranteed
2510         to be alive when we get finalized.
2511
2512 2012-05-26  Simon Fraser  <simon.fraser@apple.com>
2513
2514         Clip rects assertion when hovering div with transform
2515         https://bugs.webkit.org/show_bug.cgi?id=87580
2516
2517         Reviewed by Eric Seidel.
2518         
2519         Hit testing used to use temporary clip rects in composited documents,
2520         until r118562. Now that we cache clip rects for hit testing, we need
2521         to clear the cache on descendant layers when a layer gains or loses
2522         a transform.
2523
2524         Test: fast/layers/clip-rects-assertion.html
2525
2526         * rendering/RenderLayer.cpp:
2527         (WebCore::RenderLayer::updateTransform):
2528
2529 2012-05-25  Dan Bernstein  <mitz@apple.com>
2530
2531         <rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen()
2532         https://bugs.webkit.org/show_bug.cgi?id=87571
2533
2534         Reviewed by Anders Carlsson.
2535
2536         fakeMouseEventTimerFired() uses the last known mouse position for the fake mouse event, but
2537         calls contentsToScreen() to compute a corresponding position in screen coordinates. Avoid
2538         this by also recording the last known mouse position in screen coordinates, and using that
2539         value.
2540
2541         * page/EventHandler.cpp:
2542         (WebCore::EventHandler::clear): Added resetting m_currentMouseGlobalPosition.
2543         (WebCore::EventHandler::handleMousePressEvent): Added updating m_currentMouseGlobalPosition
2544         when updating m_currentMousePosition.
2545         (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
2546         (WebCore::EventHandler::handleMouseMoveEvent): Ditto.
2547         (WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
2548         (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Changed to use m_currentMouseGlobalPosition
2549         in the fake event instead of calling contentsToScreen().
2550         * page/EventHandler.h: Added m_currentMouseGlobalPosition data member.
2551
2552 2012-05-25  Philippe Normand  <pnormand@igalia.com>
2553
2554         [GStreamer] Remove ImageGStreamerCG implementation
2555         https://bugs.webkit.org/show_bug.cgi?id=87559
2556
2557         The ImageGStreamerCG abstraction is being removed until I manage to
2558         port my gst-mac WebKit branch over to the WebKit2 mac port. No
2559         need to update the XCode project because this file is not
2560         referenced there anyway.
2561
2562         Reviewed by Martin Robinson.
2563
2564         * platform/graphics/gstreamer/ImageGStreamer.h:
2565         (ImageGStreamer):
2566         * platform/graphics/gstreamer/ImageGStreamerCG.mm: Removed.
2567
2568 2012-05-26  Rob Buis  <rwlbuis@webkit.org>
2569
2570         Bug 15799: textPath element does not re-render when referenced path changes
2571         https://bugs.webkit.org/show_bug.cgi?id=15799
2572
2573         Reviewed by Nikolas Zimmermann.
2574
2575         Support textPath updating to changes on the referenced path. To make this possible
2576         use the target reference functionality also used by SVGFEImageElement.
2577
2578         Tests: svg/custom/textPath-change-id-expected.svg
2579                svg/custom/textPath-change-id-pattern-expected.svg
2580                svg/custom/textPath-change-id-pattern.svg
2581                svg/custom/textPath-change-id.svg
2582                svg/custom/textPath-change-id2-expected.svg
2583                svg/custom/textPath-change-id2-pattern-expected.svg
2584                svg/custom/textPath-change-id2-pattern.svg
2585                svg/custom/textPath-change-id2.svg
2586                svg/custom/textPath-change-reference-expected.svg
2587                svg/custom/textPath-change-reference-pattern-expected.svg
2588                svg/custom/textPath-change-reference-pattern.svg
2589                svg/custom/textPath-change-reference-using-baseval-expected.svg
2590                svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg
2591                svg/custom/textPath-change-reference-using-baseval-pattern.svg
2592                svg/custom/textPath-change-reference-using-baseval.svg
2593                svg/custom/textPath-change-reference.svg
2594                svg/custom/textPath-change-reference2-expected.svg
2595                svg/custom/textPath-change-reference2-pattern-expected.svg
2596                svg/custom/textPath-change-reference2-pattern.svg
2597                svg/custom/textPath-change-reference2-using-baseval-expected.svg
2598                svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg
2599                svg/custom/textPath-change-reference2-using-baseval-pattern.svg
2600                svg/custom/textPath-change-reference2-using-baseval.svg
2601                svg/custom/textPath-change-reference2.svg
2602                svg/custom/textPath-insert-path-expected.svg
2603                svg/custom/textPath-insert-path-pattern-expected.svg
2604                svg/custom/textPath-insert-path-pattern.svg
2605                svg/custom/textPath-insert-path.svg
2606                svg/custom/textPath-modify-child-expected.svg
2607                svg/custom/textPath-modify-child-pattern-expected.svg
2608                svg/custom/textPath-modify-child-pattern.svg
2609                svg/custom/textPath-modify-child.svg
2610                svg/custom/textPath-path-change-expected.svg
2611                svg/custom/textPath-path-change-pattern-expected.svg
2612                svg/custom/textPath-path-change-pattern.svg
2613                svg/custom/textPath-path-change-using-svg-dom-expected.svg
2614                svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg
2615                svg/custom/textPath-path-change-using-svg-dom-pattern.svg
2616                svg/custom/textPath-path-change-using-svg-dom.svg
2617                svg/custom/textPath-path-change.svg
2618                svg/custom/textPath-path-change2-expected.svg
2619                svg/custom/textPath-path-change2-pattern-expected.svg
2620                svg/custom/textPath-path-change2-pattern.svg
2621                svg/custom/textPath-path-change2.svg
2622                svg/custom/textPath-remove-path-expected.svg
2623                svg/custom/textPath-remove-path-pattern-expected.svg
2624                svg/custom/textPath-remove-path-pattern.svg
2625                svg/custom/textPath-remove-path.svg
2626                svg/custom/textPath-set-id-expected.svg
2627                svg/custom/textPath-set-id.svg
2628                svg/custom/textPath-startoffset-expected.svg
2629                svg/custom/textPath-startoffset-pattern-expected.svg
2630                svg/custom/textPath-startoffset-pattern.svg
2631                svg/custom/textPath-startoffset.svg
2632
2633         * svg/SVGTextPathElement.cpp:
2634         (WebCore::SVGTextPathElement::~SVGTextPathElement):
2635         (WebCore):
2636         (WebCore::SVGTextPathElement::clearResourceReferences):
2637         (WebCore::SVGTextPathElement::svgAttributeChanged):
2638         (WebCore::SVGTextPathElement::buildPendingResource):
2639         (WebCore::SVGTextPathElement::insertedInto):
2640         (WebCore::SVGTextPathElement::removedFrom):
2641         * svg/SVGTextPathElement.h:
2642
2643 2012-05-26  Nikolas Zimmermann  <nzimmermann@rim.com>
2644
2645         Avoid updateFromElement() usage in SVG
2646         https://bugs.webkit.org/show_bug.cgi?id=87573
2647
2648         Stop relying on updateFromElement() - instead rely on addChild/removeChild, which
2649         allows us to optimize the resources re-fetching. When a child is added to the tree
2650         we don't need to remove existing resources from the SVGResourcesCache - the renderer
2651         can't be in the cache yet. Similary, remove the entry from the cache earlier: as soon
2652         as the renderer is removed from the tree, instead of waiting for willBeDestroyed().
2653
2654         No new tests, refactoring only.
2655
2656         * rendering/svg/RenderSVGBlock.cpp:
2657         * rendering/svg/RenderSVGBlock.h:
2658         (RenderSVGBlock):
2659         * rendering/svg/RenderSVGContainer.cpp:
2660         (WebCore::RenderSVGContainer::addChild):
2661         (WebCore):
2662         (WebCore::RenderSVGContainer::removeChild):
2663         * rendering/svg/RenderSVGContainer.h:
2664         (RenderSVGContainer):
2665         * rendering/svg/RenderSVGInline.cpp:
2666         (WebCore::RenderSVGInline::addChild):
2667         (WebCore::RenderSVGInline::removeChild):
2668         * rendering/svg/RenderSVGInline.h:
2669         (RenderSVGInline):
2670         * rendering/svg/RenderSVGModelObject.cpp:
2671         * rendering/svg/RenderSVGModelObject.h:
2672         (RenderSVGModelObject):
2673         * rendering/svg/RenderSVGResourceContainer.cpp:
2674         (WebCore::RenderSVGResourceContainer::registerResource):
2675         * rendering/svg/RenderSVGRoot.cpp:
2676         (WebCore::RenderSVGRoot::addChild):
2677         (WebCore):
2678         (WebCore::RenderSVGRoot::removeChild):
2679         * rendering/svg/RenderSVGRoot.h:
2680         (RenderSVGRoot):
2681         * rendering/svg/RenderSVGText.cpp:
2682         (WebCore::RenderSVGText::addChild):
2683         (WebCore::RenderSVGText::removeChild):
2684         * rendering/svg/SVGResourcesCache.cpp:
2685         (WebCore::SVGResourcesCache::clientStyleChanged):
2686         (WebCore::rendererCanHaveResources):
2687         (WebCore):
2688         (WebCore::SVGResourcesCache::clientWasAddedToTree):
2689         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
2690         * rendering/svg/SVGResourcesCache.h:
2691         (SVGResourcesCache):
2692         * svg/SVGStyledElement.cpp:
2693         * svg/SVGStyledElement.h:
2694         (SVGStyledElement):
2695
2696 2012-05-25  Nat Duca  <nduca@chromium.org>
2697
2698         [chromium] Instrument V8 GC with TraceEvent
2699         https://bugs.webkit.org/show_bug.cgi?id=87530
2700
2701         Reviewed by Kentaro Hara.
2702
2703         We sometimes get performance issues where performance stalls can
2704         be attributed to badly timed GC operations, especially ones that
2705         happen just before a frame running. This adds tracing calls around
2706         GC so that we can better understand these kinds of hangs.
2707
2708         * bindings/v8/V8GCController.cpp:
2709         (WebCore::V8GCController::gcPrologue):
2710         (WebCore::V8GCController::gcEpilogue):
2711
2712 2012-05-25  Garrett Casto  <gcasto@chromium.org>
2713
2714         Allow WebTextFieldDecoratorClient to see applied decorations.
2715         https://bugs.webkit.org/show_bug.cgi?id=86557
2716
2717         Reviewed by Kent Tamura.
2718
2719         * html/shadow/TextFieldDecorationElement.cpp:
2720         (WebCore::TextFieldDecorationElement::fromShadowRoot): A function
2721         that will extract a TextFielDecorationElement from a ShadowRoot, if
2722         there is one.
2723         * html/shadow/TextFieldDecorationElement.h:
2724         (WebCore):
2725         (TextFieldDecorator):
2726
2727 2012-05-25  Tony Chang  <tony@chromium.org>
2728
2729         implement new negative flexing algorithm
2730         https://bugs.webkit.org/show_bug.cgi?id=86528
2731
2732         Reviewed by Ojan Vafai.
2733
2734         Rather than just scale by the negative flexibility, we also take the
2735         flex-basis (preferred size) into consideration.  That means items with
2736         a larger preferred size will shrink faster.
2737
2738         Test: css3/flexbox/flex-algorithm.html (new test cases added)
2739
2740         * rendering/RenderFlexibleBox.cpp:
2741         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Handle overflow.
2742         (WebCore::RenderFlexibleBox::layoutFlexItems):
2743         (WebCore::RenderFlexibleBox::computeNextFlexLine): Sum weighted negative flex.
2744         (WebCore::RenderFlexibleBox::freezeViolations):
2745         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Shrink by weighted amount.
2746         Also handle large values by making sure the flex values are finite.
2747         * rendering/RenderFlexibleBox.h:
2748
2749 2012-05-25  Mihai Parparita  <mihaip@chromium.org>
2750
2751         Allow synchronous XHRs to be disabled in documents
2752         https://bugs.webkit.org/show_bug.cgi?id=87540
2753
2754         Reviewed by Eric Seidel.
2755
2756         Test: fast/xmlhttprequest/xmlhttprequest-sync-disabled.html
2757
2758         Synchronous XMLHttpRequests are a problematic API, since they result
2759         in blocked UI threads. Some clients may wish to always disable them;
2760         give them a setting to do so (see also r103629 for other cases where
2761         synchronous XHRs are disabled).
2762
2763         * page/Settings.cpp:
2764         (WebCore):
2765         (WebCore::Settings::Settings):
2766         * page/Settings.h:
2767         (Settings):
2768         (WebCore::Settings::setSyncXHRInDocumentsEnabled):
2769         (WebCore::Settings::syncXHRInDocumentsEnabled):
2770         * testing/InternalSettings.cpp:
2771         (WebCore::InternalSettings::InternalSettings):
2772         (WebCore::InternalSettings::restoreTo):
2773         (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled):
2774         (WebCore):
2775         * testing/InternalSettings.h:
2776         (InternalSettings):
2777         * testing/InternalSettings.idl:
2778         * xml/XMLHttpRequest.cpp:
2779         (WebCore::XMLHttpRequest::open):
2780
2781 2012-05-25  Kinuko Yasuda  <kinuko@chromium.org>
2782
2783         [chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata
2784         https://bugs.webkit.org/show_bug.cgi?id=87492
2785
2786         Reviewed by Adam Barth.
2787
2788         No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass.
2789
2790         * platform/chromium/FileSystemChromium.cpp:
2791         (WebCore::getFileSize):
2792         (WebCore::getFileModificationTime):
2793         (WebCore::getFileMetadata):
2794         * platform/chromium/PlatformSupport.h:
2795         (PlatformSupport):
2796
2797 2012-05-25  Abhishek Arya  <inferno@chromium.org>
2798
2799         Crash in RenderTableSection::paintCell.
2800         https://bugs.webkit.org/show_bug.cgi?id=87445
2801
2802         Reviewed by Eric Seidel and Julien Chaffraix.
2803
2804         Fix the crash by preventing table parts from being set
2805         as layout root. This prevents us from accessing removed
2806         table cells which can happen if RenderTableSection::layout
2807         is called directly without calling RenderTable::layout first
2808         (in case of cell recalc).
2809
2810         Add ASSERTs to RenderTableSection::layout to prevent
2811         layout to happen when we are already pending cell recalc
2812         or our table is pending section recalc. In those cases,
2813         RenderTable::layout should be called first to relayout
2814         the entire table.
2815
2816         Test: tables/table-section-overflow-clip-crash.html
2817
2818         * rendering/RenderObject.cpp:
2819         (WebCore::objectIsRelayoutBoundary):
2820         * rendering/RenderTableSection.cpp:
2821         (WebCore::RenderTableSection::layout):
2822
2823 2012-05-25  Philip Rogers  <pdr@google.com>
2824
2825         Fix for self-closing <use> tags
2826         https://bugs.webkit.org/show_bug.cgi?id=87504
2827
2828         Reviewed by Adam Barth.
2829
2830         This change causes self-closing non-html tags to behave the same
2831         as tags immediately followed by the closing tag.
2832
2833         Test: svg/custom/svg-self-closing-use.html
2834
2835         * html/parser/HTMLConstructionSite.cpp:
2836         (WebCore::HTMLConstructionSite::attachLater):
2837         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2838         (WebCore::HTMLConstructionSite::insertForeignElement):
2839         * html/parser/HTMLConstructionSite.h:
2840         (HTMLConstructionSite):
2841
2842 2012-05-25  Dan Bernstein  <mitz@apple.com>
2843
2844         Make the ICU-based implementation of NonSharedCharacterBreakIterator work in configurations
2845         that do not have COMPARE_AND_SWAP enabled.
2846
2847         Reviewed by Jessie Berlin.
2848
2849         * platform/text/TextBreakIteratorICU.cpp:
2850         (WebCore::compareAndSwapNonSharedCharacterBreakIterator): Added this helper. It uses
2851         weakCompareAndSwap when COMPARE_AND_SWAP is enabled, and uses a mutex to do the atomic
2852         compare and swap otherwise.
2853         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use
2854         compareAndSwapNonSharedCharacterBreakIterator().
2855         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
2856
2857 2012-05-25  Tommy Widenflycht  <tommyw@google.com>
2858
2859         MediaStream API: Make sure IceCallback is valid for PeerConnection00
2860         https://bugs.webkit.org/show_bug.cgi?id=87480
2861
2862         Reviewed by Adam Barth.
2863
2864         Existing tests have been extended to cover this change.
2865
2866         * Modules/mediastream/PeerConnection00.cpp:
2867         (WebCore::PeerConnection00::create):
2868         * Modules/mediastream/PeerConnection00.h:
2869         * Modules/mediastream/PeerConnection00.idl:
2870
2871 2012-05-25  Mike West  <mkwst@chromium.org>
2872
2873         Inline script and style blocked by Content Security Policy should provide more detailed console errors.
2874         https://bugs.webkit.org/show_bug.cgi?id=86848
2875
2876         Reviewed by Adam Barth.
2877
2878         This change adds a URL and line number for context to each call to
2879         `ContentSecurityPolicy::allowInline*`, and pipes it through to the
2880         console message generation in `CSPDirectiveList::reportViolation`.
2881
2882         Line numbers are not added for injected scripts (`document.write(...)`,
2883         `document.body.appendChild`, and etc.).
2884
2885         Tests: http/tests/security/contentSecurityPolicy/injected-inline-script-allowed.html
2886                http/tests/security/contentSecurityPolicy/injected-inline-script-blocked.html
2887                http/tests/security/contentSecurityPolicy/injected-inline-style-allowed.html
2888                http/tests/security/contentSecurityPolicy/injected-inline-style-blocked.html
2889
2890         * bindings/ScriptControllerBase.cpp:
2891         (WebCore::ScriptController::executeIfJavaScriptURL):
2892         * bindings/js/JSLazyEventListener.cpp:
2893         (WebCore::JSLazyEventListener::initializeJSFunction):
2894         * bindings/v8/V8LazyEventListener.cpp:
2895         (WebCore::V8LazyEventListener::prepareListenerObject):
2896         * dom/ScriptElement.cpp:
2897         (WebCore::ScriptElement::ScriptElement):
2898         (WebCore::ScriptElement::executeScript):
2899         * dom/ScriptElement.h:
2900         (ScriptElement):
2901         * dom/StyleElement.cpp:
2902         (WebCore::StyleElement::StyleElement):
2903         (WebCore::StyleElement::createSheet):
2904         * dom/StyleElement.h:
2905         (StyleElement):
2906         * dom/StyledElement.cpp:
2907         (WebCore::StyledElement::StyledElement):
2908         (WebCore):
2909         (WebCore::StyledElement::style):
2910         (WebCore::StyledElement::styleAttributeChanged):
2911         * dom/StyledElement.h:
2912         (StyledElement):
2913         * page/ContentSecurityPolicy.cpp:
2914         (CSPDirectiveList):
2915         (WebCore::CSPDirectiveList::reportViolation):
2916         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
2917         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
2918         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
2919         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
2920         (WebCore::CSPDirectiveList::allowInlineScript):
2921         (WebCore::CSPDirectiveList::allowInlineStyle):
2922         (WebCore::CSPDirectiveList::allowEval):
2923         (WebCore):
2924         (WebCore::isAllowedByAllWithCallStack):
2925         (WebCore::isAllowedByAllWithContext):
2926         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2927         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2928         (WebCore::ContentSecurityPolicy::allowInlineScript):
2929         (WebCore::ContentSecurityPolicy::allowInlineStyle):
2930         * page/ContentSecurityPolicy.h:
2931         (WTF):
2932
2933 2012-05-25  Tim Horton  <timothy_horton@apple.com>
2934
2935         ENABLE_CSS3_FLEXBOX is insufficient to disable all web-facing bits of the feature
2936         https://bugs.webkit.org/show_bug.cgi?id=87537
2937         <rdar://problem/11524921>
2938
2939         Reviewed by Simon Fraser.
2940
2941         Allow the feature flag to disable more web-facing parts of the CSS3 flexbox
2942         implementation (primarily fallout from hiding it from computed style).
2943
2944         * css/CSSComputedStyleDeclaration.cpp:
2945         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2946         * css/CSSParser.cpp:
2947         (WebCore::isValidKeywordPropertyAndValue):
2948         (WebCore::isKeywordPropertyID):
2949         (WebCore::CSSParser::parseValue):
2950         * css/CSSPrimitiveValueMappings.h:
2951         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2952         * css/CSSProperty.cpp:
2953         (WebCore::CSSProperty::isInheritedProperty):
2954         * css/CSSPropertyNames.in:
2955         * css/CSSValueKeywords.in:
2956         * css/StyleBuilder.cpp:
2957         (WebCore::StyleBuilder::StyleBuilder):
2958         * css/StylePropertySet.cpp:
2959         (WebCore::StylePropertySet::getPropertyValue):
2960         (WebCore::StylePropertySet::asText):
2961         * css/StylePropertyShorthand.cpp:
2962         (WebCore::shorthandForProperty):
2963         * css/StylePropertyShorthand.h:
2964         * css/StyleResolver.cpp:
2965         (WebCore::StyleResolver::collectMatchingRulesForList):
2966         * page/animation/CSSPropertyAnimation.cpp:
2967         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
2968         * rendering/RenderObject.cpp:
2969         (WebCore::RenderObject::createObject):
2970         * rendering/style/RenderStyleConstants.h:
2971
2972 2012-05-25  Adrienne Walker  <enne@google.com>
2973
2974         [chromium] Add setting for painting debug info onto tiles
2975         https://bugs.webkit.org/show_bug.cgi?id=75763
2976
2977         Reviewed by James Robinson.
2978
2979         Add a compile-time CCSetting to paint debug information onto tiles. This
2980         can help to understand paint counts and layer indices. This setting is
2981         off by default.
2982
2983         * platform/graphics/chromium/ContentLayerChromium.cpp:
2984         (WebCore::ContentLayerPainter::create):
2985         (WebCore::ContentLayerPainter::paint):
2986         (WebCore::ContentLayerPainter::ContentLayerPainter):
2987         (WebCore::ContentLayerChromium::createTextureUpdater):
2988         * platform/graphics/chromium/TiledLayerChromium.cpp:
2989         (WebCore::UpdatableTile::UpdatableTile):
2990         (WebCore::UpdatableTile::setUpdateFrame):
2991         (WebCore::UpdatableTile::incrementPaintCount):
2992         (WebCore::UpdatableTile::updateFrame):
2993         (WebCore::UpdatableTile::paintCount):
2994         (WebCore::TiledLayerChromium::TiledLayerChromium):
2995         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2996         (WebCore::TiledLayerChromium::paintDebugTileInfo):
2997         * platform/graphics/chromium/TiledLayerChromium.h:
2998         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2999         (WebCore::CCSettings::CCSettings):
3000
3001 2012-05-25  Ami Fischman  <fischman@chromium.org>
3002
3003         [chromium] Default media controls should render only the currentTime-containing buffered range
3004         https://bugs.webkit.org/show_bug.cgi?id=85925
3005
3006         Reviewed by Eric Carlson.
3007
3008         Test: http/tests/media/video-buffered-range-contains-currentTime.html
3009
3010         * rendering/RenderMediaControlsChromium.cpp:
3011         (WebCore::paintMediaSlider):
3012
3013 2012-05-25  Simon Fraser  <simon.fraser@apple.com>
3014
3015         Build fix: add TransformationMatrix ctor from an AffineTransform.
3016
3017         * platform/graphics/transforms/TransformationMatrix.cpp:
3018         (WebCore::TransformationMatrix::TransformationMatrix):
3019         (WebCore):
3020         * platform/graphics/transforms/TransformationMatrix.h:
3021         (TransformationMatrix):
3022
3023 2012-05-24  Ryosuke Niwa  <rniwa@webkit.org>
3024
3025         createContextualFragment and insertAdjacentHTML should throw syntax error
3026         https://bugs.webkit.org/show_bug.cgi?id=87454
3027
3028         Reviewed by Darin Adler.
3029
3030         Before this patch, createContextualFragment threw NOT_SUPPORTED_ERR and insertAdjacentHTML didn't throw any errors.
3031         Make them throw SYNTAX_ERR to be consistent with the spec and Firefox:
3032         http://html5.org/specs/dom-parsing.html#parsing
3033         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm
3034
3035         Also reduced the code duplication.
3036
3037         Test: fast/dom/xhtml-fragment-parsing-exceptions.xhtml
3038
3039         * dom/Range.cpp:
3040         (WebCore::Range::createContextualFragment):
3041         * dom/ShadowRoot.cpp:
3042         (WebCore::ShadowRoot::setInnerHTML): Explicitly pass AllowScriptingContent. 
3043         * editing/markup.cpp:
3044         (WebCore::createFragmentFromMarkup):
3045         (WebCore::createFragmentForInnerOuterHTML): Takes ExceptionCode now.
3046         (WebCore::createContextualFragment): Share code with createFragmentForInnerOuterHTML
3047         and propagate the exception code.
3048         * editing/markup.h:
3049         * html/HTMLElement.cpp:
3050         (WebCore::HTMLElement::setInnerHTML): Explicitly pass AllowScriptingContent.
3051         (WebCore::HTMLElement::setOuterHTML): Ditto.
3052         (WebCore::HTMLElement::insertAdjacentHTML): Ditto; also rename ignoredEc to ignoredEC
3053         per Darin's comment on the bug 87339.
3054
3055 2012-05-25  John Knottenbelt  <jknotten@chromium.org>
3056
3057         Body scrollWidth() and scrollHeight() should be page scale-invariant
3058         https://bugs.webkit.org/show_bug.cgi?id=87494
3059
3060         RenderView::documentRect() is calculating the "scaled" document rect by applying
3061         the current transformation matrix to the unscaledDocumentRect() and then
3062         returning the rounded-out IntRect result.
3063
3064         This rounding out is incorrect because it allows the scaled rectangle to
3065         represent an area that is not actually covered by the document.
3066
3067         We fix this by applying the current transform to the document rect
3068         as a FloatRect and then explicitly converting to IntRect, which
3069         takes the floor of the resulting rectangle coordinates instead of
3070         rounding them out.
3071
3072         This is evidenced by the document.body.scrollWidth() and
3073         document.body.scrollHeight() changing under page scale factor when
3074         they are expected to remain invariant.
3075
3076         Reviewed by James Robinson.
3077
3078         Test: fast/dom/window-scroll-scaling.html
3079
3080         * rendering/RenderView.cpp:
3081         (WebCore::RenderView::documentRect):
3082
3083 2012-05-25  Dan Bernstein  <mitz@apple.com>
3084
3085         characterBreakIterator() is not safe to use reentrantly or from multiple threads
3086         https://bugs.webkit.org/show_bug.cgi?id=87521
3087
3088         Reviewed by Darin Adler.
3089
3090         Replaced characterBreakIterator() with a NonSharedCharacterBreakIterator class, which
3091         obtains a unique TextBreakIterator. Replaced the global shared instance with a single-entry
3092         cache.
3093
3094         * dom/CharacterData.cpp:
3095         (WebCore::CharacterData::parserAppendData): Changed to use NonSharedCharacterBreakIterator.
3096
3097         * platform/graphics/StringTruncator.cpp:
3098         (WebCore::centerTruncateToBuffer): Ditto.
3099         (WebCore::rightTruncateToBuffer): Ditto.
3100
3101         * platform/text/String.cpp:
3102         (WebCore::numGraphemeClusters): Ditto.
3103         (WebCore::numCharactersInGraphemeClusters): Ditto.
3104
3105         * platform/text/TextBreakIterator.h: Removed the declaration of characterBreakIterator().
3106         (NonSharedCharacterBreakIterator): Added. An instance of this class has a character break
3107         iterator instance that is unique to it for the lifetime of the instance.
3108         (WebCore::NonSharedCharacterBreakIterator::operator TextBreakIterator*): Added.
3109
3110         * platform/text/TextBreakIteratorICU.cpp:
3111         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Added. Tries
3112         to swap the m_iterator member variable with the cached instance. If that fails, initializes
3113         m_iterator to a new character break iterator.
3114         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Added. Tries
3115         to put the m_iterator member variable back in the cache. If that fails, meaning there is
3116         already something in the cache, destroys m_iterator.
3117
3118         * platform/text/gtk/TextBreakIteratorGtk.cpp:
3119         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
3120         TextBreakIteratorICU.cpp.
3121         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
3122         (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
3123         here.
3124
3125         * platform/text/qt/TextBreakIteratorQt.cpp:
3126         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
3127         TextBreakIteratorICU.cpp.
3128         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
3129         (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
3130         here.
3131
3132         * platform/text/wince/TextBreakIteratorWinCE.cpp:
3133         (WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
3134         TextBreakIteratorICU.cpp.
3135         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
3136         (WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
3137         here.
3138
3139 2012-05-25  Simon Fraser  <simon.fraser@apple.com>
3140
3141         Terrible performance on http://alliances.commandandconquer.com/ and http://www.lordofultima.com/
3142         https://bugs.webkit.org/show_bug.cgi?id=84410
3143
3144         Reviewed by Dave Hyatt.
3145         
3146         First part of fixing O(N^2) issues when walking the RenderLayer tree
3147         for computeCompositingRequirements().
3148         
3149         For each layer that goes into the OverlapMap, we were computing an absolute
3150         layer bounds, which requires walking back to the root of the tree.
3151         Optimize this when possible by storing a stack of offsets as we walk
3152         the tree, and using this stack to do the mapping.
3153         
3154         The stack of offsets and transforms is managed by RenderGeometryMap.
3155         When visiting a RenderLayer, RenderLayerCompositor pushes onto
3156         the geometry map stack data about offsets and transforms between
3157         the current layer and its stacking-parent. RenderGeometryMap handles
3158         the case where the previous renderer pushed is between the current
3159         renderer and its container. RenderGeometryMap can also handle callers
3160         pushing renderers with multiple containers between them.
3161         
3162         RenderGeometryMap stores some flags about whether the set of mapping
3163         steps in the stack involve transforms, fixed position, or special non-uniform
3164         mappings like CSS columns. In some cases, it falls back to mapping via
3165         renderers.
3166
3167         Once constructed, the RenderGeometryMap stack can be used to map multiple
3168         rects or points efficiently. Stacks consisting of simple offsets are
3169         collapsed to a single offset.
3170         
3171         Mappings between renderers and their containers are pushed by pushMappingToContainer()
3172         methods, which are similar to mapLocalToContainer() methods. Having this code
3173         in RenderObjects was deemed preferable to handling columns, transforms etc. all in
3174         RenderLayer code.
3175
3176         Tested by assertions in RenderGeometryMap code that its mapping matches
3177         mapping via localToAbsolute() calls.
3178         
3179         RenderLayerCompositor::updateCompositingLayers() creates a RenderGeometryMap,
3180         and pushes and pops layer renderers as it visits them. The geometry map is used
3181         by RenderLayerCompositor::addToOverlapMap() when computing absolute layer bounds.
3182         
3183         Futher optimizations in RenderGeometryMap are possible, especially with stacks that
3184         have many offsets and a few transforms.
3185
3186         Tests: compositing/geometry/composited-in-columns.html
3187                compositing/geometry/flipped-writing-mode.html
3188
3189         * CMakeLists.txt: Add RenderGeometryMap
3190         * GNUmakefile.list.am: Ditt
3191         * Target.pri: Ditto
3192         * WebCore.gypi: Ditto
3193         * WebCore.vcproj/WebCore.vcproj: Ditto
3194         * WebCore.xcodeproj/project.pbxproj: Ditto
3195         * rendering/RenderBox.cpp:
3196         (WebCore::RenderBox::absoluteContentBox):
3197         (WebCore::RenderBox::pushMappingToContainer):
3198         (WebCore::RenderBox::offsetFromContainer):
3199         * rendering/RenderBox.h:
3200         * rendering/RenderGeometryMap.cpp: Added.
3201         (RenderGeometryMapStep):
3202         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep):
3203         (WebCore::RenderGeometryMapStep::mapPoint):
3204         (WebCore::RenderGeometryMapStep::mapQuad):
3205         (WebCore::RenderGeometryMap::RenderGeometryMap):
3206         (WebCore::RenderGeometryMap::~RenderGeometryMap):
3207         (WebCore::RenderGeometryMap::absolutePoint):
3208         (WebCore::RenderGeometryMap::absoluteRect):
3209         (WebCore::RenderGeometryMap::mapToAbsolute):
3210         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
3211         (WebCore::RenderGeometryMap::push):
3212         (WebCore::RenderGeometryMap::pushView):
3213         (WebCore::RenderGeometryMap::popMappingsToAncestor):
3214         (WebCore::RenderGeometryMap::stepInserted):
3215         (WebCore::RenderGeometryMap::stepRemoved):
3216         * rendering/RenderGeometryMap.h: Added.
3217         (RenderGeometryMap):
3218         (WebCore::RenderGeometryMap::hasNonUniformStep):
3219         (WebCore::RenderGeometryMap::hasTransformStep):
3220         (WebCore::RenderGeometryMap::hasFixedPositionStep):
3221         * rendering/RenderInline.cpp:
3222         (WebCore::RenderInline::offsetFromContainer):
3223         (WebCore::RenderInline::pushMappingToContainer):
3224         * rendering/RenderInline.h:
3225         (RenderInline):
3226         * rendering/RenderLayerCompositor.cpp:
3227         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3228         (WebCore::RenderLayerCompositor::addToOverlapMap):
3229         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
3230         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3231         * rendering/RenderLayerCompositor.h:
3232         (RenderLayerCompositor):
3233         * rendering/RenderObject.cpp:
3234         (WebCore::RenderObject::mapLocalToContainer):
3235         (WebCore::RenderObject::pushMappingToContainer):
3236         (WebCore::RenderObject::offsetFromContainer):
3237         (WebCore::RenderObject::container):
3238         * rendering/RenderObject.h:
3239         * rendering/RenderTableCell.cpp:
3240         (WebCore::RenderTableCell::offsetFromContainer):
3241         * rendering/RenderTableCell.h:
3242         (RenderTableCell):
3243         * rendering/RenderView.cpp:
3244         (WebCore::RenderView::pushMappingToContainer):
3245         * rendering/RenderView.h:
3246         * rendering/svg/RenderSVGForeignObject.cpp:
3247         (WebCore::RenderSVGForeignObject::pushMappingToContainer):
3248         * rendering/svg/RenderSVGForeignObject.h:
3249         (RenderSVGForeignObject):
3250         * rendering/svg/RenderSVGInline.cpp:
3251         (WebCore::RenderSVGInline::pushMappingToContainer):
3252         * rendering/svg/RenderSVGInline.h:
3253         (RenderSVGInline):
3254         * rendering/svg/RenderSVGModelObject.cpp:
3255         (WebCore::RenderSVGModelObject::pushMappingToContainer):
3256         * rendering/svg/RenderSVGModelObject.h:
3257         (RenderSVGModelObject):
3258         * rendering/svg/RenderSVGRoot.cpp:
3259         (WebCore::RenderSVGRoot::pushMappingToContainer):
3260         * rendering/svg/RenderSVGRoot.h:
3261         (RenderSVGRoot):
3262         * rendering/svg/RenderSVGText.cpp:
3263         (WebCore::RenderSVGText::pushMappingToContainer):
3264         * rendering/svg/RenderSVGText.h:
3265         (RenderSVGText):
3266         * rendering/svg/SVGRenderSupport.cpp:
3267         (WebCore::SVGRenderSupport::pushMappingToContainer):
3268         * rendering/svg/SVGRenderSupport.h:
3269         (SVGRenderSupport):
3270
3271 2012-05-25  Simon Fraser  <simon.fraser@apple.com>
3272
3273         Cache absolute clip rects on RenderLayer for compositing overlap testing
3274         https://bugs.webkit.org/show_bug.cgi?id=87212
3275
3276         Reviewed by Dave Hyatt.
3277         
3278         Enhance the cache of ClipRects on RenderLayers to store three
3279         different types of ClipRects, rather than just one.
3280         
3281         We need to compute clip rects relative to different layers
3282         for different purposes. For painting, we compute relative to
3283         the compositing layer which is acting as a painting root.
3284         For hit testing, we compute relative to the root, except
3285         for transformed layers. For composting overlap testing, we
3286         compute relative to the root ("absolute"). At other times, we do one-off
3287         computation which we never want to cache ("temporary clip rects").
3288         
3289         This change allows us to cache rects for hit testing, and for
3290         compositing overlap testing. This has huge performance benefits
3291         on some pages (bug 84410).
3292         
3293         This change also makes ClipRects not arena-allocated, so we
3294         can use RefPtr<ClipRect>.
3295
3296         No testable behavior change.
3297
3298         * rendering/RenderBoxModelObject.cpp:
3299         (WebCore::RenderBoxModelObject::willBeDestroyed): No need for the
3300         explicit clipRects teardown, since clipRects don't need a live
3301         RenderObject for arena-based destruction.
3302
3303         * rendering/RenderLayer.cpp: Remove arena-related new and delete.
3304         (WebCore::RenderLayer::RenderLayer): No need to explicitly initialize m_clipRects,
3305         since it's an OwnPtr now.
3306         (WebCore::RenderLayer::~RenderLayer): No explicit clipRect teardown required.
3307         (WebCore::RenderLayer::clippingRootForPainting): Renamed to make its purpose
3308         more obvious.
3309         (WebCore::RenderLayer::paintLayer): Use the TemporaryClipRects type when necessary.
3310         (WebCore::RenderLayer::paintLayerContents): Ditto
3311         (WebCore::RenderLayer::hitTestLayer): No longer need to use temporary clipRects when
3312         hit testing since we cache clip rects for hit testing.
3313         (WebCore::RenderLayer::updateClipRects): Take a ClipRectsType and pass it through.
3314         (WebCore::RenderLayer::calculateClipRects): Ditto
3315         (WebCore::RenderLayer::parentClipRects): Ditto
3316         (WebCore::RenderLayer::backgroundClipRect): Ditto
3317         (WebCore::RenderLayer::calculateRects): Take ClipRectsType, which obviates temporaryClipRects.
3318         (WebCore::RenderLayer::childrenClipRect): Use clippingRootForPainting().
3319         (WebCore::RenderLayer::selfClipRect): Ditto
3320         (WebCore::RenderLayer::localClipRect): Ditto
3321         (WebCore::RenderLayer::clearClipRectsIncludingDescendants): Take a type of clip rect to clear
3322         (include all). Allows us to just clear painting clip rects.
3323         (WebCore::RenderLayer::clearClipRects):
3324
3325         * rendering/RenderLayer.h:
3326         (WebCore::ClipRects::create): We don't use RefCounted<> in order to use a bit in
3327         the refCount for a flag. Add create() method.
3328         (WebCore::ClipRects::deref): No longer arena-allocated.
3329         (WebCore::ClipRectsCache::ClipRectsCache): Struct that holds a small
3330         array of the 3 types of clipRects (and, in debug, the layer relative
3331         to which they were computed).
3332         (WebCore::RenderLayer::clipRects):
3333
3334         * rendering/RenderLayerBacking.cpp:
3335         (WebCore::RenderLayerBacking::updateCompositedBounds): Use AbsoluteClipRects; rootLayer
3336         is always the RenderView's layer here.
3337         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use TemporaryClipRects.
3338         (WebCore::RenderLayerBacking::setRequiresOwnBackingStore): When this variable changes,
3339         we need to invalidate painting clipRects, since it affects the ancestor relative to which
3340         those rects are computed.
3341
3342         * rendering/RenderLayerBacking.h:
3343         * rendering/RenderLayerCompositor.cpp:
3344         (WebCore::RenderLayerCompositor::updateBacking): When the composited state
3345         of a layer changes, we have to clear all descendant clip rects, since this
3346         can affect the layers relative to which clip rects are computed.
3347         (WebCore::RenderLayerCompositor::addToOverlapMap): Use AbsoluteClipRects.
3348         (WebCore::RenderLayerCompositor::computeCompositingRequirements): No need
3349         to call updateLayerPosition(), since that should have always happened after
3350         layout. That call cleared clip rects, so removing it is very beneficial.
3351         (WebCore::RenderLayerCompositor::clippedByAncestor): Use TemporaryClipRects.
3352
3353         * rendering/RenderTreeAsText.cpp:
3354         (WebCore::writeLayers): Use TemporaryClipRects.
3355
3356 2012-05-25  Dean Jackson  <dino@apple.com>
3357
3358         Unreviewed, rolling out r112155.
3359         http://trac.webkit.org/changeset/112155
3360         https://bugs.webkit.org/show_bug.cgi?id=79389
3361         Hitch (due to style recalc?) when starting CSS3 animation
3362
3363         This caused a number of issues, including:
3364         https://bugs.webkit.org/show_bug.cgi?id=87146
3365         https://bugs.webkit.org/show_bug.cgi?id=84194
3366         <rdar://problem/11506629>
3367         <rdar://problem/11267408>
3368         <rdar://problem/11531859>
3369
3370         * dom/Element.cpp:
3371         (WebCore::Element::recalcStyle):
3372
3373 2012-05-25  David Hyatt  <hyatt@apple.com>
3374
3375         https://bugs.webkit.org/show_bug.cgi?id=87525
3376         
3377         For the new multi-column layout, create a flow thread and make sure the children get put inside it.
3378
3379         Reviewed by Eric Seidel.
3380
3381         * rendering/RenderMultiColumnBlock.cpp:
3382         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3383         (WebCore::RenderMultiColumnBlock::addChild):
3384         (WebCore):
3385         * rendering/RenderMultiColumnBlock.h:
3386         (WebCore):
3387         (RenderMultiColumnBlock):
3388         (WebCore::RenderMultiColumnBlock::flowThread):
3389         * rendering/RenderMultiColumnFlowThread.cpp:
3390         (WebCore::RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread):
3391         (WebCore):
3392         * rendering/RenderMultiColumnFlowThread.h:
3393         (RenderMultiColumnFlowThread):
3394         * rendering/RenderMultiColumnSet.h:
3395         * rendering/RenderObject.h:
3396         (RenderObject):
3397         (WebCore::RenderObject::isRenderMultiColumnSet):
3398
3399 2012-05-25  Emil A Eklund  <eae@chromium.org>
3400
3401         Change RenderBoxModelObject to compute relativePositionOffset as size
3402         https://bugs.webkit.org/show_bug.cgi?id=87447
3403
3404         Reviewed by Eric Seidel.
3405
3406         Compute relativePositionOffset as size instead of doing one axis at a
3407         time as all call sites uses the size version of the method. This avoids
3408         having to walk the DOM twice to accumulate the offsets.
3409
3410         Also remove the relativePositionOffsetX and Y methods as they are no
3411         longer used.
3412
3413         No new tests, covered by existing tests.
3414
3415         * rendering/RenderBox.cpp:
3416         (WebCore::RenderBox::layoutOverflowRectForPropagation):
3417         * rendering/RenderBoxModelObject.cpp:
3418         (WebCore::accumulateRelativePositionOffsets):
3419         (WebCore::RenderBoxModelObject::relativePositionOffset):
3420         * rendering/RenderBoxModelObject.h:
3421         (RenderBoxModelObject):
3422
3423 2012-05-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3424
3425         Unreviewed, rolling out r118395.
3426         http://trac.webkit.org/changeset/118395
3427         https://bugs.webkit.org/show_bug.cgi?id=87526
3428
3429         Breaking sites including GMail and Yahoo mail (Requested by
3430         jsbell on #webkit).
3431
3432         * rendering/RenderBlock.cpp: