1f09ebfc5056ac6e111ea540bb6f720d4d69c7a7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-30  Keishi Hattori  <keishi@webkit.org>
2
3         Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium
4         https://bugs.webkit.org/show_bug.cgi?id=80972
5
6         Reviewed by Kent Tamura.
7
8         * CMakeLists.txt:
9         * Configurations/FeatureDefines.xcconfig:
10         * GNUmakefile.am:
11         * WebCore.exp.in:
12         * css/html.css:
13         * html/ColorInputType.cpp:
14         * html/ColorInputType.h:
15         * html/HTMLInputElement.cpp:
16         (WebCore):
17         * html/HTMLInputElement.h:
18         (HTMLInputElement):
19         * html/InputType.cpp:
20         (WebCore::createInputTypeFactoryMap):
21         (WebCore):
22         (InputTypeNames):
23         * html/InputType.h:
24         (InputType):
25         (InputTypeNames):
26         * loader/EmptyClients.h:
27         (EmptyChromeClient):
28         * page/Chrome.cpp:
29         (WebCore):
30         * page/Chrome.h:
31         (WebCore):
32         (Chrome):
33         * page/ChromeClient.h:
34         (WebCore):
35         (ChromeClient):
36         * platform/ColorChooser.h:
37         * platform/ColorChooserClient.h:
38         * testing/InternalSettings.cpp:
39         * testing/Internals.cpp:
40         (WebCore):
41         * testing/Internals.h:
42         (Internals):
43         * testing/Internals.idl:
44
45 2012-03-30  Charles Wei  <charles.wei@torchmobile.com.cn>
46
47         [BlackBerry] EventLoop::platformInit() obsolete.
48         https://bugs.webkit.org/show_bug.cgi?id=82709
49
50         Reviewed by Rob Buis.
51
52         No new tests, build fix for BlackBerry porting.
53
54         * platform/blackberry/EventLoopBlackBerry.cpp:
55
56 2012-03-30  Vsevolod Vlasov  <vsevik@chromium.org>
57
58         Web Inspector: ScriptsNavigator should open scripts with single click (not double click).
59         https://bugs.webkit.org/show_bug.cgi?id=82723
60
61         Reviewed by Pavel Feldman.
62
63         This patch makes ScriptsNavigator open scripts with single click.
64
65         * inspector/front-end/ScriptsNavigator.js:
66         (WebInspector.NavigatorScriptTreeElement.prototype.onattach):
67         (WebInspector.NavigatorScriptTreeElement.prototype._onclick):
68
69 2012-03-30  Vineet Chaudhary  <rgf748@motorola.com>
70
71         IDLParser.pm should be able to parse sequence<T> as method argument.
72         https://bugs.webkit.org/show_bug.cgi?id=82599
73
74         Reviewed by Kentaro Hara.
75
76         With this patch IDL parser should support sequence<T> as method argument.
77         Current behaviour is argument name is not parsed hence shows empty spaces instead.
78
79         Tests: bindings/scripts/test/TestObj.idl
80
81         * bindings/scripts/CodeGeneratorCPP.pm:
82         (SkipFunction): Skip functions for specific type.
83         (SkipAttribute): Skip functions for specific type.
84         (AddIncludesForType): Skip header for sequence<T> type.
85         (GenerateHeader): Skip header and declaration for sequence<T> type.
86         (GenerateImplementation): Skip header and implementation for sequence<T> type.
87         * bindings/scripts/CodeGeneratorGObject.pm:
88         (SkipFunction): Skip functions for sequence<T> type.
89         * bindings/scripts/CodeGeneratorObjC.pm:
90         (SkipFunction): Skip functions for specific type.
91         (SkipAttribute): Skip functions for specific type.
92         (AddForwardDeclarationsForType): Skip header for sequence<T> type.
93         (AddIncludesForType): Skip header for sequence<T> type.
94         (GenerateHeader):Skip header and declaration for sequence<T> type.
95         (GenerateImplementation): Skip header and implementation for sequence<T> type.
96         * bindings/scripts/CodeGeneratorV8.pm:
97         (CreateCustomSignature): Add appropriate headers.
98         * bindings/scripts/IDLStructure.pm: Add support to parse sequence<T>.
99         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Modified results from run-binding-tests.
100         (WebDOMTestObj::objMethodWithArgs):
101         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
102         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
103         (webkit_dom_test_obj_obj_method_with_args):
104         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
105         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
106         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
107         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
108         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
109         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
110         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
111         (WebCore::TestObjInternal::methodWithSequenceArgCallback):
112         (WebCore::ConfigureV8TestObjTemplate):
113
114 2012-03-30  Pavel Feldman  <pfeldman@chromium.org>
115
116         Web Inspector: editing resets line-ending of the whole file
117         https://bugs.webkit.org/show_bug.cgi?id=82708
118
119         Reviewed by Yury Semikhatsky.
120
121         This change splits TextEditorModel's setText into setText (for initialization) and
122         editRange (for editing). Distinguishing between the two allowed properly detecting
123         the preferred line endings.
124
125         Test: inspector/editor/text-editor-line-breaks.html
126
127         * inspector/front-end/JavaScriptSourceFrame.js:
128         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
129         * inspector/front-end/SourceFrame.js:
130         (WebInspector.SourceFrame.prototype.setContent):
131         * inspector/front-end/TextEditorModel.js:
132         (WebInspector.TextEditorCommand):
133         (WebInspector.TextEditorModel):
134         (WebInspector.TextEditorModel.endsWithBracketRegex.):
135         * inspector/front-end/TextViewer.js:
136         (WebInspector.TextViewer.prototype._textChanged):
137         (WebInspector.TextEditorMainPanel.prototype._unindentLines.get var):
138         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
139         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var):
140         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
141         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
142         (WebInspector.TextEditorMainPanel.prototype._editRange):
143
144 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
145
146         Web Inspector: Take IndexedDB support out of experiments.
147         https://bugs.webkit.org/show_bug.cgi?id=82635
148
149         Reviewed by Pavel Feldman.
150
151         This patch takes inspector IndexedDB support out of experiments and enables tests.
152
153         Test: http/tests/inspector/indexeddb/resources-panel.html
154
155         * inspector/front-end/ResourcesPanel.js:
156         * inspector/front-end/Settings.js:
157         (WebInspector.ExperimentsSettings):
158
159 2012-03-30  Patrick Gansterer  <paroga@webkit.org>
160
161         Build fix after r112482.
162
163         * platform/network/cf/FormDataStreamCFNet.h: Added missing forward decleration.
164
165 2012-03-30  Philippe Normand  <pnormand@igalia.com>
166
167         [GTK] WebAudio channelSize issue
168         https://bugs.webkit.org/show_bug.cgi?id=81905
169
170         Reviewed by Martin Robinson.
171
172         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
173         (WebCore::AudioFileReader::handleBuffer): Calculate the audio
174         buffer duration and frames number from the buffer and caps instead
175         of relying on the buffer offets that are not always correctly set
176         depending on the audio file format.
177
178 2012-03-29  Alexandru Chiculita  <achicu@adobe.com>
179
180         [CSS Filters] Trigger a repaint on elements with changed filter
181         https://bugs.webkit.org/show_bug.cgi?id=82521
182
183         Reviewed by Dean Jackson.
184
185         I've added ContextSensitivePropertyFilter and changed RenderStyle::diff to use it when
186         the filter property is changed. In RenderObject::adjustStyleDifference the appropriate StyleDifferenceRepaintLayer
187         or StyleDifferenceRecompositeLayer is used depending on whether the layer is painting filters in software or in hardware
188         (composited).
189
190         Tests: css3/filters/filter-change-repaint-composited.html
191                css3/filters/filter-change-repaint.html
192
193         * css/CSSStyleSelector.cpp:
194         (WebCore::CSSStyleSelector::createFilterOperations): None was treated as an invalid value.
195         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Shadows were remaining behind. Fixed that.
196         (PlatformCALayer::setFilters):
197         * rendering/RenderBoxModelObject.cpp:
198         (WebCore::RenderBoxModelObject::styleWillChange): Repaint the layer when there is a layout change and a filter change.
199         * rendering/RenderLayer.cpp:
200         (WebCore::RenderLayer::styleChanged): Making sure that the backing store is repainted when filters fallback to hardware.
201         * rendering/RenderObject.cpp:
202         (WebCore::RenderObject::adjustStyleDifference):
203         * rendering/style/RenderStyle.cpp:
204         (WebCore::RenderStyle::diff):
205         * rendering/style/RenderStyleConstants.h:
206
207 2012-03-29  Koji Ishii  <kojiishi@gmail.com>
208
209
210         Vertical flow support for OpenType fonts with the least platform dependencies
211         https://bugs.webkit.org/show_bug.cgi?id=81326
212
213         Reviewed by Dan Bernstein.
214
215         This patch introduces a new class OpenTypeVerticalData to read
216         vertical font metrics from OpenType fonts.
217
218         Currently, WebKit relies on platform APIs to do the work. However,
219         some platforms such as Windows lack support for all the capabilities
220         WebKit requires for vertical flow and the text-orientation property
221         to work correctly. Reading OpenType tables directly also gives
222         benefits in consistent behavior among the WebKit platforms.
223
224         This patch is for any platforms that want to parse OpenType tables
225         directly, but it's currently included only in CGWin and isn't on any
226         code path even on CGWin yet. Caller's side change for CGWin and
227         support for other platforms will be in separate bugs.
228
229         No new tests are required. No behavior changes.
230
231         * WebCore.vcproj/WebCore.vcproj: Added OpenTypeTypes.h and OpenTypeVerticalData.h/cpp.
232         * platform/SharedBuffer.cpp: Add create(size_t)
233         (WebCore::SharedBuffer::SharedBuffer):
234         (WebCore):
235         * platform/SharedBuffer.h: Add create(size_t)
236         (WebCore::SharedBuffer::create):
237         (SharedBuffer):
238         * platform/graphics/FontPlatformData.h: Added openTypeTable().
239         (WebCore):
240         (FontPlatformData):
241         * platform/graphics/SimpleFontData.h: Added sizePerUnit().
242         (WebCore::SimpleFontData::sizePerUnit): size() / unitsPerEm() for less multiplication.
243         * platform/graphics/opentype/OpenTypeTypes.h: Added OpenType basic type definitions.
244         (OpenType):
245         (WebCore::OpenType::BigEndianShort::operator short):
246         (WebCore::OpenType::BigEndianShort::BigEndianShort):
247         (BigEndianShort):
248         (WebCore::OpenType::BigEndianUShort::operator unsigned short):
249         (WebCore::OpenType::BigEndianUShort::BigEndianUShort):
250         (BigEndianUShort):
251         (WebCore::OpenType::BigEndianLong::operator int):
252         (WebCore::OpenType::BigEndianLong::BigEndianLong):
253         (BigEndianLong):
254         (WebCore::OpenType::BigEndianULong::operator unsigned):
255         (WebCore::OpenType::BigEndianULong::BigEndianULong):
256         (BigEndianULong):
257         * platform/graphics/opentype/OpenTypeVerticalData.cpp: Added.
258         (OpenType):
259         (HheaTable):
260         (VheaTable):
261         (Entry):
262         (VORGTable):
263         (VertOriginYMetrics):
264         (WebCore::OpenType::VORGTable::requiredSize):
265         (WebCore):
266         (WebCore::validatedPtr):
267         (WebCore::OpenTypeVerticalData::OpenTypeVerticalData):
268         (WebCore::OpenTypeVerticalData::advanceHeight): Advance height for a glyph.
269         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs): Vertical origin.
270         * platform/graphics/opentype/OpenTypeVerticalData.h: Added.
271         (WebCore):
272         (OpenTypeVerticalData): A new class to handle vertical flow data in OpenType.
273         (WebCore::OpenTypeVerticalData::isOpenType):
274         (WebCore::OpenTypeVerticalData::hasVerticalMetrics):
275         (WebCore::OpenTypeVerticalData::hasVORG):
276         * platform/graphics/win/FontPlatformDataWin.cpp:
277         (WebCore):
278         (WebCore::FontPlatformData::openTypeTable): Implemented openTypeTable() for Win32.
279
280 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
281
282         [BlackBerry] Sync up PlatformMouseEvent
283         https://bugs.webkit.org/show_bug.cgi?id=82567
284
285         Reviewed by Rob Buis.
286
287         This patch is adding blackberry specific members to PlatformMouseEvent.
288         Also re-base PlatformMouseEventBlackBerry to adapt to the re-factor
289         of PlatformMouseEvent.
290
291         * platform/PlatformMouseEvent.h:
292         (PlatformMouseEvent): BlackBerry specific constructor.
293         (WebCore::PlatformMouseEvent::inputMethod): Input source of mouse event
294         for blackberry platform.
295         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
296         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Re-base the constructor
297         to adapt the re-factor of PlatformMouseEvent.
298
299 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
300
301         [BlackBerry] Turn on STORE_FONT_CUSTOM_PLATFORM_DATA in CachedFont.cpp
302         https://bugs.webkit.org/show_bug.cgi?id=82573
303
304         Reviewed by Rob Buis.
305
306         Tests: covered by existing tests.
307
308         * loader/cache/CachedFont.cpp:
309
310 2012-03-29  Adam Barth  <abarth@webkit.org>
311
312         [Chromium] Attempt to fix the component build
313         https://bugs.webkit.org/show_bug.cgi?id=82676
314
315         Reviewed by Dirk Pranke.
316
317         Now that we're implementing some of the WEBKIT_EXPORT symbols in
318         WebCore/platform/chromium/support, we need to tell the build system
319         that we want to actually export these symbols.
320
321         * WebCore.gyp/WebCore.gyp:
322
323 2012-03-29  Adam Barth  <abarth@webkit.org>
324
325         Unreviewed, rolling out r112572.
326         http://trac.webkit.org/changeset/112572
327         https://bugs.webkit.org/show_bug.cgi?id=82582
328
329         Does not compile in Windows component build
330
331         * WebCore.gyp/WebCore.gyp:
332         * WebCore.gypi:
333
334 2012-03-29  Adam Barth  <abarth@webkit.org>
335
336         Unreviewed, rolling out r112579.
337         http://trac.webkit.org/changeset/112579
338         https://bugs.webkit.org/show_bug.cgi?id=82657
339
340         Does not compile in Windows component build
341
342         * WebCore.gypi:
343
344 2012-03-29  Adam Barth  <abarth@webkit.org>
345
346         Unreviewed, rolling out r112611.
347         http://trac.webkit.org/changeset/112611
348         https://bugs.webkit.org/show_bug.cgi?id=82676
349
350         Does not compile in Windows component build
351
352         * WebCore.gyp/WebCore.gyp:
353
354 2012-03-29  Bear Travis  <betravis@adobe.com>
355
356         Update shape-inside/shape-outside CSS Exclusion properties
357         https://bugs.webkit.org/show_bug.cgi?id=82365
358
359         Reviewed by Ryosuke Niwa.
360
361         Updating CSS property names for wrap-shape-inside and wrap-shape-outside
362         to shape-inside and shape-outside, per the current exclusions spec.
363         Renaming some parsing functions in CSSParser for clarity.
364         No new functionality.
365
366         * css/CSSComputedStyleDeclaration.cpp:
367         (WebCore):
368         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
369         * css/CSSParser.cpp:
370         (WebCore::CSSParser::parseValue):
371         (WebCore::CSSParser::parseClipShape):
372         (WebCore::CSSParser::parseExclusionShapeRect):
373         (WebCore::CSSParser::parseExclusionShapeCircle):
374         (WebCore::CSSParser::parseExclusionShapeEllipse):
375         (WebCore::CSSParser::parseExclusionShapePolygon):
376         (WebCore::CSSParser::parseExclusionShape):
377         * css/CSSParser.h:
378         * css/CSSProperty.cpp:
379         (WebCore::CSSProperty::isInheritedProperty):
380         * css/CSSPropertyNames.in:
381         * css/CSSStyleSelector.cpp:
382         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
383
384 2012-03-29  Ryan Sleevi  <rsleevi@chromium.org>
385
386         [chromium] Update paths in GYP files
387         https://bugs.webkit.org/show_bug.cgi?id=82663
388
389         Reviewed by Adam Barth.
390
391         * WebCore.gypi:
392         Remove PluginDataGtk.cpp following r112401
393
394 2012-03-29  Abhishek Arya  <inferno@chromium.org>
395
396         Crash in GenericEventQueue::~GenericEventQueue.
397         https://bugs.webkit.org/show_bug.cgi?id=81976
398
399         Reviewed by Eric Carlson.
400
401         * dom/GenericEventQueue.cpp:
402         (WebCore::GenericEventQueue::create):
403         (WebCore):
404         (WebCore::GenericEventQueue::GenericEventQueue):
405         (WebCore::GenericEventQueue::enqueueEvent):
406         (WebCore::GenericEventQueue::timerFired):
407         * dom/GenericEventQueue.h:
408         (GenericEventQueue):
409         * html/HTMLMediaElement.cpp:
410         (WebCore::HTMLMediaElement::HTMLMediaElement):
411         (WebCore::HTMLMediaElement::scheduleEvent):
412         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
413         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
414         (WebCore::HTMLMediaElement::hasPendingActivity):
415         * html/HTMLMediaElement.h:
416         (HTMLMediaElement):
417
418 2012-03-29  Adam Barth  <abarth@webkit.org>
419
420         [Chromium] Attempt to fix the component build
421         https://bugs.webkit.org/show_bug.cgi?id=82676
422
423         Unreviewed.
424
425         Now that we're implementing some of the WEBKIT_EXPORT symbols in
426         WebCore/platform/chromium/support, we need to tell the build system
427         that we want to actually export these symbols.
428
429         * WebCore.gyp/WebCore.gyp:
430
431 2012-03-29  Nate Chapin  <japhet@chromium.org>
432
433         Simplify reporting a main resource error to DocumentLoader and
434         FrameLoader.
435         https://bugs.webkit.org/show_bug.cgi?id=82649
436
437         Reviewed by Adam Barth.
438
439         No new tests, no functionality change intended.
440
441         * loader/DocumentLoader.cpp:
442         (WebCore::DocumentLoader::mainReceivedError): Remove isComplete parameter,
443             since it was always true. Call FrameLoader::receivedMainResourceError,
444             instead of the other way around.
445         * loader/DocumentLoader.h:
446         * loader/FrameLoader.cpp:
447         (WebCore::FrameLoader::receivedMainResourceError): Remove isComplete parameter,
448             since it was always true. Merge in most of mainReceivedCompleteError().
449         * loader/FrameLoader.h:
450         * loader/MainResourceLoader.cpp:
451         (WebCore::MainResourceLoader::receivedError):
452         (WebCore::MainResourceLoader::didCancel):
453
454 2012-03-28  Jer Noble  <jer.noble@apple.com>
455
456         Heap-use-after-free in WebCore::InlineFlowBox::deleteLine due to fullscreen issues.
457         https://bugs.webkit.org/show_bug.cgi?id=82055
458
459         Reviewed by David Hyatt.
460
461         No new tests; fixes fuzz test crasher which is not reproducible in DRT or WKTR.
462
463         When a RenderFullScreen object is inserted between a child and parent renderer, make sure the
464         parent renderer deletes its line boxes by calling setNeedsLayoutAndPrefWidthsRecalc().  This
465         forces its InlineBox renderers to be removed from the line boxes and their parents in the correct
466         order, fixing a double-delete crash.
467
468         The same is true when unwrapping the RenderFullScreen object, and when creating and inserting
469         the full screen placeholder.
470
471         * rendering/RenderFullScreen.cpp:
472         (RenderFullScreen::wrapRenderer):
473         (RenderFullScreen::unwrapRenderer):
474         (RenderFullScreen::createPlaceholder):
475
476 2012-03-29  Benjamin Poulain  <bpoulain@apple.com>
477
478         Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly
479         https://bugs.webkit.org/show_bug.cgi?id=82543
480
481         Reviewed by Andreas Kling.
482
483         After the change to client based geolocation, the method positionChangedInternal()
484         is called only by positionChanged(). This patch remove this extra indirection.
485
486         * Modules/geolocation/Geolocation.cpp:
487         (WebCore::Geolocation::positionChanged):
488         * Modules/geolocation/Geolocation.h:
489         (Geolocation):
490         * WebCore.order:
491
492 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
493
494         InputType attribute changed functions should happen after the attribute change
495         https://bugs.webkit.org/show_bug.cgi?id=82644
496
497         Reviewed by Benjamin Poulain.
498
499         * html/HTMLInputElement.cpp:
500         (WebCore::HTMLInputElement::parseAttribute):
501
502 2012-03-29  Bear Travis  <betravis@adobe.com>
503
504         Update CSS Exclusion wrap-flow values left & right to start & end
505         https://bugs.webkit.org/show_bug.cgi?id=82366
506
507         http://dev.w3.org/csswg/css3-exclusions/
508         -webkit-wrap-flow now takes the values start and end rather than
509         left and right. Updating the code to reflect this. Functionality
510         is covered by existing tests.
511         
512         Reviewed by Andreas Kling.
513
514         * css/CSSParser.cpp:
515         (WebCore::isValidKeywordPropertyAndValue):
516         * css/CSSPrimitiveValueMappings.h:
517         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
518         (WebCore::CSSPrimitiveValue::operator WrapFlow):
519         * rendering/style/RenderStyleConstants.h:
520
521 2012-03-29  Dirk Pranke  <dpranke@chromium.org>
522
523         rollout r112484, r112545, r112574
524         https://bugs.webkit.org/show_bug.cgi?id=82662
525
526         Unreviewed, build fix.
527
528         this appears to be producing some questionable differences on
529         the apple mac bots, and possibly one test on chromium linux.
530
531         * css/mediaControls.css:
532         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
533         * css/mediaControlsChromium.css:
534         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
535         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
536         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
537         * html/shadow/MediaControlElements.cpp:
538         (RenderMediaVolumeSliderContainer):
539         (WebCore):
540         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
541         (WebCore::RenderMediaVolumeSliderContainer::layout):
542         (WebCore::MediaControlVolumeSliderContainerElement::createRenderer):
543         * html/shadow/MediaControlElements.h:
544         (MediaControlVolumeSliderContainerElement):
545         * html/shadow/MediaControlRootElementChromium.cpp:
546         (WebCore::MediaControlRootElementChromium::create):
547
548 2012-03-29  Julien Chaffraix  <jchaffraix@webkit.org>
549
550         REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il
551         https://bugs.webkit.org/show_bug.cgi?id=82129
552
553         Reviewed by Ojan Vafai.
554
555         Tests: fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html
556                fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html
557                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html
558                fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html
559                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html
560                fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html
561                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html
562                fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html
563
564         This is a regression from r110072. I wrongly thought we should call ensureLayer if we create our RenderOverflow.
565         However the current overflow code removes the before and start overflows (like in horizontal writing mode with ltr direction,
566         we never have a top or a left overflow). Because of that we would not get a RenderLayer as expected and the overflow clip rects
567         would be wrong on our RenderLayer children.
568
569         * rendering/RenderBox.cpp:
570         (WebCore::RenderBox::addLayoutOverflow):
571         Moved the ensureLayer() call after the check that we do have some overflow but before we remove the overflow in some directions.
572
573 2012-03-29  Adam Barth  <abarth@webkit.org>
574
575         [Chromium] Move ResourceHandle to WebCore/platform/network/chromium
576         https://bugs.webkit.org/show_bug.cgi?id=82657
577
578         Reviewed by James Robinson.
579
580         We finally arive at our destination. This patch actually moves
581         WebCore::ResourceHandle from Source/WebKit/chromium/src to
582         Source/WebCore/network/chromium, matching its location in other ports.
583         To make this happen, we also need to move WrappedResourceRequest and
584         WrappedResourceResponse.
585
586         This patch is the last patch from
587         https://github.com/abarth/webkit/compare/master...webcore-platform
588
589         * WebCore.gypi:
590         * platform/chromium/support/WrappedResourceRequest.h: Copied from Source/WebKit/chromium/src/WrappedResourceRequest.h.
591         * platform/chromium/support/WrappedResourceResponse.h: Copied from Source/WebKit/chromium/src/WrappedResourceResponse.h.
592         * platform/network/chromium/ResourceHandle.cpp: Copied from Source/WebKit/chromium/src/ResourceHandle.cpp.
593         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
594         (WebCore::ResourceHandleInternal::start):
595         (WebCore::ResourceHandle::loadResourceSynchronously):
596         (WebCore::ResourceHandle::cacheMetadata):
597         * platform/network/chromium/ResourceHandleInternal.h: Copied from Source/WebKit/chromium/src/ResourceHandleInternal.h.
598
599 2012-03-29  Patrick Gansterer  <paroga@webkit.org>
600
601         Build fix for WinCE after r112555.
602
603         * platform/text/wince/TextCodecWinCE.cpp:
604         (WebCore::LanguageManager::LanguageManager):
605
606 2012-03-29  Anders Carlsson  <andersca@apple.com>
607
608         Images that reload via media queries don't paint when device scale factor changes
609         https://bugs.webkit.org/show_bug.cgi?id=82648
610         <rdar://problem/11143637>
611
612         Reviewed by Beth Dakin.
613
614         Commit scale factor changes before dirty rect changes, since setting the scale factor
615         can lead to more rects being dirtied when using the tile cache.
616
617         * platform/graphics/ca/GraphicsLayerCA.cpp:
618         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
619
620 2012-03-29  Adam Barth  <abarth@webkit.org>
621
622         Move CPP files related to ResourceHandle to WebCore/platform
623         https://bugs.webkit.org/show_bug.cgi?id=82582
624
625         Reviewed by James Robinson.
626
627         This patch moves a number of files that implement parts of the platform
628         portion of the Chromium WebKit API from the WebKit layer to
629         WebCore/platform. These files are in the dependency cone of
630         ResourceHandle and have no dependencies on anything outside
631         WebCore/platform.
632
633         * WebCore.gyp/WebCore.gyp:
634         * WebCore.gypi:
635         * platform/chromium/support: Added.
636         * platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp.
637         * platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
638         * platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
639         * platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
640         * platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
641         * platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
642         * platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
643         * platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
644         * platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.
645
646 2012-03-29  Michal Mocny  <mmocny@google.com>
647
648         [chromium] Ensure framebuffer exists at the start of beginDrawingFrame.
649         https://bugs.webkit.org/show_bug.cgi?id=82569
650
651         Reviewed by James Robinson.
652
653         Updated LayerRendererChromiumTest unittests.
654
655         * platform/graphics/chromium/LayerRendererChromium.cpp:
656         (WebCore::LayerRendererChromium::setVisible):
657         (WebCore::LayerRendererChromium::beginDrawingFrame):
658         * platform/graphics/chromium/LayerRendererChromium.h:
659         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
660         (WebCore::CCSingleThreadProxy::compositeAndReadback):
661         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
662         (WebCore::CCThreadProxy::compositeAndReadback):
663         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
664
665 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
666
667         Add a compile assert for the size of RenderBlock
668         https://bugs.webkit.org/show_bug.cgi?id=82586
669
670         Reviewed by Tony Chang.
671         
672         Add compile asserts for the size of RenderBlock and RenderBlock::MarginValues.
673         We can't add asserts for FloatingObject and MarginInfo because they're private to RenderBlock.
674
675         * rendering/RenderBlock.cpp:
676         (SameSizeAsRenderBlock):
677         (WebCore):
678         (WebCore::RenderBlock::addOverflowFromFloats):
679         (WebCore::RenderBlock::repaintOverhangingFloats):
680         (WebCore::RenderBlock::paintFloats):
681         (WebCore::RenderBlock::insertFloatingObject):
682         (WebCore::RenderBlock::clearFloats):
683         (WebCore::RenderBlock::addOverhangingFloats):
684         (WebCore::RenderBlock::addIntrudingFloats):
685         (WebCore::RenderBlock::hitTestFloats):
686         (WebCore::RenderBlock::adjustForBorderFit):
687         * rendering/RenderBlock.h:
688         (WebCore::RenderBlock::FloatingObject::shouldPaint):
689         (WebCore::RenderBlock::FloatingObject::setShouldPaint):
690         (WebCore::RenderBlock::FloatingObject::isDescendant):
691         (WebCore::RenderBlock::FloatingObject::setIsDescendant):
692         (FloatingObject):
693         (RenderBlock):
694
695 2012-03-29  Gavin Barraclough  <barraclough@apple.com>
696
697         Template the Yarr::Interpreter on the character type
698         https://bugs.webkit.org/show_bug.cgi?id=82637
699
700         Reviewed by Sam Weinig.
701
702         We should be able to call to the interpreter after having already checked the character type,
703         without having to re-package the character pointer back up into a string!
704
705         * inspector/ContentSearchUtils.cpp:
706         (WebCore::ContentSearchUtils::findMagicComment):
707         * platform/text/RegularExpression.cpp:
708         (WebCore::RegularExpression::match):
709             - Don't pass length.
710
711 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
712
713         Unreviewed, rolling out r112553.
714         http://trac.webkit.org/changeset/112553
715         https://bugs.webkit.org/show_bug.cgi?id=82638
716
717         It made all tests crash on Qt WK2 (Requested by Ossy_away on
718         #webkit).
719
720         * Modules/geolocation/Geolocation.cpp:
721         (WebCore::Geolocation::stop):
722         (WebCore::Geolocation::lastPosition):
723         (WebCore::Geolocation::requestPermission):
724         (WebCore::Geolocation::startUpdating):
725         (WebCore::Geolocation::stopUpdating):
726         * Modules/geolocation/Geolocation.h:
727         (WebCore):
728         * Modules/geolocation/GeolocationController.cpp:
729         * Modules/geolocation/GeolocationController.h:
730         * WebCore.exp.in:
731         * page/GeolocationClient.h:
732         (WebCore):
733         (GeolocationClient):
734         * page/Page.cpp:
735         (WebCore::Page::Page):
736         (WebCore::Page::PageClients::PageClients):
737         * page/Page.h:
738         (WebCore):
739         (PageClients):
740         (Page):
741         (WebCore::Page::geolocationController):
742
743 2012-03-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
744
745         HashMap<>::add should return a more descriptive object
746         https://bugs.webkit.org/show_bug.cgi?id=71063
747
748         Reviewed by Ryosuke Niwa.
749
750         Update code to use AddResult instead of a pair. No new tests, just a refactoring.
751
752         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
753         (WebCore::SQLTransactionCoordinator::acquireLock):
754         * Modules/webdatabase/chromium/QuotaTracker.cpp:
755         (WebCore::QuotaTracker::updateDatabaseSize):
756         * bindings/js/DOMObjectHashTableMap.h:
757         (WebCore::DOMObjectHashTableMap::get):
758         * bindings/js/JSDOMBinding.cpp:
759         (WebCore::cacheDOMStructure):
760         * bindings/js/JSDOMBinding.h:
761         (WebCore::cacheWrapper):
762         * bindings/js/JSDOMGlobalObject.h:
763         (WebCore::getDOMConstructor):
764         * bindings/js/PageScriptDebugServer.cpp:
765         (WebCore::PageScriptDebugServer::addListener):
766         * bindings/js/ScriptDebugServer.cpp:
767         (WebCore::ScriptDebugServer::setBreakpoint):
768         * bindings/js/SerializedScriptValue.cpp:
769         (WebCore::CloneSerializer::startObjectInternal):
770         (WebCore::CloneSerializer::write):
771         * bindings/v8/NPV8Object.cpp:
772         (WebCore::npCreateV8ScriptObject):
773         * bridge/IdentifierRep.cpp:
774         (WebCore::IdentifierRep::get):
775         * bridge/NP_jsobject.cpp:
776         (ObjectMap::add):
777         * css/CSSComputedStyleDeclaration.cpp:
778         (WebCore::logUnimplementedPropertyID):
779         * css/CSSFontFaceSource.cpp:
780         (WebCore::CSSFontFaceSource::getFontData):
781         * css/CSSFontSelector.cpp:
782         (WebCore::CSSFontSelector::addFontFaceRule):
783         (WebCore::CSSFontSelector::getFontData):
784         * css/CSSSegmentedFontFace.cpp:
785         (WebCore::CSSSegmentedFontFace::getFontData):
786         * css/CSSStyleApplyProperty.cpp:
787         (WebCore::ApplyPropertyCounter::applyInheritValue):
788         (WebCore::ApplyPropertyCounter::applyValue):
789         * css/CSSStyleSelector.cpp:
790         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
791         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
792         * css/CSSValuePool.cpp:
793         (WebCore::CSSValuePool::createIdentifierValue):
794         (WebCore::CSSValuePool::createColorValue):
795         (WebCore::CSSValuePool::createValue):
796         (WebCore::CSSValuePool::createFontFamilyValue):
797         (WebCore::CSSValuePool::createFontFaceValue):
798         * dom/CheckedRadioButtons.cpp:
799         (WebCore::RadioButtonGroup::add):
800         (WebCore::CheckedRadioButtons::addButton):
801         * dom/ChildListMutationScope.cpp:
802         (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
803         * dom/Document.cpp:
804         (WebCore::Document::windowNamedItems):
805         (WebCore::Document::documentNamedItems):
806         (WebCore::Document::getCSSCanvasElement):
807         (WebCore::Document::getItems):
808         * dom/DocumentEventQueue.cpp:
809         (WebCore::DocumentEventQueue::enqueueEvent):
810         (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
811         (WebCore::DocumentEventQueue::pendingEventTimerFired):
812         * dom/DocumentOrderedMap.cpp:
813         (WebCore::DocumentOrderedMap::add):
814         * dom/EventListenerMap.cpp:
815         (WebCore::EventListenerMap::add):
816         * dom/Node.cpp:
817         (WebCore::Node::dumpStatistics):
818         (WebCore::Node::getElementsByTagName):
819         (WebCore::Node::getElementsByTagNameNS):
820         (WebCore::Node::getElementsByName):
821         (WebCore::Node::getElementsByClassName):
822         (WebCore::Node::collectMatchingObserversForMutation):
823         * dom/QualifiedName.cpp:
824         (WebCore::QualifiedName::init):
825         * dom/SpaceSplitString.cpp:
826         (WebCore::SpaceSplitStringData::create):
827         * dom/StyledElement.cpp:
828         (WebCore::StyledElement::updateAttributeStyle):
829         * html/HTMLCollection.cpp:
830         (WebCore::HTMLCollection::append):
831         * inspector/DOMPatchSupport.cpp:
832         (WebCore::DOMPatchSupport::diff):
833         * inspector/InspectorCSSAgent.cpp:
834         (WebCore::SelectorProfile::commitSelector):
835         * inspector/InspectorDOMAgent.cpp:
836         (WebCore::InspectorDOMAgent::performSearch):
837         * inspector/InspectorDebuggerAgent.cpp:
838         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
839         * inspector/InspectorValues.h:
840         (WebCore::InspectorObject::setValue):
841         (WebCore::InspectorObject::setObject):
842         (WebCore::InspectorObject::setArray):
843         * loader/appcache/ApplicationCacheGroup.cpp:
844         (WebCore::ApplicationCacheGroup::addEntry):
845         * loader/appcache/ApplicationCacheStorage.cpp:
846         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
847         * page/EventHandler.cpp:
848         (WebCore::EventHandler::handleTouchEvent):
849         * page/PageGroup.cpp:
850         (WebCore::PageGroup::pageGroup):
851         (WebCore::PageGroup::addVisitedLink):
852         (WebCore::PageGroup::addUserScriptToWorld):
853         (WebCore::PageGroup::addUserStyleSheetToWorld):
854         * page/SecurityPolicy.cpp:
855         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
856         * page/TouchAdjustment.cpp:
857         (WebCore::TouchAdjustment::compileSubtargetList):
858         * platform/cf/BinaryPropertyList.cpp:
859         (WebCore::BinaryPropertyListPlan::writeInteger):
860         (WebCore::BinaryPropertyListPlan::writeString):
861         (WebCore::BinaryPropertyListPlan::writeIntegerArray):
862         * platform/graphics/blackberry/LayerTiler.cpp:
863         (WebCore::LayerTiler::addTileJob):
864         * platform/graphics/ca/GraphicsLayerCA.cpp:
865         (WebCore::GraphicsLayerCA::findOrMakeClone):
866         * platform/graphics/ca/mac/TileCache.mm:
867         (WebCore::TileCache::revalidateTiles):
868         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
869         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
870         * platform/graphics/chromium/FontUtilsChromiumWin.cpp:
871         (WebCore::getDerivedFontData):
872         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
873         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
874         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
875         (WebCore::initializeATSUStyle):
876         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
877         (WebCore::SimpleFontData::getCFStringAttributes):
878         * platform/graphics/mac/SimpleFontDataMac.mm:
879         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
880         * platform/graphics/wince/FontPlatformData.cpp:
881         (WebCore::FixedSizeFontData::create):
882         * platform/gtk/RenderThemeGtk3.cpp:
883         (WebCore::getStyleContext):
884         * platform/mac/ThreadCheck.mm:
885         (WebCoreReportThreadViolation):
886         * platform/network/HTTPHeaderMap.cpp:
887         (WebCore::HTTPHeaderMap::add):
888         * platform/network/HTTPHeaderMap.h:
889         (HTTPHeaderMap):
890         * platform/network/ResourceRequestBase.cpp:
891         (WebCore::ResourceRequestBase::addHTTPHeaderField):
892         * plugins/PluginDatabase.cpp:
893         (WebCore::PluginDatabase::add):
894         (WebCore::PluginDatabase::loadPersistentMetadataCache):
895         * plugins/win/PluginDatabaseWin.cpp:
896         (WebCore::PluginDatabase::getPluginPathsInDirectories):
897         * rendering/RenderBlock.cpp:
898         (WebCore::RenderBlock::addPercentHeightDescendant):
899         * rendering/RenderBlockLineLayout.cpp:
900         (WebCore::setLogicalWidthForTextRun):
901         * rendering/RenderNamedFlowThread.cpp:
902         (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread):
903         * rendering/RenderRegion.cpp:
904         (WebCore::RenderRegion::setRenderBoxRegionInfo):
905         * rendering/svg/RenderSVGResourceGradient.cpp:
906         (WebCore::RenderSVGResourceGradient::applyResource):
907         * rendering/svg/RenderSVGResourcePattern.cpp:
908         (WebCore::RenderSVGResourcePattern::applyResource):
909         * storage/StorageMap.cpp:
910         (WebCore::StorageMap::setItem):
911         (WebCore::StorageMap::importItem):
912         * svg/SVGDocumentExtensions.cpp:
913         (WebCore::SVGDocumentExtensions::addPendingResource):
914         * xml/XMLHttpRequest.cpp:
915         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
916         * xml/XPathFunctions.cpp:
917         (WebCore::XPath::FunId::evaluate):
918         * xml/XPathPath.cpp:
919         (WebCore::XPath::LocationPath::evaluate):
920         * xml/XPathPredicate.cpp:
921         (WebCore::XPath::Union::evaluate):
922
923 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
924
925         Web Inspector: improve window selection accuracy in vertical overview of timeline panel
926         https://bugs.webkit.org/show_bug.cgi?id=82625
927
928         Reviewed by Vsevolod Vlasov.
929
930         * inspector/front-end/TimelineOverviewPane.js:
931         (WebInspector.TimelineVerticalOverview):
932         (WebInspector.TimelineVerticalOverview.prototype._renderBars): preserve actual padding used while rendering bars.
933         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes): account for outer and inter-bars padding when calculating bar offsets.
934
935 2012-03-29  Mark Pilgrim  <pilgrim@chromium.org>
936
937         GEOLOCATION should be implemented as Page Supplement
938         https://bugs.webkit.org/show_bug.cgi?id=82228
939
940         Reviewed by Adam Barth.
941
942         Geolocation now uses the Supplement interface instead of
943         keeping an instance variable on Page. This allows us to
944         remove all geolocation-related functions, variables, and
945         ifdefs out of Page and into Modules/geolocation/.
946
947         * Modules/geolocation/Geolocation.cpp:
948         (WebCore::Geolocation::stop):
949         (WebCore::Geolocation::lastPosition):
950         (WebCore::Geolocation::requestPermission):
951         (WebCore::Geolocation::startUpdating):
952         (WebCore::Geolocation::stopUpdating):
953         * Modules/geolocation/Geolocation.h:
954         (WebCore):
955         * Modules/geolocation/GeolocationController.cpp:
956         (WebCore::GeolocationController::supplementName):
957         (WebCore):
958         (WebCore::provideGeolocationTo):
959         * Modules/geolocation/GeolocationController.h:
960         (GeolocationController):
961         (WebCore::GeolocationController::from):
962         * WebCore.exp.in:
963         * page/GeolocationClient.h:
964         (WebCore):
965         (GeolocationClient):
966         * page/Page.cpp:
967         (WebCore::Page::Page):
968         (WebCore::Page::PageClients::PageClients):
969         * page/Page.h:
970         (WebCore):
971         (PageClients):
972         (Page):
973
974 2012-03-29  John Bates  <jbates@google.com>
975
976         Sync up WebKit TraceEvent.h with chromium trace_event.h
977         https://bugs.webkit.org/show_bug.cgi?id=82527
978
979         Reviewed by James Robinson.
980
981         * platform/chromium/TraceEvent.h:
982
983 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
984
985         Web Inspector: subtree disapears from <iframe> after loading
986         https://bugs.webkit.org/show_bug.cgi?id=76552
987
988         Reviewed by Yury Semikhatsky.
989
990         The problem was that content document subtree was not unbound upon iframe re-push.
991         Upon owner element refresh content document was not sent to the frontend
992         since backend assumed that front-end has already had the up-to-date version.
993
994         Test: inspector/elements/iframe-load-event.html
995
996         * inspector/InspectorDOMAgent.cpp:
997         (WebCore::InspectorDOMAgent::loadEventFired):
998
999 2012-03-29  Dana Jansens  <danakj@chromium.org>
1000
1001         [chromium] Remove unneeded code+fixmes from CCOcclusionTracker
1002         https://bugs.webkit.org/show_bug.cgi?id=82380
1003
1004         Reviewed by Adrienne Walker.
1005
1006         The current occlusion was exposed on the occlusion tracker for the
1007         transition over to culling 2.0 which has landed, so we can remove
1008         it now. It still had one use in unit tests which is moved to a
1009         test subclass.
1010
1011         Above test subclass already existed in the occlusion tracker tests,
1012         so pulled it out to a common file CCOcclusionTrackerTestCommon.h
1013         so that other unit tests can use it to get at occlusion internals.
1014
1015         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1016         (WebCore):
1017         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
1018
1019 2012-03-29  Joseph Pecoraro  <pecoraro@apple.com>
1020
1021         <http://webkit.org/b/82558> Toggling <input type="range"> readonly or disabled state while active breaks all click events
1022
1023         Test: fast/forms/range/range-drag-when-toggled-disabled.html
1024
1025         Reviewed by Kent Tamura.
1026
1027         * html/shadow/SliderThumbElement.cpp:
1028         (WebCore::SliderThumbElement::defaultEventHandler):
1029         A slider can toggle its readonly or disabled state while in the middle
1030         of dragging, in those cases we should cancel the drag and perform cleanup.
1031
1032 2012-03-29  Adam Klein  <adamk@chromium.org>
1033
1034         Factor out common post-insertion logic in ContainerNode
1035         https://bugs.webkit.org/show_bug.cgi?id=82544
1036
1037         Reviewed by Ryosuke Niwa.
1038
1039         appendChild, insertBefore, and replaceChild all share a great deal of logic.
1040         This patch factors out the "post-insertion" logic that deals with
1041         notifying parents that their children changed and notifying children
1042         that they've been added to the tree.
1043
1044         Besides reducing code duplication, this is in preparation for moving
1045         this post-insertion notification later in the insertion process.
1046
1047         No new tests, no change in behavior.
1048
1049         * dom/ContainerNode.cpp:
1050         (WebCore):
1051         (WebCore::ContainerNode::insertBefore): Factor out shared logic, remove unnecessary "prev" variable.
1052         (WebCore::ContainerNode::replaceChild): ditto.
1053         (WebCore::ContainerNode::appendChild): ditto.
1054         (WebCore::updateTreeAfterInsertion): New helper method encapsulating shared logic.
1055
1056 2012-03-29  Tony Chang  <tony@chromium.org>
1057
1058         Need to implement flex-line-pack
1059         https://bugs.webkit.org/show_bug.cgi?id=70794
1060
1061         Reviewed by Ojan Vafai.
1062
1063         Tests: css3/flexbox/multiline-line-pack-horizontal-column.html
1064                css3/flexbox/multiline-line-pack.html
1065
1066         * rendering/RenderFlexibleBox.cpp:
1067         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
1068         (WebCore::initialLinePackingOffset): Similar to initialPackingOffset.
1069         (WebCore):
1070         (WebCore::linePackingSpaceBetweenChildren): Similar to packingSpaceBetweenChildren.
1071         (WebCore::RenderFlexibleBox::packFlexLines): Move lines based on flex-line-pack.
1072             Note that we don't need to relayout on stretch because
1073             alignChildren will do that for us (only auto size needs stretching).
1074         (WebCore::RenderFlexibleBox::flipForWrapReverse): Pull out the initial
1075             cross axis offset before calling packFlexLines because we can
1076             move the the line contexts.
1077         * rendering/RenderFlexibleBox.h:
1078
1079 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
1080
1081         Web Inspector: SnippetsScriptMapping should process existing snippets on load.
1082         https://bugs.webkit.org/show_bug.cgi?id=82619
1083
1084         Reviewed by Pavel Feldman.
1085
1086         SnippetsScriptMapping now loads existing snippets on creation.
1087         Otherwise scripts panel shows snippets created during current session only.
1088         Drive-by ScriptsNavigator closure compilation fix.
1089
1090         * inspector/front-end/SnippetsModel.js:
1091         (WebInspector.SnippetsModel.prototype.set get snippets):
1092         (WebInspector.SnippetsScriptMapping):
1093         (WebInspector.SnippetsScriptMapping.prototype._handleSnippetAdded):
1094         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
1095
1096 2012-03-29  Yury Semikhatsky  <yurys@chromium.org>
1097
1098         Web Inspector: check more likely condition first in HeapSnapshot._buildAggregates
1099         https://bugs.webkit.org/show_bug.cgi?id=82621
1100
1101         Reviewed by Pavel Feldman.
1102
1103         * inspector/front-end/HeapSnapshot.js: selfSize === 0 is quite rare, moving this condition
1104         to the first place saves 1 of 6 secs on the heap profiler perf test.
1105         (WebInspector.HeapSnapshot.prototype._buildAggregates):
1106         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes): root node is always the first
1107         one and is the only one that doesn't have dominator, so we may start iterating nodes from
1108         the second node and avoid additional check in the loop.
1109
1110 2012-03-29  Pavel Feldman  <pfeldman@chromium.org>
1111
1112         Web Inspector: "go to the previous panel" shortcut is painful to maintain
1113         https://bugs.webkit.org/show_bug.cgi?id=82602
1114
1115         Reviewed by Vsevolod Vlasov.
1116
1117         Present go to previous panel shortcut "Cmd - Left" is painful to support since we have
1118         more and more free flow editing capabilities (where Cmd - Left is handled by the editor).
1119         Remaping it to Cmd - Option - [ (]) /  (Ctrl - Alt - [ (]) ).
1120
1121         Drive-by: de-capitalize captions from the settings panel.
1122
1123         * English.lproj/localizedStrings.js:
1124         * inspector/front-end/ConsoleView.js:
1125         (WebInspector.ConsoleView.prototype._registerShortcuts):
1126         * inspector/front-end/InspectorView.js:
1127         (WebInspector.InspectorView.prototype._keyDown):
1128         * inspector/front-end/ScriptsPanel.js:
1129         * inspector/front-end/TimelinePanel.js:
1130         (WebInspector.TimelinePanel.prototype._registerShortcuts):
1131         (WebInspector.TimelinePanel.prototype._contextMenu):
1132         * inspector/front-end/inspector.js:
1133         (WebInspector._registerShortcuts):
1134
1135 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1136
1137         Unreviewed, rolling out r112531.
1138         http://trac.webkit.org/changeset/112531
1139         https://bugs.webkit.org/show_bug.cgi?id=82616
1140
1141         Broke timeline overview selection
1142
1143         * inspector/front-end/TimelineOverviewPane.js:
1144         (WebInspector.TimelineOverviewWindow):
1145
1146 2012-03-28  Dirk Schulze  <krit@webkit.org>
1147
1148         Introduce CSSParserMode in all classes
1149         https://bugs.webkit.org/show_bug.cgi?id=82335
1150
1151         Reviewed by Ryosuke Niwa.
1152
1153         Introduce the new CSSParserMode enum to more classes. SVG classes make use of SVGAttributeMode for CSS parsing already.
1154         But SVGAttributeMode does not differ from CSSQuirksMode at the moment. This will change with a followup patch on bug 46112.
1155
1156         No new tests. No change of functionality. Everything gets covered by existing tests.
1157
1158         * css/CSSImportRule.cpp:
1159         (WebCore::CSSImportRule::setCSSStyleSheet):
1160         * css/CSSMediaRule.cpp:
1161         (WebCore::CSSMediaRule::insertRule):
1162         * css/CSSParser.cpp: Move private functions away from strict boolean and make use of CSSParserMode instead.
1163         (WebCore):
1164         (WebCore::parseColorValue):
1165         (WebCore::parseSimpleLengthValue):
1166         (WebCore::CSSParser::parseFontFaceValue):
1167         (WebCore::CSSParser::parseValue):
1168         (WebCore::CSSParser::parseColor):
1169         (WebCore::CSSParser::createStyleRule):
1170         (WebCore::CSSParser::createFontFaceRule):
1171         (WebCore::CSSParser::createPageRule):
1172         (WebCore::CSSParser::createKeyframeRule):
1173         * css/CSSParser.h: Removed constructor with boolean argument. We just use the CSSParserMode enum now.
1174         (CSSParser):
1175         * css/CSSParserMode.h:
1176         (strictToCSSParserMode): New helper function to convert boolean to CSSParserMode.
1177         (isStrictParserMode): Helper function that returns true if argument is CSSStrictMode.
1178         * css/CSSRule.h:
1179         (WebCore::CSSRule::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
1180         * css/CSSStyleSheet.cpp:
1181         (WebCore::CSSStyleSheet::CSSStyleSheet):
1182         (WebCore::CSSStyleSheet::insertRule):
1183         (WebCore::CSSStyleSheet::parseString):
1184         (WebCore::CSSStyleSheet::parseStringAtLine):
1185         * css/CSSStyleSheet.h:
1186         (CSSStyleSheet):
1187         (WebCore::CSSStyleSheet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we set an enum now.
1188         (WebCore::CSSStyleSheet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
1189         * css/MediaList.cpp:
1190         (WebCore::MediaQuerySet::parse):
1191         (WebCore::MediaQuerySet::add):
1192         (WebCore::MediaQuerySet::remove):
1193         * css/StylePropertySet.cpp:
1194         (WebCore::StylePropertySet::StylePropertySet):
1195         (WebCore::StylePropertySet::setProperty):
1196         (WebCore::StylePropertySet::parseDeclaration):
1197         * css/StylePropertySet.h: Use unsigned member variables to store the parser mode.  
1198         (WebCore::StylePropertySet::create):
1199         (WebCore::StylePropertySet::setCSSParserMode): Renamed setStrictParsing to setCSSParserMode since we get an enum now. This gets converted to unsigned internally.
1200         (WebCore::StylePropertySet::cssParserMode): Renamed useStrictParsing to cssParserMode since it returns CSSParserMode instead of a boolean now.
1201         (StylePropertySet):
1202         * css/StyleSheet.h:
1203         (StyleSheet):
1204         * css/WebKitCSSKeyframesRule.cpp:
1205         (WebCore::WebKitCSSKeyframesRule::insertRule):
1206         * css/WebKitCSSMatrix.cpp:
1207         (WebCore::WebKitCSSMatrix::setMatrixValue):
1208         * dom/Document.cpp:
1209         (WebCore::Document::webkitGetFlowByName):
1210         (WebCore::Document::pageUserSheet):
1211         (WebCore::Document::pageGroupUserSheets):
1212         * dom/Element.cpp:
1213         (WebCore::Element::webkitMatchesSelector):
1214         * dom/ElementAttributeData.cpp:
1215         (WebCore::ElementAttributeData::ensureInlineStyle):
1216         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
1217         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
1218         * dom/Node.cpp:
1219         (WebCore::Node::querySelector):
1220         (WebCore::Node::querySelectorAll):
1221         * dom/ProcessingInstruction.cpp:
1222         (WebCore::ProcessingInstruction::parseStyleSheet):
1223         * dom/StyleElement.cpp:
1224         (WebCore::StyleElement::createSheet):
1225         * html/HTMLElement.cpp:
1226         (WebCore::StyledElement::copyNonAttributeProperties):
1227         * html/HTMLLinkElement.cpp:
1228         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1229         * html/canvas/CanvasRenderingContext2D.cpp:
1230         (WebCore::CanvasRenderingContext2D::setFont):
1231         * html/shadow/ContentSelectorQuery.cpp:
1232         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
1233         * inspector/InspectorStyleSheet.cpp:
1234         (WebCore::InspectorStyleSheet::reparseStyleSheet):
1235         * svg/SVGElementRareData.h:
1236         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
1237         * svg/SVGFontFaceElement.cpp:
1238         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1239         * svg/SVGStyledElement.cpp:
1240         (WebCore::SVGStyledElement::getPresentationAttribute):
1241         * xml/XSLStyleSheet.h:
1242         (XSLStyleSheet):
1243         * xml/XSLStyleSheetLibxslt.cpp:
1244         (WebCore::XSLStyleSheet::parseString):
1245         * xml/XSLStyleSheetQt.cpp:
1246         (WebCore::XSLStyleSheet::parseString):
1247
1248 2012-03-29  Sanghyun Park  <sh919.park@samsung.com>
1249
1250         Fix the error type in JSAudioBufferSourceNodeCustom to pass layout test.
1251         https://bugs.webkit.org/show_bug.cgi?id=81639
1252
1253         Reviewed by Eric Carlson.
1254
1255         Test : LayoutTest/webaudio/audiobuffersource-channels.html
1256
1257         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1258
1259 2012-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
1260
1261         Web Inspector: Existing UISourceCode should be loaded on scripts panel creation/reset.
1262         https://bugs.webkit.org/show_bug.cgi?id=82614
1263
1264         Reviewed by Pavel Feldman.
1265
1266         UISourceCode are now loaded from DebuggerPresentationModel on scripts panel creation/reset.
1267         This is needed to show snippets that are loaded before scripts panel creation and are not removed on navigation.
1268
1269         * inspector/front-end/ScriptsPanel.js:
1270         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
1271         (WebInspector.ScriptsPanel.prototype._loadUISourceCodes):
1272         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
1273         (WebInspector.ScriptsPanel.prototype._reset):
1274         * inspector/front-end/SnippetsModel.js:
1275         (WebInspector.SnippetsScriptMapping.prototype.uiSourceCodeList):
1276
1277 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1278
1279         Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
1280         https://bugs.webkit.org/show_bug.cgi?id=82616
1281
1282         Reviewed by Pavel Feldman.
1283
1284         * inspector/front-end/TimelineOverviewPane.js:
1285         (WebInspector.TimelineOverviewWindow): Explicitly handle single click on overview by creating a minimal window around cursor.
1286         (WebInspector.TimelineOverviewWindow.prototype._resizeWindowMinimum):
1287
1288 2012-03-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1289
1290         Unavailable pre-processor macro in non-Qt environments
1291         https://bugs.webkit.org/show_bug.cgi?id=82042
1292
1293         Reviewed by Simon Hausmann.
1294
1295         This patch removes the use of the macro QT_VERSION_CHECK() because, in
1296         non-Qt environments, the pre-processors raises an error. Instead of
1297         calling the macro to generate the version number, the version is
1298         expressed directly.
1299
1300         * platform/graphics/texmap/TextureMapperGL.cpp:
1301         (SharedGLData): remove pre-processor macro for Qt version check.
1302
1303 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1304
1305         Web Inspector: event details popover in Timeline panel displays invalid time offset
1306         https://bugs.webkit.org/show_bug.cgi?id=82611
1307
1308         Reviewed by Pavel Feldman.
1309
1310         * inspector/front-end/TimelinePresentationModel.js:
1311         (WebInspector.TimelinePresentationModel.prototype.addRecord): use time in seconds, not raw model time for minimumRecordTime.
1312
1313 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1314
1315         Web Inspector: use canvas to render bars in "vertical overview" mode
1316         https://bugs.webkit.org/show_bug.cgi?id=82606
1317
1318         Reviewed by Pavel Feldman.
1319
1320         * inspector/front-end/TimelineOverviewPane.js: Use canvas instead of DOM for rendering vertical overview bars.
1321         (WebInspector.TimelineVerticalOverview):
1322         (WebInspector.TimelineVerticalOverview.prototype.update):
1323         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
1324         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
1325         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
1326         * inspector/front-end/timelinePanel.css: Drop styles previously used for DOM-based vertical overview rendering.
1327         (.timeline-vertical-overview-bars):
1328
1329 2012-03-29  Andrey Kosyakov  <caseq@chromium.org>
1330
1331         Web Inspector: timeline overview window selection is not reset upon clear/record
1332         https://bugs.webkit.org/show_bug.cgi?id=82603
1333
1334         Reviewed by Pavel Feldman.
1335
1336         - TimelineOverviewPane.reset() -> _reset();
1337         - perform update() from reset();
1338         - perform reset() upon RecordsCleared event from the model.
1339
1340         * inspector/front-end/TimelineOverviewPane.js:
1341         (WebInspector.TimelineOverviewPane):
1342         (WebInspector.TimelineOverviewPane.prototype._reset):
1343         (WebInspector.TimelineVerticalOverview):
1344         (WebInspector.TimelineVerticalOverview.prototype.update):
1345         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
1346         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
1347         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
1348         * inspector/front-end/timelinePanel.css:
1349         (.timeline-vertical-overview-bars):
1350
1351 2012-03-29  Zalan Bujtas  <zbujtas@gmail.com>
1352
1353         Remove redundant updateViewportArguments() call when page is restored from page cache.
1354         https://bugs.webkit.org/show_bug.cgi?id=82500
1355
1356         Reviewed by Kenneth Rohde Christiansen.
1357
1358         Document::updateViewportArguments() is called twice, while restoring a page from page cache.
1359         First, it is called when the document is set on the mainframe and later, it is called
1360         when page cache finished the restoration. Since viewport arguments don't change between
1361         the 2 calls, it's safe to remove the second.
1362
1363         Manual test added. Viewport value updates heavily depend on UI process code.
1364
1365         * dom/Document.cpp:
1366         (WebCore::Document::documentDidResumeFromPageCache):
1367
1368 2012-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
1369
1370         [BlackBerry] Add Internal test support for blackberry porting.
1371         https://bugs.webkit.org/show_bug.cgi?id=82597
1372
1373         Reviewed by Rob Buis.
1374
1375         No new tests, just the build system enhancement for BlackBerry porting.
1376
1377         * UseJSC.cmake:
1378
1379 2012-03-28  Yury Semikhatsky  <yurys@chromium.org>
1380
1381         Web Inspector: switch heap profiler front-end to separate storage of nodes and edges
1382         https://bugs.webkit.org/show_bug.cgi?id=82453
1383
1384         When heap snapshot is completely loaded move nodes and containment edges
1385         into two separate arrays. This way we don't need _nodeIndex and _nodePosition
1386         maps to go from node offset inside the raw snapshot to its index and back, instead
1387         we may just divide node offset by the number of node fields to get node index. After
1388         the nodes and containment edges are separated original array (_nodes) is dropped.
1389         All front-end code was switched to the new representation.
1390
1391         Reviewed by Pavel Feldman.
1392
1393         * inspector/front-end/HeapSnapshot.js:
1394         (WebInspector.HeapSnapshotRetainerEdge):
1395         (WebInspector.HeapSnapshotRetainerEdge.prototype.clone):
1396         (WebInspector.HeapSnapshotRetainerEdge.prototype.set edgeIndex):
1397         (WebInspector.HeapSnapshotRetainerEdge.prototype.get _edge):
1398         (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext):
1399         (WebInspector.HeapSnapshotNode.prototype.get edgesCount):
1400         (WebInspector.HeapSnapshotNode.prototype.get rawEdges):
1401         (WebInspector.HeapSnapshotNode.prototype.get retainers):
1402         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
1403         (WebInspector.HeapSnapshotNode.prototype._firstEdgeIndex):
1404         (WebInspector.HeapSnapshotNode.prototype._afterLastEdgeIndex):
1405         (WebInspector.HeapSnapshotNode.prototype.get _nextNodeIndex):
1406         (WebInspector.HeapSnapshot.prototype._init):
1407         (WebInspector.HeapSnapshot.prototype._splitNodesAndContainmentEdges):
1408         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
1409         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
1410         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1411         (WebInspector.HeapSnapshot.prototype.dispose):
1412         (WebInspector.HeapSnapshot.prototype.get maxNodeId):
1413         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
1414         (WebInspector.HeapSnapshot.prototype._bfs):
1415         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
1416         (WebInspector.HeapSnapshot.prototype._getDominatedIndex):
1417         (WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
1418         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
1419
1420 2012-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
1421
1422         [BlackBerry] Add m_targetType to WorkerScriptLoader
1423         https://bugs.webkit.org/show_bug.cgi?id=82574
1424
1425         Reviewed by Rob Buis.
1426
1427         Just as Chromium porting blackberry porting is using m_targetType also.
1428
1429         * workers/WorkerScriptLoader.h:
1430         (WorkerScriptLoader):
1431
1432 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
1433
1434         [BlackBerry] Add an empty implementation of GraphicsContext3D::setErrorMessageCallback
1435         https://bugs.webkit.org/show_bug.cgi?id=82570
1436
1437         Reviewed by Rob Buis.
1438
1439         No new tests, no change in functionality.
1440
1441         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
1442         (WebCore::GraphicsContext3D::setErrorMessageCallback): Add an empty implementation.
1443         (WebCore):
1444
1445 2012-03-29  Robin Cao  <robin.cao@torchmobile.com.cn>
1446
1447         [BlackBerry] Clean up ImageBufferData
1448         https://bugs.webkit.org/show_bug.cgi?id=82444
1449
1450         Reviewed by Rob Buis.
1451
1452         No behavior changes, no new tests.
1453
1454         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h:
1455         (ImageBufferData): Remove unused member variable m_buffer and change the type
1456         of m_platformLayer from LayerWebKitThread to CanvasLayerWebKitThread.
1457
1458 2012-03-28  Antti Koivisto  <antti@apple.com>
1459
1460         Split WebKitCSSKeyframeRule into internal and CSSOM types 
1461         https://bugs.webkit.org/show_bug.cgi?id=82490 
1462
1463         Reviewed by Andreas Kling.
1464
1465         WebKitCSSKeyframeRule is a CSSOM type and should not be used internally.
1466         
1467         - Add StyleKeyframe as the internal data structure for keyframes.
1468         - WebKitCSSKeyframeRule becomes a wrapper for StyleKeyframe.
1469         - Use StyleKeyframe internally so WebKitCSSKeyframeRules are created on CSSOM access only.
1470
1471         * css/CSSGrammar.y:
1472         
1473             Use StyleKeyframes instead of WebKitCSSKeyframeRules.
1474         
1475         * css/CSSMediaRule.h:
1476         (CSSMediaRule):
1477         (WebCore::CSSMediaRule::length):
1478         (WebCore::CSSMediaRule::item):
1479         
1480             Adapt to LiveCSSRuleList changes.
1481         
1482         * css/CSSParser.cpp:
1483         (WebCore::CSSParser::parseKeyframeRule):
1484         (WebCore::CSSParser::createKeyframe):
1485         * css/CSSParser.h:        
1486         (WebCore):
1487         (CSSParser):
1488         
1489             Construct StyleKeyframes.
1490         
1491         * css/CSSRuleList.h:
1492         (WebCore::LiveCSSRuleList::length):
1493         (WebCore::LiveCSSRuleList::item):
1494
1495             Make LiveCSSRuleList call rule item()/length() to avoid accessor duplication.
1496     
1497         * css/CSSStyleSelector.cpp:
1498         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1499         * css/CSSStyleSelector.h:
1500         (CSSStyleSelector):
1501         * css/WebKitCSSKeyframeRule.cpp:
1502         
1503             Use StyleKeyframe.
1504             Make 0% and 100% keyframes static.
1505         
1506         (WebCore):
1507         (WebCore::StyleKeyframe::setProperties):
1508         (WebCore::StyleKeyframe::parseKeyString):
1509         (WebCore::StyleKeyframe::cssText):
1510         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
1511         (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
1512         (WebCore::WebKitCSSKeyframeRule::style):
1513         * css/WebKitCSSKeyframeRule.h:
1514         (WebCore):
1515         (WebCore::StyleKeyframe::create):
1516         (WebCore::StyleKeyframe::keyText):
1517         (WebCore::StyleKeyframe::setKeyText):
1518         (StyleKeyframe):
1519         (WebCore::StyleKeyframe::properties):
1520         (WebCore::StyleKeyframe::StyleKeyframe):
1521         (WebKitCSSKeyframeRule):
1522         (WebCore::WebKitCSSKeyframeRule::keyText):
1523         (WebCore::WebKitCSSKeyframeRule::setKeyText):
1524         (WebCore::WebKitCSSKeyframeRule::cssText):
1525         
1526             Split to internal and CSSOM wrapper type. The wrapper refs StyleKeyframe. 
1527         
1528         * css/WebKitCSSKeyframesRule.cpp:
1529         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1530         (WebCore::WebKitCSSKeyframesRule::parserAppendKeyframe):
1531         (WebCore::WebKitCSSKeyframesRule::insertRule):
1532         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1533         (WebCore::WebKitCSSKeyframesRule::findRule):
1534         (WebCore::WebKitCSSKeyframesRule::findKeyframeIndex):
1535         (WebCore::WebKitCSSKeyframesRule::cssText):
1536         (WebCore):
1537         (WebCore::WebKitCSSKeyframesRule::item):
1538         * css/WebKitCSSKeyframesRule.h:
1539         (WebCore):
1540         (WebCore::WebKitCSSKeyframesRule::keyframes):
1541         (WebKitCSSKeyframesRule):
1542         (WebCore::WebKitCSSKeyframesRule::length):
1543         
1544             Keep StyleKeyframes and the wrappers (WebKitCSSKeyframeRules) in separate vectors.
1545             Construct the wrapper vector and wrappers themselves on demand.
1546             Keep the vectors in sync during mutations.
1547         
1548         * css/WebKitCSSRegionRule.h:
1549         
1550             Adapt to LiveCSSRuleList changes.
1551
1552 2012-03-29  Zeno Albisser  <zeno@webkit.org>
1553
1554         Fieldset disabled attribute does not work.
1555         https://bugs.webkit.org/show_bug.cgi?id=58837
1556
1557         Make HTMLFormControlElements inherit the disabled state
1558         from HTMLFieldSetElement ancestors. Subordinates of the
1559         first HTMLLegendElement in a fieldset will never be disabled.
1560
1561         Patch by Zeno Albisser <zeno@webkit.org>
1562
1563         Test: fast/forms/fieldset-disabled.html
1564
1565         Reviewed by Kent Tamura.
1566
1567         * html/HTMLFieldSetElement.cpp:
1568         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1569         (WebCore):
1570         (WebCore::HTMLFieldSetElement::legend):
1571         * html/HTMLFieldSetElement.h:
1572         (HTMLFieldSetElement):
1573         * html/HTMLFieldSetElement.idl:
1574         * html/HTMLFormControlElement.cpp:
1575         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1576         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
1577         (WebCore):
1578         (WebCore::HTMLFormControlElement::parseAttribute):
1579         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
1580         (WebCore::HTMLFormControlElement::removedFromTree):
1581         (WebCore::HTMLFormControlElement::disabled):
1582         * html/HTMLFormControlElement.h:
1583         (WebCore):
1584         (HTMLFormControlElement):
1585
1586 2012-03-29  Tommy Widenflycht  <tommyw@google.com>
1587
1588         MediaStream API: Adding two missing release() calls to PeerConnection00.cpp
1589         https://bugs.webkit.org/show_bug.cgi?id=82584
1590
1591         Reviewed by Adam Barth.
1592
1593         No changes that affects functionality.
1594
1595         * Modules/mediastream/PeerConnection00.cpp:
1596         (WebCore::PeerConnection00::createOffer):
1597         (WebCore::PeerConnection00::createAnswer):
1598
1599 2012-03-29  Ryosuke Niwa  <rniwa@webkit.org>
1600
1601         Pack bitfields in InlineBox for Windows
1602         https://bugs.webkit.org/show_bug.cgi?id=82578
1603
1604         Reviewed by Kent Tamura.
1605
1606         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type in bitfields. e.g. if you have:
1607         sturct AB {
1608         unsigned m_1 : 31;
1609         bool m_2 : 1;
1610         }
1611         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang only allocate
1612         sizeof(unsigned) * 1 for AB.
1613
1614         Fixed the bug by packing all bitfields in InlineBox into InlineBoxBitfields and always using either unsigned or int.
1615
1616         * rendering/EllipsisBox.cpp:
1617         (WebCore::EllipsisBox::paint):
1618         (WebCore::EllipsisBox::selectionRect):
1619         (WebCore::EllipsisBox::nodeAtPoint):
1620         * rendering/InlineBox.cpp:
1621         (WebCore):
1622         (SameSizeAsInlineBox):
1623         (WebCore::InlineBox::logicalHeight):
1624         (WebCore::InlineBox::baselinePosition): Moved from the header file since it's a virtual function.
1625         (WebCore::InlineBox::lineHeight): Ditto.
1626         (WebCore::InlineBox::deleteLine):
1627         (WebCore::InlineBox::extractLine):
1628         (WebCore::InlineBox::attachLine):
1629         (WebCore::InlineBox::nextOnLineExists):
1630         (WebCore::InlineBox::clearKnownToHaveNoOverflow):
1631         * rendering/InlineBox.h:
1632         (WebCore::InlineBox::InlineBox):
1633         (WebCore::InlineBox::isText):
1634         (WebCore::InlineBox::setIsText):
1635         (WebCore::InlineBox::hasVirtualLogicalHeight):
1636         (WebCore::InlineBox::setHasVirtualLogicalHeight):
1637         (WebCore::InlineBox::isHorizontal):
1638         (WebCore::InlineBox::setIsHorizontal):
1639         (WebCore::InlineBox::isConstructed):
1640         (WebCore::InlineBox::setConstructed):
1641         (WebCore::InlineBox::setExtracted):
1642         (WebCore::InlineBox::setFirstLineStyleBit):
1643         (WebCore::InlineBox::isFirstLineStyle):
1644         (InlineBox):
1645         (WebCore::InlineBox::bidiLevel):
1646         (WebCore::InlineBox::setBidiLevel):
1647         (WebCore::InlineBox::direction):
1648         (WebCore::InlineBox::isDirty):
1649         (WebCore::InlineBox::markDirty):
1650         (WebCore::InlineBox::expansion):
1651         (WebCore::InlineBox::verticalAlign):
1652         (WebCore::InlineBox::knownToHaveNoOverflow):
1653         (WebCore::InlineBox::dirOverride):
1654         (WebCore::InlineBox::setDirOverride):
1655         (InlineBoxBitfields):
1656         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
1657         (WebCore::InlineBox::InlineBoxBitfields::bidiEmbeddingLevel):
1658         (WebCore::InlineBox::InlineBoxBitfields::setBidiEmbeddingLevel):
1659         (WebCore::InlineBox::InlineBoxBitfields::determinedIfNextOnLineExists):
1660         (WebCore::InlineBox::InlineBoxBitfields::setDeterminedIfNextOnLineExists):
1661         (WebCore::InlineBox::InlineBoxBitfields::nextOnLineExists):
1662         (WebCore::InlineBox::InlineBoxBitfields::setNextOnLineExists):
1663         (WebCore::InlineBox::InlineBoxBitfields::expansion):
1664         (WebCore::InlineBox::InlineBoxBitfields::setExpansion):
1665         (WebCore::InlineBox::endsWithBreak):
1666         (WebCore::InlineBox::setEndsWithBreak):
1667         (WebCore::InlineBox::hasEllipsisBox):
1668         (WebCore::InlineBox::hasSelectedChildren):
1669         (WebCore::InlineBox::setHasSelectedChildren):
1670         (WebCore::InlineBox::setHasEllipsisBox):
1671         (WebCore::InlineBox::hasHyphen):
1672         (WebCore::InlineBox::setHasHyphen):
1673         (WebCore::InlineBox::canHaveLeadingExpansion):
1674         (WebCore::InlineBox::setCanHaveLeadingExpansion):
1675         (WebCore::InlineBox::setExpansion):
1676         (WebCore::InlineBox::extracted):
1677         * rendering/InlineFlowBox.cpp:
1678         (WebCore::InlineFlowBox::addToLine):
1679         (WebCore::InlineFlowBox::removeChild):
1680         (WebCore::InlineFlowBox::extractLine):
1681         (WebCore::InlineFlowBox::attachLine):
1682         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1683         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
1684         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1685         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1686         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
1687         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1688         (WebCore::InlineFlowBox::paintBoxDecorations):
1689         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1690         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1691         * rendering/InlineTextBox.cpp:
1692         (WebCore::InlineTextBox::destroy):
1693         (WebCore::InlineTextBox::logicalOverflowRect):
1694         (WebCore::InlineTextBox::setLogicalOverflowRect):
1695         (WebCore::InlineTextBox::baselinePosition):
1696         (WebCore::InlineTextBox::lineHeight):
1697         (WebCore::InlineTextBox::localSelectionRect):
1698         (WebCore::InlineTextBox::extractLine):
1699         (WebCore::InlineTextBox::attachLine):
1700         (WebCore::InlineTextBox::placeEllipsisBox):
1701         (WebCore::InlineTextBox::paint):
1702         (WebCore::InlineTextBox::paintDecoration):
1703         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1704         (WebCore::InlineTextBox::paintCompositionUnderline):
1705         (WebCore::InlineTextBox::offsetForPosition):
1706         (WebCore::InlineTextBox::positionForOffset):
1707         (WebCore::InlineTextBox::constructTextRun):
1708         * rendering/InlineTextBox.h:
1709         (InlineTextBox):
1710         (WebCore::InlineTextBox::setExpansion):
1711         (WebCore::InlineTextBox::expansionBehavior):
1712         * rendering/RenderBlockLineLayout.cpp:
1713         (WebCore::RenderBlock::constructLine):
1714         * rendering/RenderTreeAsText.cpp:
1715         (WebCore::writeTextRun):
1716         * rendering/RootInlineBox.cpp:
1717         (WebCore::RootInlineBox::baselinePosition): Moved from the header file since it's a virtual function.
1718         (WebCore::RootInlineBox::lineHeight): Ditto.
1719         (WebCore::RootInlineBox::paint):
1720         (WebCore::RootInlineBox::ascentAndDescentForBox):
1721         (WebCore::RootInlineBox::verticalPositionForBox):
1722         * rendering/RootInlineBox.h:
1723         (RootInlineBox):
1724         * rendering/svg/SVGInlineTextBox.cpp:
1725         (WebCore::SVGInlineTextBox::constructTextRun):
1726         * rendering/svg/SVGRenderTreeAsText.cpp:
1727         (WebCore::writeSVGInlineTextBox):
1728
1729 2012-03-29  hayato@chromium.org  <hayato@chromium.org>
1730
1731         Let focus navigation be compliant with Shadow DOM spec.
1732         https://bugs.webkit.org/show_bug.cgi?id=78588
1733
1734         Reviewed by Dimitri Glazkov.
1735
1736         Re-landing r112500. Fixed an assertion failure on ReifiedTreeTraversal.
1737
1738         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
1739
1740         According to the Shadow DOM spec:
1741         The shadow DOM navigation order sequence is inserted into the document navigation order:
1742         1. immediately after the shadow host, if the shadow host is focusable; or
1743         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
1744
1745         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
1746         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
1747         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
1748
1749         Implementation notes:
1750         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
1751         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
1752         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
1753         it does not skip a non-focusable shadow host in current focus scope.
1754         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
1755         considering a nested focus scope inside of a shadow host or iframe.
1756         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
1757
1758         This change does not affect an existing behavior if a shadow dom is not involved.
1759
1760         Test: fast/dom/shadow/focus-navigation.html
1761
1762         * dom/Element.cpp:
1763         (WebCore::Element::focus):
1764         * dom/ReifiedTreeTraversal.cpp:
1765         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
1766         * page/FocusController.cpp:
1767         (WebCore::isShadowHost):
1768         (WebCore):
1769         (WebCore::FocusScope::FocusScope):
1770         (WebCore::FocusScope::rootNode):
1771         (WebCore::FocusScope::owner):
1772         (WebCore::FocusScope::focusScopeOf):
1773         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
1774         (WebCore::FocusScope::focusScopeOwnedByIFrame):
1775         (WebCore::hasCustomFocusLogic):
1776         (WebCore::isNonFocusableShadowHost):
1777         (WebCore::isFocusableShadowHost):
1778         (WebCore::adjustedTabIndex):
1779         (WebCore::shouldVisit):
1780         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1781         (WebCore::FocusController::advanceFocusInDocumentOrder):
1782         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1783         (WebCore::FocusController::findFocusableNodeRecursively):
1784         (WebCore::FocusController::findFocusableNode):
1785         (WebCore::FocusController::findNodeWithExactTabIndex):
1786         (WebCore::nextNodeWithGreaterTabIndex):
1787         (WebCore::previousNodeWithLowerTabIndex):
1788         (WebCore::FocusController::nextFocusableNode):
1789         (WebCore::FocusController::previousFocusableNode):
1790         * page/FocusController.h:
1791         (WebCore):
1792         (FocusScope):
1793         (FocusController):
1794
1795 2012-03-28  Kinuko Yasuda  <kinuko@chromium.org>
1796
1797         [chromium] Add isolated filesystem type and WebDragData::filesystem_id for drag-and-drop using File/DirectoryEntry.
1798         https://bugs.webkit.org/show_bug.cgi?id=76826
1799
1800         Add two helper methods for creating isolated filesystem to the
1801         PlatformSupport interface.
1802
1803         Reviewed by David Levin.
1804
1805         No new tests: tests will be added when app-facing code is added.
1806
1807         * platform/chromium/PlatformSupport.h:
1808         (PlatformSupport):
1809
1810 2012-03-29  Vineet Chaudhary  <rgf748@motorola.com>
1811
1812         Remove custom bindings form Internals.idl of attribute type Array.
1813         https://bugs.webkit.org/show_bug.cgi?id=82319
1814
1815         Reviewed by Kentaro Hara.
1816
1817         Remove custom bindings for Array type and replace Array type with sequence<String>.
1818
1819         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
1820         even after these changes.
1821
1822         * Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1823         * UseJSC.cmake: Remove JSInternalsCustom.cpp.
1824         * UseV8.cmake: Remove V8InternalsCustom.cpp.
1825         * WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1826         * WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1827         * WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp.
1828         * bindings/js/JSDOMBinding.h:
1829         (WebCore):
1830         (WebCore::jsArray): Added new specialize function template for Strings.
1831         * bindings/scripts/CodeGeneratorJS.pm:
1832         (JSValueToNative): Add jsArray<String>() to deduce return type.
1833         (NativeToJSValue): Added check for type String.
1834         * bindings/scripts/CodeGeneratorV8.pm:
1835         (JSValueToNative): Add v8Array<String>() to deduce return type.
1836         (NativeToJSValue): Added check for type String.
1837         * bindings/scripts/test/JS/JSTestObj.cpp:
1838         (WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests.
1839         * bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests.
1840         (WebCore::TestObjInternal::sequenceAttrAttrSetter):
1841         * bindings/v8/V8Binding.h: Added new specialize function template for Strings.
1842         (WebCore):
1843         (WebCore::v8Array):
1844         (WebCore::toNativeArray):
1845         * testing/Internals.idl: Replace Array type with sequence<String>
1846         * testing/js/JSInternalsCustom.cpp: Removed.
1847         * testing/v8/V8InternalsCustom.cpp: Removed.
1848
1849 2012-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1850
1851         Unreviewed, rolling out r112500.
1852         http://trac.webkit.org/changeset/112500
1853         https://bugs.webkit.org/show_bug.cgi?id=82576
1854
1855         assertion failed on fast/events/tab-test-not-visible-
1856         imagemap.html on gtk/qt (Requested by hayato on #webkit).
1857
1858         * dom/Element.cpp:
1859         (WebCore::Element::focus):
1860         * page/FocusController.cpp:
1861         (WebCore):
1862         (WebCore::shadowRoot):
1863         (WebCore::isTreeScopeOwner):
1864         (WebCore::FocusController::transferFocusToElementInShadowRoot):
1865         (WebCore::hasCustomFocusLogic):
1866         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot):
1867         (WebCore::FocusController::advanceFocusInDocumentOrder):
1868         (WebCore::ownerOfTreeScope):
1869         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
1870         (WebCore::FocusController::findFocusableNode):
1871         (WebCore::nextNodeWithExactTabIndex):
1872         (WebCore::previousNodeWithExactTabIndex):
1873         (WebCore::nextNodeWithGreaterTabIndex):
1874         (WebCore::previousNodeWithLowerTabIndex):
1875         (WebCore::FocusController::nextFocusableNode):
1876         (WebCore::FocusController::previousFocusableNode):
1877         * page/FocusController.h:
1878         (WebCore):
1879         (FocusController):
1880
1881 2012-03-28  Kent Tamura  <tkent@chromium.org>
1882
1883         Add TextFieldDecorationElement::decorate()
1884         https://bugs.webkit.org/show_bug.cgi?id=82572
1885
1886         Reviewed by Hajime Morita.
1887
1888         This change will be needed for Bug 82143.
1889         No new tests because of no behavior changes yet. This code change
1890         doesn't affect non-Chromium ports for now.
1891
1892         * dom/ShadowRoot.cpp:
1893         (WebCore::ShadowRoot::create):
1894         Remove unnecessary assertion. We should allow multiple UA shadow roots.
1895         * html/shadow/TextFieldDecorationElement.cpp:
1896         (WebCore::TextFieldDecorationElement::decorate):
1897         Added.
1898         This function adds another ShadowRoot, and it contains one flexible box container.
1899         The container contains existin ShadowRoot content and the decoration element.
1900         * html/shadow/TextFieldDecorationElement.h:
1901         (TextFieldDecorationElement): Add the declaration of decorate().
1902
1903 2012-03-28  Vineet Chaudhary  <rgf748@motorola.com>
1904
1905         Consider removal of removes jsNull()/v8::Null() from JSInternalsCustom.cpp/V8InternalsCustom.cpp
1906         https://bugs.webkit.org/show_bug.cgi?id=82442
1907
1908         Reviewed by Kentaro Hara.
1909
1910         No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass
1911         even after these changes.
1912
1913         * testing/js/JSInternalsCustom.cpp: Remove jsNull() if Vector is empty.
1914         (WebCore::JSInternals::userPreferredLanguages):
1915         * testing/v8/V8InternalsCustom.cpp: Remove v8::Null() if Vector is empty.
1916         (WebCore::V8Internals::userPreferredLanguagesAccessorGetter):
1917
1918 2012-03-28  Hayato Ito  <hayato@chromium.org>
1919
1920         Let focus navigation be compliant with Shadow DOM spec.
1921         https://bugs.webkit.org/show_bug.cgi?id=78588
1922
1923         Reviewed by Dimitri Glazkov.
1924
1925         Sequential focus navigation now behaves exactly as specified in the Shadow DOM spec.
1926
1927         According to the Shadow DOM spec:
1928         The shadow DOM navigation order sequence is inserted into the document navigation order:
1929         1. immediately after the shadow host, if the shadow host is focusable; or
1930         2. in place of the shadow host as if the shadow host were assigned the value of auto for determining its position.
1931
1932         Prior to this patch, sequential focus navigation goes into Shadow DOM, but it is incomplete
1933         since insertion points, such as <content> elements or <shadow> elements, are not resolved at all.
1934         Now focus navigation can traverse shadow DOM subtrees in 'reified tree order', resolving lower boundaries transparently.
1935
1936         Implementation notes:
1937         Prior to this patch, sequential focus navigation does not go into Shadow DOM if a shadow host is non-focusable.
1938         Now focus navigation must go into Shadow DOM subtrees even if a show host is not focusable as described in 2).
1939         To support this behavior, this patch introduced adjustedTabIndex() locally in FocusController so that
1940         it does not skip a non-focusable shadow host in current focus scope.
1941         After finding a *pseudo* focusable element in current focus scope, it tries to resolve a focused element recursively,
1942         considering a nested focus scope inside of a shadow host or iframe.
1943         To traverse Shadow DOM subtrees, a FocusController makes use of ReifiedTreeTraversal APIs, which was introduced in r112055.
1944
1945         This change does not affect an existing behavior if a shadow dom is not involved.
1946
1947         Test: fast/dom/shadow/focus-navigation.html
1948
1949         * dom/Element.cpp:
1950         (WebCore::Element::focus):
1951         * page/FocusController.cpp:
1952         (WebCore::isShadowHost):
1953         (WebCore):
1954         (WebCore::FocusScope::FocusScope):
1955         (WebCore::FocusScope::rootNode):
1956         (WebCore::FocusScope::owner):
1957         (WebCore::FocusScope::focusScopeOf):
1958         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
1959         (WebCore::FocusScope::focusScopeOwnedByIFrame):
1960         (WebCore::hasCustomFocusLogic):
1961         (WebCore::isNonFocusableShadowHost):
1962         (WebCore::isFocusableShadowHost):
1963         (WebCore::adjustedTabIndex):
1964         (WebCore::shouldVisit):
1965         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1966         (WebCore::FocusController::advanceFocusInDocumentOrder):
1967         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1968         (WebCore::FocusController::findFocusableNodeRecursively):
1969         (WebCore::FocusController::findFocusableNode):
1970         (WebCore::FocusController::findNodeWithExactTabIndex):
1971         (WebCore::nextNodeWithGreaterTabIndex):
1972         (WebCore::previousNodeWithLowerTabIndex):
1973         (WebCore::FocusController::nextFocusableNode):
1974         (WebCore::FocusController::previousFocusableNode):
1975         * page/FocusController.h:
1976         (WebCore):
1977         (FocusScope):
1978         (FocusController):
1979
1980 2012-03-28  Li Yin  <li.yin@intel.com>
1981
1982         [WebSocket]Browser must fail connection if Sec-WebSocket-Protocol mismatched.
1983         https://bugs.webkit.org/show_bug.cgi?id=82307
1984
1985         Reviewed by Kent Tamura.
1986
1987         From RFC6455: http://tools.ietf.org/html/rfc6455#section-4.1
1988         If the WebSocket openhanding respond included the mismatched
1989         Sec-WebSocket-Protocol header field, the client must fail the WebSocket Connection.
1990
1991         Test: http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html
1992
1993         * Modules/websockets/WebSocketHandshake.cpp:
1994         (WebCore::WebSocketHandshake::checkResponseHeaders):
1995
1996 2012-03-28  Jessie Berlin  <jberlin@apple.com>
1997
1998         Fix Windows build after r112482.
1999
2000         * platform/network/cf/FormDataStreamCFNet.cpp:
2001         (WebCore::formOpen):
2002         Do not attempt to use an OS X error code on Windows. Use the POSIX errno instead.
2003
2004 2012-03-28  Alexandru Chiculita  <achicu@adobe.com>
2005
2006         [CSS Filters] Avoid rebuilding FEFilters when RenderLayer is destroyed
2007         https://bugs.webkit.org/show_bug.cgi?id=82524
2008
2009         Reviewed by Dean Jackson.
2010
2011         RenderLayer::~RenderLayer is calling clearBacking which updated the m_filter with new filters,
2012         even though they were to be deleted a couple of lines below. This change avoids updating the filters,
2013         if we are in the "destroyed" state.
2014
2015         No new tests. This change has no visible results to HTML or JavaScript, so it cannot be tested without a debugger.
2016
2017         * rendering/RenderLayer.cpp:
2018         (WebCore::RenderLayer::~RenderLayer):
2019         (WebCore::RenderLayer::clearBacking):
2020         * rendering/RenderLayer.h:
2021         (RenderLayer):
2022
2023 2012-03-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2024
2025         Remove ScriptExecutionContext from NavigatorBattery.idl
2026         https://bugs.webkit.org/show_bug.cgi?id=82556
2027
2028         Reviewed by Adam Barth.
2029
2030         As Bug 73528 comment #71, NavigatorBattery.idl doesn't need to have ScriptExecutionContext.
2031         Document can be used instead of ScriptExecutionContext.
2032
2033         Tests: batterystatus/add-listener-from-callback.html
2034                batterystatus/basic-all-types-of-events.html
2035                batterystatus/basic-operation.html
2036                batterystatus/event-after-navigation.html
2037                batterystatus/multiple-frames.html
2038                batterystatus/updates.html
2039                batterystatus/window-property.html
2040
2041         * Modules/battery/BatteryManager.cpp:
2042         (WebCore::BatteryManager::create):
2043         (WebCore::BatteryManager::BatteryManager):
2044         * Modules/battery/BatteryManager.h:
2045         (BatteryManager):
2046         * Modules/battery/NavigatorBattery.cpp:
2047         (WebCore::NavigatorBattery::webkitBattery):
2048         * Modules/battery/NavigatorBattery.h:
2049         (NavigatorBattery):
2050         * Modules/battery/NavigatorBattery.idl:
2051
2052 2012-03-28  Jason Liu  <jason.liu@torchmobile.com.cn>
2053
2054         [BlackBerry]Missing cookies from HTTP response header in Network tab of Web Inspector.
2055         https://bugs.webkit.org/show_bug.cgi?id=82041
2056
2057         We shouldn't overwrite cookies of response if there are more than one
2058         header of Set-Cookie.
2059
2060         Reviewed by Rob Buis.
2061
2062         Test: http/tests/cookies/resources/setArraycookies.php
2063
2064         * platform/network/blackberry/NetworkJob.cpp:
2065         (WebCore::NetworkJob::handleNotifyHeaderReceived):
2066
2067 2012-03-28  Noel Gordon  <noel.gordon@gmail.com>
2068
2069         JPEGImageDecoder: Set frame alpha state before marking a frame complete
2070         https://bugs.webkit.org/show_bug.cgi?id=82428
2071
2072         Reviewed by Kenneth Russell.
2073
2074         r109779 changed JPEG alpha channel handling by marking a JPEG image frame
2075         as having no alpha _after_ setting the image status frame-complete, which
2076         prevents the application of image color profiles in some WebGL cases.
2077
2078         No new tests. The application of the color profile is not guaranteed for
2079         images used as textures in WebGL. Refer to http://wkb.ug/76498.
2080
2081         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2082         (WebCore::JPEGImageDecoder::jpegComplete): Set the image frame alpha state
2083         before marking the image frame status as frame-complete.
2084
2085 2012-03-28  Emil A Eklund  <eae@chromium.org>
2086
2087         Fix rounding in RenderInline::paintOutlineForLine
2088         https://bugs.webkit.org/show_bug.cgi?id=82540
2089
2090         Reviewed by Eric Seidel.
2091
2092         No new tests, no change in functionality.
2093
2094         * rendering/RenderInline.cpp:
2095         (WebCore::RenderInline::paintOutlineForLine):
2096         Change paintOutlineForLine to pixel snap the left and right edges of the
2097         lines instead of adding the offset to an already rounded number.
2098
2099 2012-03-28  David Grogan  <dgrogan@chromium.org>
2100
2101         IndexedDB: don't expose IDBDatabaseError to script
2102         https://bugs.webkit.org/show_bug.cgi?id=82280
2103
2104         It's not used anywhere and firefox doesn't expose it.
2105
2106         Reviewed by Tony Chang.
2107
2108         Test: storage/indexeddb/removed.html
2109
2110         * CMakeLists.txt:
2111         * DerivedSources.cpp:
2112         * DerivedSources.make:
2113         * DerivedSources.pri:
2114         * GNUmakefile.list.am:
2115         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
2116         * Modules/indexeddb/IDBDatabaseError.idl: Removed.
2117         * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
2118         * WebCore.gypi:
2119         * WebCore.vcproj/WebCore.vcproj:
2120         * WebCore.xcodeproj/project.pbxproj:
2121
2122 2012-03-28  Kenichi Ishibashi  <bashi@chromium.org>
2123
2124         Respects font fallback list during webfonts are loading
2125         https://bugs.webkit.org/show_bug.cgi?id=76684
2126
2127         Reviewed by Dimitri Glazkov.
2128
2129         For layout, use the rest of the fallback list while webfonts are loading.
2130         If the webfont is loading, it will be given an invalid Unicode Range so that
2131         font selection mechansim doesn't use the webfont for layout.
2132
2133         Test: http/tests/webfont/fallback-font-while-loading.html
2134
2135         * css/CSSSegmentedFontFace.cpp:
2136         (WebCore::appendFontDataWithInvalidUnicodeRangeIfLoading): Added.
2137         (WebCore):
2138         (WebCore::CSSSegmentedFontFace::getFontData):
2139
2140 2012-03-28  Mark Rowe  <mrowe@apple.com>
2141
2142         Update Localizable.strings.
2143
2144         * English.lproj/Localizable.strings:
2145
2146 2012-03-28  Victor Carbune  <vcarbune@adobe.com>
2147
2148         Removed particular rendering for the volume slider and used
2149         css positioning instead (simpler and less prone to errors when
2150         changes occur).
2151         https://bugs.webkit.org/show_bug.cgi?id=82150
2152
2153         Reviewed by Eric Carlson.
2154
2155         Test: media/video-controls-rendering-toggle-display-none.html
2156
2157         * css/mediaControls.css: Updated css to correctly render controls.
2158         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2159         * css/mediaControlsChromium.css: Updated css to correctly render controls.
2160         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): 
2161         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2162         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2163         * html/shadow/MediaControlElements.cpp: Removed particular renderer.
2164         (WebCore):
2165         * html/shadow/MediaControlElements.h: Removed particular renderer.
2166         (MediaControlVolumeSliderContainerElement):
2167         * html/shadow/MediaControlRootElementChromium.cpp:
2168         (WebCore::MediaControlRootElementChromium::create): Added an anonymous div container
2169         for the mute button and volume slider (to be displayed on top of each other)
2170
2171 2012-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2172
2173         Unreviewed, rolling out r110064.
2174         http://trac.webkit.org/changeset/110064
2175         https://bugs.webkit.org/show_bug.cgi?id=82537
2176
2177         The patch leaks the DOM when audio elements are used
2178         (Requested by sundiamonde on #webkit).
2179
2180         * bindings/js/JSNodeCustom.cpp:
2181         (WebCore::isReachableFromDOM):
2182
2183 2012-03-28  Alexey Proskuryakov  <ap@apple.com>
2184
2185         [Win] Some Blob tests crash in CFNetwork in advanceCurrentStream(FormStreamFields*)
2186         https://bugs.webkit.org/show_bug.cgi?id=82386
2187         <rdar://problem/11121501>
2188
2189         Reviewed by Brady Eidson.
2190
2191         Covered by existing tests.
2192
2193         * platform/network/cf/FormDataStreamCFNet.cpp:
2194         * platform/network/cf/FormDataStreamCFNet.h:
2195         Moved low level implementation from FormDataStreamMac, and exposed an additional function
2196         to implement Foundation-based API on top of this.
2197
2198         * platform/network/mac/FormDataStreamMac.h:
2199         * platform/network/mac/FormDataStreamMac.mm:
2200         Rely on toll-free bridging and implementation details to make this work without duplicating
2201         code.
2202         Note that httpBodyFromStream is confusing - I don't see how it can work when sending serialized
2203         requests across process boundary. We probably only get away with this because we don't attempt
2204         to send requests to UI process once they already have streams associated with them.
2205
2206         * WebCore.vcproj/WebCore.vcproj: Added missing platform/cf files.
2207
2208         * platform/cf/FileSystemCF.cpp: Fixed include style.
2209
2210         * platform/win/FileSystemWin.cpp: (WebCore::fileSystemRepresentation): Ifdef out a broken
2211         implementation.
2212
2213 2012-03-28  Adrienne Walker  <enne@google.com>
2214
2215         [chromium] Fix tiled layer assert for huge layers
2216         https://bugs.webkit.org/show_bug.cgi?id=82486
2217
2218         Reviewed by James Robinson.
2219
2220         Test: TiledLayerChromiumTest.hugeLayerUpdateCrash
2221
2222         TilingData::numTiles() is calculated as the product of two ints and so
2223         can potentially overflow, causing numTiles() to be incorrect. To avoid
2224         calling code accidentally falling into this trap, remove this function
2225         and all code that uses tile index from TilingData.  This requires
2226         fixing up a bunch of callers of TilingData and CCLayerTilingData.
2227
2228         Additionally, TilingData::numTiles() has long been a confusing
2229         function name in some contexts, so rename to bool hasEmptyBounds().
2230
2231         Also, remove TilingData::intersectDrawQuad because there are no
2232         clients of that function.
2233
2234         * platform/graphics/chromium/TiledLayerChromium.cpp:
2235         (WebCore::TiledLayerChromium::drawsContent):
2236         (WebCore::TiledLayerChromium::reserveTextures):
2237         (WebCore::TiledLayerChromium::prepareToUpdate):
2238         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2239         (WebCore::TiledLayerChromium::needsIdlePaint):
2240         (WebCore::TiledLayerChromium::idlePaintRect):
2241         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2242         (WebCore::CCLayerTilingData::tileRect):
2243         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2244         (WebCore::CCLayerTilingData::hasEmptyBounds):
2245         (WebCore::CCLayerTilingData::tileBounds):
2246         (WebCore::CCLayerTilingData::isEmpty):
2247         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2248         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2249         (WebCore::CCTiledLayerImpl::appendQuads):
2250         * platform/graphics/gpu/Texture.cpp:
2251         (WebCore::Texture::create):
2252         (WebCore::Texture::updateSubRect):
2253         * platform/graphics/gpu/TilingData.cpp:
2254         (WebCore::TilingData::tileBounds):
2255         (WebCore::TilingData::tileBoundsWithBorder):
2256         (WebCore::TilingData::tileBoundsNormalized):
2257         * platform/graphics/gpu/TilingData.h:
2258         (WebCore::TilingData::hasEmptyBounds):
2259         (TilingData):
2260         (WebCore::TilingData::assertTile):
2261
2262 2012-03-28  Emil A Eklund  <eae@chromium.org>
2263
2264         Change FilterOperations::getOutsets to use integers
2265         https://bugs.webkit.org/show_bug.cgi?id=82535
2266
2267         Reviewed by Eric Seidel.
2268
2269         FilterOperations::getOutsets calculates the outsets using integers and
2270         the values are guranteed to be set to full-pixel values. By changing the
2271         function signature we communicate this fact better and avoid unnecessary
2272         type conversions in some cases.
2273
2274         No new tests.
2275
2276         * platform/graphics/filters/FilterOperations.cpp:
2277         (WebCore::FilterOperations::getOutsets):
2278         * platform/graphics/filters/FilterOperations.h:
2279         (FilterOperations):
2280         * rendering/RenderBox.cpp:
2281         (WebCore::RenderBox::computeRectForRepaint):
2282         (WebCore::RenderBox::addVisualEffectOverflow):
2283         * rendering/RenderInline.cpp:
2284         (WebCore::RenderInline::computeRectForRepaint):
2285         * rendering/style/RenderStyle.h:
2286
2287 2012-03-28  Nate Chapin  <japhet@chromium.org>
2288
2289         Remove dispatchDidLoadMainResource callback, since no
2290         port implements it.
2291         https://bugs.webkit.org/show_bug.cgi?id=82539
2292
2293         Reviewed by Alexey Proskuryakov.
2294
2295         No new tests, just deleting dead code.
2296
2297         * loader/EmptyClients.h:
2298         (EmptyFrameLoaderClient):
2299         * loader/FrameLoader.cpp:
2300         (WebCore::FrameLoader::finishedLoading):
2301         (WebCore::FrameLoader::mainReceivedCompleteError):
2302         * loader/FrameLoaderClient.h:
2303         (FrameLoaderClient):
2304         * loader/MainResourceLoader.cpp:
2305         (WebCore::MainResourceLoader::receivedError):
2306         (WebCore::MainResourceLoader::didCancel):
2307
2308 2012-03-28  Enrica Casucci  <enrica@apple.com>
2309
2310         REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms.
2311         https://bugs.webkit.org/show_bug.cgi?id=82497
2312         <rdar://problem/11140334>
2313
2314         Reviewed by Brady Eidson.
2315         
2316         The revision causing this regression fixed the way data is written to the pasteboard for NSURLPboardType.
2317         This change fixes the way data is read from the pasteboard for the same pasteboard type.
2318
2319         No new tests. Fixes the existing one that fails.
2320
2321         * platform/mac/ClipboardMac.mm:
2322         (WebCore::absoluteURLsFromPasteboard):
2323         * platform/mac/PlatformPasteboardMac.mm:
2324         (WebCore::PlatformPasteboard::stringForType):
2325
2326 2012-03-28  Joe Thomas  <joethomas@motorola.com>
2327
2328         SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
2329         https://bugs.webkit.org/show_bug.cgi?id=82390
2330
2331         Reviewed by Simon Fraser.
2332
2333         This is an attempt to fix the MAC SL/Lion Bot issue as this issue is not reproducible locally.
2334         The assertion happened when length type is Undefined in valueForLength() function but the assertion for Undefined length type
2335         in RenderBox::computeLogicalWidthInRegionUsing which calls the above said function did not get hit.
2336
2337         This patch passes Length structure as const reference to Length calculation functions which avoids the call to the copy-constructor.
2338         And it ensures that the Length structure is not getting modified during copy-construction. 
2339
2340         * css/LengthFunctions.cpp:
2341         (WebCore::minimumValueForLength):
2342         (WebCore::valueForLength):
2343         (WebCore::floatValueForLength):
2344         * css/LengthFunctions.h:
2345         (WebCore):
2346
2347 2012-03-28  Gavin Barraclough  <barraclough@apple.com>
2348
2349         Yarr: if we're not using the output array, don't populate it!
2350         https://bugs.webkit.org/show_bug.cgi?id=82519
2351
2352         Reviewed by Sam Weinig.
2353
2354         * ForwardingHeaders/runtime/MatchResult.h: Added.
2355         * ForwardingHeaders/yarr/YarrJIT.h: Added.
2356             - Added forwarding headers.
2357
2358 2012-03-23  David Hyatt  <hyatt@apple.com>
2359
2360         https://bugs.webkit.org/show_bug.cgi?id=81685
2361         
2362         [New Multicolumn] Add RenderMultiColumnFlowThread to hold the flow thread contents of a multi-column block.
2363         It derives from RenderFlowThread.
2364         
2365         Refactor RenderFlowThread to split out the stuff related to explicit naming into a subclass, RenderNamedFlowThread.
2366         This allows RenderFlowThread to be a simple base class that involves maintaining the regions themselves.
2367     
2368         Reviewed by Julien Chaffraix.
2369
2370         * CMakeLists.txt:
2371         * GNUmakefile.list.am:
2372         * Target.pri:
2373         * WebCore.gypi:
2374         * WebCore.vcproj/WebCore.vcproj:
2375         * WebCore.xcodeproj/project.pbxproj:
2376         * dom/Document.cpp:
2377         * dom/NodeRenderingContext.cpp:
2378         * dom/NodeRenderingContext.h:
2379         (WebCore):
2380         (WebCore::NodeRenderingContext::parentFlowRenderer):
2381         * dom/WebKitNamedFlow.cpp:
2382         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
2383         * dom/WebKitNamedFlow.h:
2384         (WebCore):
2385         (WebCore::WebKitNamedFlow::create):
2386         (WebKitNamedFlow):
2387         * rendering/RenderBlock.cpp:
2388         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2389         * rendering/RenderFlowThread.cpp:
2390         (WebCore::RenderFlowThread::RenderFlowThread):
2391         (WebCore):
2392         (WebCore::RenderFlowThread::addRegionToThread):
2393         (WebCore::RenderFlowThread::removeRegionFromThread):
2394         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2395         * rendering/RenderFlowThread.h:
2396         (WebCore):
2397         * rendering/RenderMultiColumnFlowThread.cpp: Added.
2398         (WebCore):
2399         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
2400         (WebCore::RenderMultiColumnFlowThread::renderName):
2401         * rendering/RenderMultiColumnFlowThread.h: Added.
2402         (WebCore):
2403         (RenderMultiColumnFlowThread):
2404         * rendering/RenderNamedFlowThread.cpp: Added.
2405         (WebCore):
2406         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2407         (WebCore::RenderNamedFlowThread::renderName):
2408         (WebCore::RenderNamedFlowThread::nextRendererForNode):
2409         (WebCore::RenderNamedFlowThread::previousRendererForNode):
2410         (WebCore::RenderNamedFlowThread::addFlowChild):
2411         (WebCore::RenderNamedFlowThread::removeFlowChild):
2412         (WebCore::RenderNamedFlowThread::dependsOn):
2413         (WebCore::compareRenderRegions):
2414         (WebCore::RenderNamedFlowThread::addRegionToThread):
2415         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2416         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
2417         (WebCore::RenderNamedFlowThread::addDependencyOnFlowThread):
2418         (WebCore::RenderNamedFlowThread::removeDependencyOnFlowThread):
2419         (WebCore::RenderNamedFlowThread::pushDependencies):
2420         (WebCore::RenderNamedFlowThread::ensureNamedFlow):
2421         * rendering/RenderNamedFlowThread.h: Added.
2422         (WebCore):
2423         (RenderNamedFlowThread):
2424         (WebCore::RenderNamedFlowThread::name):
2425         (WebCore::RenderNamedFlowThread::hasChildren):
2426         (WebCore::RenderNamedFlowThread::hasChild):
2427         (WebCore::RenderNamedFlowThread::isRenderNamedFlowThread):
2428         (WebCore::toRenderNamedFlowThread):
2429         * rendering/RenderObject.cpp:
2430         (WebCore::RenderObject::willBeDestroyed):
2431         * rendering/RenderObject.h:
2432         (WebCore::RenderObject::isRenderNamedFlowThread):
2433         * rendering/RenderObjectChildList.cpp:
2434         (WebCore::renderNamedFlowThreadContainer):
2435         (WebCore::RenderObjectChildList::removeChildNode):
2436         (WebCore::RenderObjectChildList::appendChildNode):
2437         (WebCore::RenderObjectChildList::insertChildNode):
2438         * rendering/RenderRegion.cpp:
2439         (WebCore::RenderRegion::RenderRegion):
2440         (WebCore::RenderRegion::attachRegion):
2441         * rendering/RenderRegion.h:
2442         (WebCore):
2443         (WebCore::RenderRegion::parentNamedFlowThread):
2444         (RenderRegion):
2445         * rendering/RenderTreeAsText.cpp:
2446         (WebCore::writeRenderNamedFlowThreads):
2447         (WebCore::writeLayers):
2448         * rendering/RenderView.cpp:
2449         (WebCore::RenderView::RenderView):
2450         (WebCore::RenderView::layout):
2451         (WebCore::RenderView::styleDidChange):
2452         (WebCore::RenderView::ensureRenderFlowThreadWithName):
2453         (WebCore::RenderView::layoutRenderNamedFlowThreads):
2454         * rendering/RenderView.h:
2455         (WebCore):
2456         (RenderView):
2457         (WebCore::RenderView::hasRenderNamedFlowThreads):
2458         (WebCore::RenderView::isRenderNamedFlowThreadOrderDirty):
2459         (WebCore::RenderView::setIsRenderNamedFlowThreadOrderDirty):
2460         (WebCore::RenderView::renderNamedFlowThreadList):
2461
2462 2012-03-28  Emil A Eklund  <eae@chromium.org>
2463
2464         Remove unnecessary rounding in RenderLayerBacking
2465         https://bugs.webkit.org/show_bug.cgi?id=82529
2466
2467         Reviewed by Eric Seidel.
2468
2469         Remove rounding that is no longer required now that borderBoxRect returns
2470         an IntRect.
2471         
2472         No new tests.
2473
2474         * rendering/RenderLayerBacking.cpp:
2475         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2476         (WebCore::RenderLayerBacking::startAnimation):
2477         (WebCore::RenderLayerBacking::startTransition):
2478
2479 2012-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2480
2481         Unreviewed, rolling out r112432.
2482         http://trac.webkit.org/changeset/112432
2483         https://bugs.webkit.org/show_bug.cgi?id=82536
2484
2485         Causes ccs3 layout test asserts (Requested by enne on
2486         #webkit).
2487
2488         * platform/graphics/chromium/TiledLayerChromium.cpp:
2489         (WebCore::TiledLayerChromium::drawsContent):
2490         (WebCore::TiledLayerChromium::reserveTextures):
2491         (WebCore::TiledLayerChromium::prepareToUpdate):
2492         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2493         (WebCore::TiledLayerChromium::needsIdlePaint):
2494         (WebCore::TiledLayerChromium::idlePaintRect):
2495         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2496         (WebCore::CCLayerTilingData::tileRect):
2497         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2498         (WebCore::CCLayerTilingData::numTiles):
2499         (WebCore::CCLayerTilingData::tileBounds):
2500         (WebCore::CCLayerTilingData::isEmpty):
2501         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2502         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2503         (WebCore::CCTiledLayerImpl::appendQuads):
2504         * platform/graphics/filters/FECustomFilter.cpp:
2505         (WebCore::FECustomFilter::platformApplySoftware):
2506         * platform/graphics/gpu/Texture.cpp:
2507         (WebCore::Texture::create):
2508         (WebCore::Texture::updateSubRect):
2509         * platform/graphics/gpu/TilingData.cpp:
2510         (WebCore::TilingData::tileBounds):
2511         (WebCore::TilingData::tileBoundsWithBorder):
2512         (WebCore::TilingData::tileBoundsNormalized):
2513         (WebCore::TilingData::intersectDrawQuad):
2514         (WebCore):
2515         * platform/graphics/gpu/TilingData.h:
2516         (WebCore::TilingData::numTiles):
2517         (WebCore::TilingData::tileIndex):
2518         (WebCore::TilingData::tileXIndex):
2519         (WebCore::TilingData::tileYIndex):
2520         (TilingData):
2521         (WebCore::TilingData::assertTile):
2522
2523 2012-03-27  Daniel Cheng  <dcheng@chromium.org>
2524
2525         [chromium] Merge ChromiumDataObject and DataTransferItemListChromium.
2526         https://bugs.webkit.org/show_bug.cgi?id=82407
2527
2528         Reviewed by Tony Chang.
2529
2530         Since ChromiumDataObject is just a very thin wrapper for DataTransferItemListChromium now,
2531         combine the two and remove a layer of indirection.
2532
2533         No functionality change, should be covered by existing tests.
2534
2535         * WebCore.gypi:
2536         * platform/chromium/ChromiumDataObject.cpp: Replacing DataTransferItemListChromium.
2537         (WebCore::ChromiumDataObject::createFromPasteboard):
2538         (WebCore::ChromiumDataObject::create):
2539         (WebCore::ChromiumDataObject::length):
2540         (WebCore):
2541         (WebCore::ChromiumDataObject::item):
2542         (WebCore::ChromiumDataObject::deleteItem):
2543         (WebCore::ChromiumDataObject::clearAll):
2544         (WebCore::ChromiumDataObject::add):
2545         (WebCore::ChromiumDataObject::clearData):
2546         (WebCore::ChromiumDataObject::clearAllExceptFiles):
2547         (WebCore::ChromiumDataObject::types):
2548         (WebCore::ChromiumDataObject::getData):
2549         (WebCore::ChromiumDataObject::setData):
2550         (WebCore::ChromiumDataObject::urlAndTitle):
2551         (WebCore::ChromiumDataObject::setURLAndTitle):
2552         (WebCore::ChromiumDataObject::htmlAndBaseURL):
2553         (WebCore::ChromiumDataObject::setHTMLAndBaseURL):
2554         (WebCore::ChromiumDataObject::containsFilenames):
2555         (WebCore::ChromiumDataObject::filenames):
2556         (WebCore::ChromiumDataObject::addFilename):
2557         (WebCore::ChromiumDataObject::addSharedBuffer):
2558         (WebCore::ChromiumDataObject::ChromiumDataObject):
2559         (WebCore::ChromiumDataObject::findStringItem):
2560         (WebCore::ChromiumDataObject::internalAddStringItem):
2561         (WebCore::ChromiumDataObject::internalAddFileItem):
2562         * platform/chromium/ChromiumDataObject.h:
2563         (WebCore):
2564         (ChromiumDataObject):
2565         * platform/chromium/ChromiumDataObjectItem.cpp: Renamed from Source/WebCore/platform/chromium/DataTransferItemChromium.cpp.
2566         (WebCore):
2567         (WebCore::ChromiumDataObjectItem::createFromString):
2568         (WebCore::ChromiumDataObjectItem::createFromFile):
2569         (WebCore::ChromiumDataObjectItem::createFromURL):
2570         (WebCore::ChromiumDataObjectItem::createFromHTML):
2571         (WebCore::ChromiumDataObjectItem::createFromSharedBuffer):
2572         (WebCore::ChromiumDataObjectItem::createFromPasteboard):
2573         (WebCore::ChromiumDataObjectItem::ChromiumDataObjectItem):
2574         (WebCore::ChromiumDataObjectItem::getAsString):
2575         (WebCore::ChromiumDataObjectItem::getAsFile):
2576         (WebCore::ChromiumDataObjectItem::internalGetAsString):
2577         (WebCore::ChromiumDataObjectItem::isFilename):
2578         * platform/chromium/ChromiumDataObjectItem.h: Renamed from Source/WebCore/platform/chromium/DataTransferItemChromium.h.
2579         (WebCore):
2580         (ChromiumDataObjectItem):
2581         (WebCore::ChromiumDataObjectItem::kind):
2582         (WebCore::ChromiumDataObjectItem::type):
2583         (WebCore::ChromiumDataObjectItem::sharedBuffer):
2584         (WebCore::ChromiumDataObjectItem::title):
2585         (WebCore::ChromiumDataObjectItem::baseURL):
2586         * platform/chromium/ClipboardChromium.cpp:
2587         (WebCore::ClipboardChromium::files):
2588         (WebCore::ClipboardChromium::hasData):
2589         (WebCore::ClipboardChromium::items):
2590         * platform/chromium/DataTransferItemListChromium.cpp: Removed.
2591         * platform/chromium/DataTransferItemListChromium.h: Removed.
2592
2593 2012-03-28  Nat Duca  <nduca@chromium.org>
2594
2595         [chromium] Scheduler should not tell FrameRateController to begin a frame when we dont swap
2596         https://bugs.webkit.org/show_bug.cgi?id=82516
2597
2598         Reviewed by James Robinson.
2599
2600         * platform/graphics/chromium/LayerRendererChromium.cpp:
2601         (WebCore::LayerRendererChromium::swapBuffers):
2602         * platform/graphics/chromium/LayerRendererChromium.h:
2603         (LayerRendererChromium):
2604         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2605         (WebCore::CCLayerTreeHostImpl::swapBuffers):
2606         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2607         (CCLayerTreeHostImpl):
2608         * platform/graphics/chromium/cc/CCScheduler.cpp:
2609         (WebCore::CCScheduler::processScheduledActions):
2610         * platform/graphics/chromium/cc/CCScheduler.h:
2611         (WebCore::CCScheduledActionDrawAndSwapResult::CCScheduledActionDrawAndSwapResult):
2612         (CCScheduledActionDrawAndSwapResult):
2613         (WebCore):
2614         (CCSchedulerClient):
2615         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2616         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2617         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
2618         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
2619         * platform/graphics/chromium/cc/CCThreadProxy.h:
2620         (CCThreadProxy):
2621
2622 2012-03-26  Eric Uhrhane  <ericu@chromium.org>
2623
2624         FileWriter has two race conditions
2625         https://bugs.webkit.org/show_bug.cgi?id=81861
2626
2627         Reviewed by David Levin.
2628
2629         Should make current tests less flaky.
2630
2631         * Modules/filesystem/FileWriter.h:
2632         * Modules/filesystem/FileWriter.cpp:
2633         Track the in-flight operation, whether it be an abort/write/truncate.
2634         Whether an abort comes back as didWrite, didTruncate, or didFail, handle
2635         it appropriately.  Before this fix, the Chromium implementation would
2636         assert in two cases:
2637
2638         If the user calls abort, then write, then abort before the backend
2639         catches up, we'd send both aborts to the backend, even though it hadn't
2640         received the write yet.  Chromium's backend asserts if there's an abort
2641         with no write in progress.  We now record that we've sent an abort and
2642         are waiting for the response.
2643
2644         If the user calls abort while a write/truncate is just finishing, on the
2645         Chromium worker implementation, the completion message could be
2646         thread-hopping back to WebCore at the
2647         WorkerAsyncFileWriterCallbacksBridge while the abort is thread-hopping
2648         in the other direction.  Again, this leads to an abort call to the
2649         backend with no write in progress, and an assert.  We're now robust to
2650         completions coming back when we're expecting an abort, and
2651         https://chromiumcodereview.appspot.com/9764018/ will make the backend
2652         robust to extra abort calls.
2653
2654 2012-03-27  Ryosuke Niwa  <rniwa@webkit.org>
2655
2656         Deleting a paragraph of text should not add elements for typing style
2657         https://bugs.webkit.org/show_bug.cgi?id=82401
2658
2659         Reviewed by Enrica Casucci.
2660
2661         This behavior was explicitly supported by DeleteSelectionCommand but it doesn't match TextEdit or Firefox.
2662         We're changing our behavior to match TextEdit and Firefox in this patch.
2663
2664         The behavior is tested by an existing test, which was renamed to deleting-text-rests-typing-style.html in this patch.
2665
2666         Test: editing/execCommand/deleting-text-rests-typing-style.html
2667
2668         * editing/DeleteSelectionCommand.cpp:
2669         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2670
2671 2012-03-28  Michal Mocny  <mmocny@google.com>
2672
2673         [chromium] Add tracing events around CCLayerTreeHostImpl visibility.
2674         https://bugs.webkit.org/show_bug.cgi?id=82501
2675
2676         Reviewed by James Robinson.
2677
2678         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2679         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2680         (WebCore::CCLayerTreeHostImpl::setVisible):
2681
2682 2012-03-28  Florin Malita  <fmalita@google.com>
2683
2684         Incorrect foreignObject hit test results when overlapping other SVG elements
2685         https://bugs.webkit.org/show_bug.cgi?id=82059
2686
2687         Reviewed by Nikolas Zimmermann.
2688
2689         Test: svg/hittest/foreign-object-background.svg
2690
2691         Foreign content needs to be hit-tested atomically due to the (pseudo)
2692         stacking context established by FOs.
2693
2694         * rendering/svg/RenderSVGForeignObject.cpp:
2695         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2696         Hit test all phases on FO HitTestForeground.
2697
2698 2012-03-26  Shawn Singh  <shawnsingh@chromium.org>
2699
2700         [chromium] layer->clipRect() is not initialized for layers that create a renderSurface.
2701         https://bugs.webkit.org/show_bug.cgi?id=74147
2702
2703         Reviewed by Adrienne Walker.
2704
2705         Added 3 additional unit tests; Modified existing unit tests and layout tests.
2706
2707         The layer's clipRect and usesLayerClipping information was not
2708         being initialized for layers that created a renderSurface. (It
2709         was, however, being initialized for the renderSurface itself.)
2710         This patch adds a unit test that reproduces that this is an error,
2711         other unit tests to tightly test the value of clipRect being
2712         initialized, and adds the logic to properly initialize the
2713         clipRect.
2714
2715         Before this patch, this bug was causing flashing on tab-switch on
2716         the apple iphone page. Even worse, with partial swap enabled, the
2717         layers would simply disappear, because the first frame the
2718         clipRect is uninitialized and the layer is not drawn, and the
2719         second frame onwards, the damage tracker correctly things nothing
2720         is damaged, so it doesn't draw that layer again until other damage
2721         causes it to be redrawn.
2722
2723         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2724         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2725
2726 2012-03-28  Anders Carlsson  <andersca@apple.com>
2727
2728         "Sticky" or slow scrolling on some sites
2729         https://bugs.webkit.org/show_bug.cgi?id=82512
2730         <rdar://problem/11000372>
2731
2732         Reviewed by Andreas Kling.
2733
2734         When we're in the slow mode and have to update the scroll layer position on the main thread,
2735         get it from the scrolling thread so we'll be in sync with the scrolling tree when the main thread is busy.
2736
2737         * page/scrolling/ScrollingCoordinator.cpp:
2738         (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
2739         * page/scrolling/ScrollingCoordinator.h:
2740         (ScrollingCoordinator):
2741         * page/scrolling/ScrollingTree.cpp:
2742         (WebCore::ScrollingTree::mainFrameScrollPosition):
2743         (WebCore):
2744         (WebCore::ScrollingTree::updateMainFrameScrollPositionAndScrollLayerPosition):
2745         * page/scrolling/ScrollingTree.h:
2746
2747 2012-03-28  Adrienne Walker  <enne@google.com>
2748
2749         [chromium] Fix tiled layer assert for huge layers
2750         https://bugs.webkit.org/show_bug.cgi?id=82486
2751
2752         Reviewed by James Robinson.
2753
2754         Test: TiledLayerChromiumTest.hugeLayerUpdateCrash
2755
2756         TilingData::numTiles() is calculated as the product of two ints and so
2757         can potentially overflow, causing numTiles() to be incorrect. To avoid
2758         calling code accidentally falling into this trap, remove this function
2759         and all code that uses tile index from TilingData.  This requires
2760         fixing up a bunch of callers of TilingData and CCLayerTilingData.
2761
2762         Additionally, TilingData::numTiles() has long been a confusing
2763         function name in some contexts, so rename to bool hasEmptyBounds().
2764
2765         Also, remove TilingData::intersectDrawQuad because there are no
2766         clients of that function.
2767
2768         * platform/graphics/chromium/TiledLayerChromium.cpp:
2769         (WebCore::TiledLayerChromium::drawsContent):
2770         (WebCore::TiledLayerChromium::reserveTextures):
2771         (WebCore::TiledLayerChromium::prepareToUpdate):
2772         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2773         (WebCore::TiledLayerChromium::needsIdlePaint):
2774         (WebCore::TiledLayerChromium::idlePaintRect):
2775         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2776         (WebCore::CCLayerTilingData::tileRect):
2777         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2778         (WebCore::CCLayerTilingData::hasEmptyBounds):
2779         (WebCore::CCLayerTilingData::tileBounds):
2780         (WebCore::CCLayerTilingData::isEmpty):
2781         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2782         (WebCore::CCTiledLayerImpl::bindContentsTexture):
2783         (WebCore::CCTiledLayerImpl::appendQuads):
2784         * platform/graphics/gpu/Texture.cpp:
2785         (WebCore::Texture::create):
2786         (WebCore::Texture::updateSubRect):
2787         * platform/graphics/gpu/TilingData.cpp:
2788         (WebCore::TilingData::tileBounds):
2789         (WebCore::TilingData::tileBoundsWithBorder):
2790         (WebCore::TilingData::tileBoundsNormalized):
2791         * platform/graphics/gpu/TilingData.h:
2792         (WebCore::TilingData::hasEmptyBounds):
2793         (TilingData):
2794         (WebCore::TilingData::assertTile):
2795
2796 2012-03-28  Peter Rybin  <peter.rybin@gmail.com>
2797
2798         Web Inspector: CodeGeneratorInspector.py: switch Runtime, Network and DOM domains to typed API
2799         https://bugs.webkit.org/show_bug.cgi?id=81558
2800
2801         Reviewed by Pavel Feldman.
2802
2803         Client code is switched to typed API (all InspectorObject and InspectorArray types are
2804         replaced with generated types from TypeBuilder according to Inspector.json).
2805
2806         Missing array of int specialization is added. Code generator now has a check against
2807         misspelled (non-existing) domain names.
2808
2809         * inspector/CodeGeneratorInspector.py:
2810         (Generator.go): check against misspelled domain names added.
2811         * inspector/InjectedScript.cpp:
2812         (WebCore::InjectedScript::evaluate):
2813         (WebCore::InjectedScript::callFunctionOn):
2814         (WebCore::InjectedScript::evaluateOnCallFrame):
2815         (WebCore::InjectedScript::getProperties):
2816         (WebCore::InjectedScript::wrapObject):
2817         (WebCore::InjectedScript::wrapNode):
2818         (WebCore::InjectedScript::wrapSerializedObject):
2819         (WebCore::InjectedScript::makeEvalCall):
2820         * inspector/InjectedScript.h:
2821         (InjectedScript):
2822         * inspector/InspectorDOMAgent.cpp:
2823         (WebCore::InspectorDOMAgent::getDocument):
2824         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
2825         (WebCore::InspectorDOMAgent::querySelectorAll):
2826         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2827         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2828         (WebCore::InspectorDOMAgent::getSearchResults):
2829         (WebCore::InspectorDOMAgent::resolveNode):
2830         (WebCore::InspectorDOMAgent::getAttributes):
2831         (WebCore::InspectorDOMAgent::buildObjectForNode):
2832         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2833         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2834         (WebCore::InspectorDOMAgent::loadEventFired):
2835         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2836         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
2837         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
2838         * inspector/InspectorDOMAgent.h:
2839         (InspectorDOMAgent):
2840         * inspector/InspectorPageAgent.cpp:
2841         (WebCore::InspectorPageAgent::resourceTypeJson):
2842         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
2843         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2844         * inspector/InspectorPageAgent.h:
2845         * inspector/InspectorResourceAgent.cpp:
2846         (WebCore::buildObjectForResourceRequest):
2847         (WebCore::buildObjectForResourceResponse):
2848         (WebCore::buildObjectForCachedResource):
2849         (WebCore::InspectorResourceAgent::willSendRequest):
2850         (WebCore::InspectorResourceAgent::didReceiveResponse):
2851         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2852         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2853         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
2854         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2855         * inspector/InspectorResourceAgent.h:
2856         (InspectorResourceAgent):
2857         * inspector/InspectorRuntimeAgent.cpp:
2858         (WebCore::InspectorRuntimeAgent::evaluate):
2859         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2860         (WebCore::InspectorRuntimeAgent::getProperties):
2861         * inspector/InspectorRuntimeAgent.h:
2862         (InspectorRuntimeAgent):
2863         * inspector/InspectorValues.h:
2864         (InspectorArray):
2865         (WebCore::InspectorArray::pushInt):
2866         (WebCore):
2867         * inspector/ScriptCallFrame.cpp:
2868         (WebCore::ScriptCallFrame::buildInspectorObject):
2869         * inspector/ScriptCallFrame.h:
2870         (ScriptCallFrame):
2871         * inspector/ScriptCallStack.cpp:
2872         (WebCore::ScriptCallStack::buildInspectorArray):
2873         * inspector/ScriptCallStack.h:
2874         (ScriptCallStack):
2875
2876 2012-03-28  Eric Seidel  <eric@webkit.org>
2877
2878         setNeedsLayout(true, false) is super confusing to read and should use an enum instead
2879         https://bugs.webkit.org/show_bug.cgi?id=82369
2880
2881         Reviewed by Julien Chaffraix.
2882
2883         I replaced all uses of the markParents bool with a MarkingBehavior
2884         enum (which has two values: MarkContainingBlockChain and MarkOnlyThis).
2885         I'm not sure the naming is perfect (as it's not clear to me if markParents is
2886         used to mean the same thing in these 3 functions), but hopefully this code is more
2887         clear.  I welcome further suggested adjustment from layout experts.
2888
2889         * page/FrameView.cpp:
2890         (WebCore::FrameView::scheduleRelayout):
2891         * rendering/RenderBlock.cpp:
2892         (WebCore::RenderBlock::layoutBlock):
2893         (WebCore::RenderBlock::adjustPositionedBlock):
2894         (WebCore::RenderBlock::layoutBlockChildren):
2895         (WebCore::RenderBlock::layoutBlockChild):
2896         (WebCore::RenderBlock::layoutPositionedObjects):
2897         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2898         (WebCore::RenderBlock::removePositionedObjects):
2899         (WebCore::RenderBlock::insertFloatingObject):
2900         (WebCore::RenderBlock::positionNewFloats):
2901         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
2902         (WebCore::RenderBlock::adjustBlockChildForPagination):
2903         * rendering/RenderBlockLineLayout.cpp:
2904         (WebCore::RenderBlock::layoutRunsAndFloats):
2905         (WebCore::RenderBlock::layoutInlineChildren):
2906         (WebCore::RenderBlock::positionNewFloatOnLine):
2907         * rendering/RenderBox.cpp:
2908         (WebCore::RenderBox::positionLineBox):
2909         * rendering/RenderDeprecatedFlexibleBox.cpp:
2910         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2911         (WebCore::gatherFlexChildrenInfo):
2912         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2913         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2914         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2915         * rendering/RenderFlexibleBox.cpp:
2916         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
2917         * rendering/RenderLayer.cpp:
2918         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2919         * rendering/RenderMedia.cpp:
2920         (WebCore::RenderMedia::layout):
2921         * rendering/RenderObject.cpp:
2922         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
2923         * rendering/RenderObject.h:
2924         (RenderObject):
2925         (WebCore::RenderObject::setNeedsLayout):
2926         (WebCore::RenderObject::setChildNeedsLayout):
2927         * rendering/RenderRubyRun.cpp:
2928         (WebCore::RenderRubyRun::layoutSpecialExcludedChild):
2929         * rendering/RenderTable.cpp:
2930         (WebCore::RenderTable::layout):
2931         * rendering/RenderTableRow.cpp:
2932         (WebCore::RenderTableRow::layout):
2933         * rendering/RenderTableSection.cpp:
2934         (WebCore::RenderTableSection::calcRowLogicalHeight):
2935         (WebCore::RenderTableSection::layoutRows):
2936         * rendering/RenderTextControl.cpp:
2937         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
2938         * rendering/RenderTextControlSingleLine.cpp:
2939         (WebCore::RenderTextControlSingleLine::layout):
2940         * rendering/RenderView.cpp:
2941         (WebCore::RenderView::RenderView):
2942         (WebCore::RenderView::layout):
2943         * rendering/mathml/RenderMathMLRoot.cpp:
2944         (WebCore::RenderMathMLRoot::layout):
2945         * rendering/mathml/RenderMathMLRow.cpp:
2946         (WebCore::RenderMathMLRow::layout):
2947         * rendering/mathml/RenderMathMLSubSup.cpp:
2948         (WebCore::RenderMathMLSubSup::layout):
2949         * rendering/svg/SVGRenderSupport.cpp:
2950         (WebCore::SVGRenderSupport::layoutChildren):
2951
2952 2012-03-28  Joseph Pecoraro  <pecoraro@apple.com>
2953
2954         <http://webkit.org/b/82419> Web Inspector: Create -[DOMNode inspect] from IDL
2955
2956         Instead of manually creating the method in DOM.mm we can specify it in
2957         Node.idl and autogenerate part of the interface.
2958
2959         Reviewed by Timothy Hatcher.
2960
2961         * bindings/objc/DOM.mm:
2962         * bindings/objc/DOMPrivate.h:
2963         Move the call to InspectorController::inspect from here ...
2964
2965         * dom/Node.h:
2966         * dom/Node.idl: IDL only in an ObjC block.
2967         * dom/Node.cpp:
2968         (WebCore::Node::inspect):
2969         ... to here.
2970
2971         * WebCore.xcodeproj/project.pbxproj:
2972         Add the new generated file so we can Copy it in the build phase.
2973
2974 2012-03-28  Tommy Widenflycht  <tommyw@google.com>
2975
2976         [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
2977         https://bugs.webkit.org/show_bug.cgi?id=82450
2978
2979         Reviewed by Adam Barth.
2980
2981         This change removes the default PeerConnection00Handler.cpp from the Chromium build.
2982
2983         A major overhaul of the existing layout tests is forthcoming.
2984
2985         * WebCore.gypi:
2986         * platform/mediastream/PeerConnection00Handler.h:
2987         (WebCore):
2988         (PeerConnection00Handler):
2989
2990 2012-03-28  Robert Hogan  <robert@webkit.org>
2991
2992         [REGRESSION] Web Inspector: column caption delimiters are misaligned in DataGrid
2993         https://bugs.webkit.org/show_bug.cgi?id=82193
2994
2995         Reviewed by Yury Semikhatsky.
2996
2997         Since r111742 column width in fixed layout tables is set to the width of the cell plus its left padding plus its right padding 
2998         plus half its left border plus half its right border in the collapsing border model. The layout of the panel
2999         headers in the inspector depended on pre-r111742 behaviour, so ended up misaligned with the content below. To cater for the 
3000         new method of calculating column width enforce a fixed width for the corner column by removing padding and borders (except collapsed
3001         borders from adjacent cells) and specify the expected width (15px) minus the expected width of the collapsed borders (1px).
3002
3003         * inspector/front-end/dataGrid.css:
3004         (.data-grid th.corner):
3005
3006 2012-03-28  Alexis Menard  <alexis.menard@openbossa.org>
3007
3008         Increase code sharing between CSSProperty and CSSPropertyLonghand.
3009         https://bugs.webkit.org/show_bug.cgi?id=82479
3010
3011         Reviewed by Antti Koivisto.
3012
3013         Use longhands declarations from CSSPropertyLonghand in CSSProperty to avoid
3014         code duplication.
3015
3016         No new tests : refactoring only, we shouldn't have any behavior difference.
3017
3018         * css/CSSProperty.cpp:
3019         (WebCore::resolveToPhysicalProperty):
3020         (WebCore::borderDirections):
3021         (WebCore):
3022         (WebCore::CSSProperty::resolveDirectionAwareProperty):
3023
3024 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3025
3026         Web Inspector: Implement snippets renaming in scripts navigator.
3027         https://bugs.webkit.org/show_bug.cgi?id=82477
3028
3029         Reviewed by Pavel Feldman.
3030
3031         Snippets renaming is implemented as editing of snippet name in scripts navigator.
3032
3033         * inspector/front-end/ScriptsNavigator.js:
3034         (WebInspector.ScriptsNavigator.prototype._handleRenameSnippet):
3035         (WebInspector.ScriptsNavigator.prototype._fileRenamed):
3036         (WebInspector.ScriptsNavigator.prototype.rename.commitHandler):
3037         (WebInspector.ScriptsNavigator.prototype.rename.cancelHandler):
3038         (WebInspector.ScriptsNavigator.prototype.rename.afterEditing):
3039         (WebInspector.BaseNavigatorTreeElement.prototype.set titleText):
3040         * inspector/front-end/scriptsPanel.css:
3041         (#scripts-navigator-tabbed-pane .navigator .base-navigator-tree-element-title.editing):
3042
3043 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3044
3045         Web Inspector: Add context menu for snippets control.
3046         https://bugs.webkit.org/show_bug.cgi?id=82475
3047
3048         Reviewed by Pavel Feldman.
3049
3050         This is a preliminary implementation of snippets control using context menu.
3051         We might want to add a more discoverable one before taking snippets out of experiments.
3052
3053         * English.lproj/localizedStrings.js:
3054         * inspector/front-end/ScriptsNavigator.js:
3055         (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged):
3056         (WebInspector.ScriptsNavigator.prototype._createSnippetsTree):
3057         (WebInspector.ScriptsNavigator.prototype._handleSnippetContextMenuEvent):
3058         (WebInspector.ScriptsNavigator.prototype._showSnippetContextMenu):
3059         (WebInspector.ScriptsNavigator.prototype._handleEvaluateSnippet):
3060         (WebInspector.ScriptsNavigator.prototype._handleRenameSnippet):
3061         (WebInspector.ScriptsNavigator.prototype._handleRemoveSnippet):
3062         (WebInspector.ScriptsNavigator.prototype._handleCreateSnippet):
3063         (WebInspector.NavigatorScriptTreeElement.prototype.get navigator):
3064         (WebInspector.NavigatorScriptTreeElement.prototype.onattach):
3065         (WebInspector.NavigatorScriptTreeElement.prototype.onenter):
3066         (WebInspector.NavigatorScriptTreeElement.prototype._handleContextMenuEvent):
3067
3068 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3069
3070         Web Inspector: ScriptsNavigator should save scroll position when switching tabs.
3071         https://bugs.webkit.org/show_bug.cgi?id=82472
3072
3073         Reviewed by Pavel Feldman.
3074
3075         WebInspector.View provides save/restore scroll position capabilities.
3076         This patch makes them used in ScriptsNavigator.
3077
3078         * inspector/front-end/ScriptsNavigator.js:
3079         (WebInspector.ScriptsNavigator):
3080         (WebInspector.ScriptsNavigator.prototype._createSnippetsTree):
3081         * inspector/front-end/scriptsPanel.css:
3082         (#scripts-navigator-tabbed-pane .tabbed-pane-content):
3083         (#scripts-navigator-tabbed-pane .navigator-container):
3084
3085 2012-03-28  Andrey Kosyakov  <caseq@chromium.org>
3086
3087         Web Inspector: only update Timeline overview when really needed
3088         https://bugs.webkit.org/show_bug.cgi?id=81909
3089
3090         Reviewed by Pavel Feldman.
3091
3092         Switch timeline overview to using raw records, thus removing dependency on instance members of
3093         TimelinePresentationModel. This requires moving record styles/categories to static getters.
3094
3095         * inspector/front-end/TimelineModel.js:
3096         (WebInspector.TimelineModel):
3097         (WebInspector.TimelineModel.startTime):
3098         (WebInspector.TimelineModel.endTime):
3099         (WebInspector.TimelineModel.duration):
3100         (WebInspector.TimelineModel.prototype._addRecord):
3101         (WebInspector.TimelineModel.prototype.reset):
3102         (WebInspector.TimelineModel.prototype.minimumRecordTime):
3103         (WebInspector.TimelineModel.prototype.maximumRecordTime):
3104         (WebInspector.TimelineModel.prototype._updateBoundaries):
3105         * inspector/front-end/TimelineOverviewPane.js:
3106         (WebInspector.TimelineOverviewPane):
3107         (WebInspector.TimelineOverviewPane.prototype._showTimelines):
3108         (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
3109         (WebInspector.TimelineOverviewPane.prototype._setVerticalOverview):
3110         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
3111         (WebInspector.TimelineOverviewPane.prototype._update):
3112         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips.markPercentagesForRecord):
3113         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
3114         (WebInspector.TimelineOverviewPane.prototype.windowStartTime):
3115         (WebInspector.TimelineOverviewPane.prototype.windowEndTime):
3116         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
3117         (WebInspector.TimelineOverviewPane.prototype.setShowShortEvents):
3118         (WebInspector.TimelineOverviewPane.prototype._scheduleRefresh):
3119         (WebInspector.TimelineOverviewCalculator.prototype.computeBarGraphPercentages):
3120         (WebInspector.TimelineOverviewCalculator.prototype.setWindow):
3121         (WebInspector.TimelineOverviewCalculator.prototype.reset):
3122         (WebInspector.HeapGraph):
3123         (WebInspector.HeapGraph.prototype.update):
3124         (WebInspector.TimelineVerticalOverview):
3125         (WebInspector.TimelineVerticalOverview.prototype.reset):
3126         (WebInspector.TimelineVerticalOverview.prototype.update):
3127         (WebInspector.TimelineVerticalOverview.prototype.wasShown):
3128         (WebInspector.TimelineVerticalOverview.prototype.willHide):
3129         (WebInspector.TimelineVerticalOverview.prototype._aggregateFrameStatistics):
3130         (WebInspector.TimelineVerticalOverview.prototype._aggregateRecords):
3131         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
3132         (WebInspector.TimelineVerticalOverview.prototype._onRecordAdded):
3133         (WebInspector.TimelineAggregatedRecord):
3134         (WebInspector.TimelineAggregatedRecord.prototype._aggregateStatistics):
3135         * inspector/front-end/TimelinePanel.js:
3136         (WebInspector.TimelinePanel):
3137         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
3138         (WebInspector.TimelinePanel.prototype._toggleFilterButtonClicked):
3139         (WebInspector.TimelinePanel.prototype._resetPanel):
3140         (WebInspector.TimelinePanel.prototype._refresh):
3141         (WebInspector.TimelineCalculator):
3142         (WebInspector.TimelineCalculator.prototype.formatTime):
3143         * inspector/front-end/TimelinePresentationModel.js:
3144         (WebInspector.TimelinePresentationModel):
3145         (WebInspector.TimelinePresentationModel.categories):
3146         (WebInspector.TimelinePresentationModel.recordStyle):
3147         (WebInspector.TimelinePresentationModel.categoryForRecord):
3148         (WebInspector.TimelinePresentationModel.prototype.reset):
3149         (WebInspector.TimelinePresentationModel.prototype.addRecord):
3150         (WebInspector.TimelinePresentationModel.Record):
3151         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
3152
3153 2012-03-28  Arvid Nilsson  <anilsson@rim.com>
3154
3155         [BlackBerry] Plumb through GraphicsLayer::contentsOpaque() to LayerTiler
3156         https://bugs.webkit.org/show_bug.cgi?id=82457
3157
3158         Reviewed by Rob Buis.
3159
3160         The LayerTiler already knows not to turn on GL_BLEND for opaque layers.
3161         However, it only ever sets the opaque flag for image layers and color
3162         layers, never for content layers.
3163
3164         This was no big deal, because contentsOpaque() is currently false for
3165         all layers except the root layer, which we always drew using the
3166         BlackBerry::WebKit::BackingStore anyway.
3167
3168         When we start using RenderLayerBacking::m_usingTiledCacheLayer=true on
3169         the root layer in situations where the BackingStore is unavailable, we
3170         can speed up rendering of the root layer by honouring the opaque flag.
3171
3172         Fixed by plumbing through the GraphicsLayer::contentsOpaque() flag all
3173         the way to LayerTiler and on to Texture.
3174
3175         * platform/graphics/blackberry/LayerData.h:
3176         (WebCore::LayerData::LayerData):
3177         (WebCore::LayerData::isOpaque):
3178         (LayerData):
3179         * platform/graphics/blackberry/LayerTile.cpp:
3180         (WebCore::LayerTile::updateContents):
3181         * platform/graphics/blackberry/LayerTile.h:
3182         (LayerTile):
3183         * platform/graphics/blackberry/LayerTiler.cpp:
3184         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
3185         (WebCore::LayerTiler::performTileJob):
3186         * platform/graphics/blackberry/LayerTiler.h:
3187         (WebCore::LayerTiler::TextureJob::TextureJob):
3188         (WebCore::LayerTiler::TextureJob::updateContents):
3189         * platform/graphics/blackberry/LayerWebKitThread.h:
3190         (WebCore::LayerWebKitThread::setOpaque):
3191         * platform/graphics/blackberry/Texture.h:
3192         (Texture):
3193         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
3194         (WebCore::TextureCacheCompositingThread::updateContents):
3195         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
3196         (TextureCacheCompositingThread):
3197
3198 2012-03-28  Andrey Kosyakov  <caseq@chromium.org>
3199
3200         Web Inspector: nuke HeapGraph.setSize(), do it automagically on update
3201         https://bugs.webkit.org/show_bug.cgi?id=82471
3202
3203         Reviewed by Yury Semikhatsky.
3204
3205         * inspector/front-end/TimelineOverviewPane.js:
3206         (WebInspector.TimelineOverviewPane.prototype.update):
3207         (WebInspector.HeapGraph.prototype.update):
3208
3209 2012-03-28  Pavel Podivilov  <podivilov@chromium.org>
3210
3211         Web Inspector: dispatch console-message-added and console-messages-cleared events on UISourceCode.
3212         https://bugs.webkit.org/show_bug.cgi?id=82463
3213
3214         Reviewed by Vsevolod Vlasov.
3215
3216         Those events are related to specific UISourceCode. See bug 82224 for more details.
3217
3218         * inspector/front-end/DebuggerPresentationModel.js:
3219         (WebInspector.DebuggerPresentationModel):
3220         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript):
3221         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
3222         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
3223         (WebInspector.UISourceCodeImpl):
3224         (WebInspector.UISourceCodeImpl.prototype.consoleMessages):
3225         (WebInspector.UISourceCodeImpl.prototype.consoleMessageAdded):
3226         (WebInspector.UISourceCodeImpl.prototype.consoleMessagesCleared):
3227         * inspector/front-end/JavaScriptSourceFrame.js:
3228         (WebInspector.JavaScriptSourceFrame):
3229         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
3230         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
3231         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessagesCleared):
3232         (WebInspector.JavaScriptSourceFrame.prototype._onTextViewerContentLoaded):
3233         * inspector/front-end/ScriptsPanel.js:
3234         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3235         * inspector/front-end/UISourceCode.js:
3236         (WebInspector.UISourceCode.prototype.breakpoints):
3237         (WebInspector.UISourceCode.prototype.consoleMessages):
3238
3239 2012-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3240
3241         [GTK] Implement PlatformStrategies
3242         https://bugs.webkit.org/show_bug.cgi?id=82454
3243
3244         Reviewed by Xan Lopez.
3245
3246         * GNUmakefile.list.am: Remove PluginDataGtk.cpp. The same
3247         functionality is now implemented using platform strategies.
3248         * plugins/gtk/PluginDataGtk.cpp: Removed.
3249
3250 2012-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3251
3252         Web Inspector: [Regression] TabIndex is not correctly restored after editing.
3253         https://bugs.webkit.org/show_bug.cgi?id=82464
3254
3255         Reviewed by Pavel Feldman.
3256
3257         This fixes incorrect usage of isNaN that returns false for null value.
3258         Drive-by javascript compilation fix.
3259
3260         * inspector/front-end/CompilerScriptMapping.js:
3261         (WebInspector.CompilerScriptMapping.prototype.addScript): compilation fix.
3262         * inspector/front-end/ResourceScriptMapping.js:
3263         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): compilation fix.
3264         * inspector/front-end/SnippetsModel.js:
3265         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): compilation fix.
3266         * inspector/front-end/UIUtils.js:
3267         (WebInspector.startEditing.cleanUpAfterEditing): incorrect usage of isNaN fix.
3268
3269 2012-03-28  Yi Shen  <yi.4.shen@nokia.com>
3270
3271         An extra line break is inserted when pasting into a font element.
3272         https://bugs.webkit.org/show_bug.cgi?id=71207
3273
3274         Reviewed by Ryosuke Niwa.
3275
3276         Fix an editing bug where inserting text into a font element would
3277         create an extra div element in the dom tree. The
3278         WebCore::positionAvoidingPrecedingNodes() tries to set the correct
3279         destination position by checking the next visible position, however,
3280         it causes the position moves into the child element in somecase.
3281         Instead, we should only check the position in parent after node.
3282
3283         Test: editing/inserting/insert-text-into-font.html
3284
3285         * editing/ReplaceSelectionCommand.cpp:
3286         (WebCore::positionAvoidingPrecedingNodes):
3287
3288 2012-03-28  Sergio Villar Senin  <svillar@igalia.com>
3289
3290         [Soup] DNS prefetching spams resolver, shoots self in the foot
3291         https://bugs.webkit.org/show_bug.cgi?id=41630
3292
3293         Reviewed by Martin Robinson.
3294
3295         Added generic DNSResolveQueue class to throttle DNS
3296         prefetches. It's an abstract refactoring of CFNET's
3297         DNSResolveQueue. Platform specific methods implemented for soup
3298         and CFNET backends.
3299
3300         No new tests required as we're just refactoring existing code to
3301         be used by two different ports.
3302
3303         * CMakeLists.txt: added new file.
3304         * GNUmakefile.list.am: ditto.
3305         * WebCore.vcproj/WebCore.vcproj: ditto.
3306         * WebCore.xcodeproj/project.pbxproj: ditto.
3307         * platform/network/DNSResolveQueue.cpp: Added.
3308         (WebCore):
3309         (WebCore::DNSResolveQueue::add): adds a new host to be prefetched.
3310         (WebCore::DNSResolveQueue::fired): by using a delay we coalesce
3311         several prefetch requests and try to resolve them all here.
3312         * platform/network/DNSResolveQueue.h: Added.
3313         (WebCore):
3314         (DNSResolveQueue): class that implements DNS prefetch
3315         throttling using a template pattern.
3316         (WebCore::DNSResolveQueue::shared):
3317         (WebCore::DNSResolveQueue::decrementRequestCount):
3318         * platform/network/cf/DNSCFNet.cpp:
3319         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3320         (WebCore::DNSResolveQueue::platformResolve):
3321         * platform/network/soup/DNSSoup.cpp:
3322         (WebCore):
3323         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3324         (WebCore::resolvedCallback):
3325         (WebCore::DNSResolveQueue::platformResolve):
3326         (WebCore::prefetchDNS):
3327
3328 2012-03-28  Eugene Girard  <girard@chromium.org>
3329
3330         window.scrollBy() scrolls incorrectly when zoomed in/out
3331         https://bugs.webkit.org/show_bug.cgi?id=45228
3332
3333         Reviewed by Simon Fraser.
3334
3335         scrollBy now uses layout (not CSS) units. (As scrollTo does.)
3336
3337         Test: fast/dom/zoom-scroll-page-test.html
3338
3339         * page/DOMWindow.cpp:
3340         (WebCore::DOMWindow::scrollBy):
3341
3342 2012-03-28  Stephen Chenney  <schenney@chromium.org>
3343
3344         Null dereference in SVGTextElement::animatedLocalTransform()
3345         https://bugs.webkit.org/show_bug.cgi?id=82375
3346
3347         Reviewed by Nikolas Zimmermann.
3348
3349         A poorly structured SVG file with a text element inside an
3350         animatedTransform element leaves the text element placed outside of
3351         the SVG root and it has no renderer(). Later attempts to use the
3352         renderer in animatedLocalTransform fail.
3353
3354         Test: svg/custom/get-text-element-transform-crash.html
3355
3356         * svg/SVGTextElement.cpp:
3357         (WebCore::SVGTextElement::animatedLocalTransform): Added a check for null renderer, and do not check
3358         for style transform if there is no renderer.
3359
3360 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
3361
3362         Enable animVal support for SVGAnimatedPreserveAspectRatio
3363         https://bugs.webkit.org/show_bug.cgi?id=82326
3364
3365         Reviewed by Zoltan Herczeg.
3366
3367         Enable animVal support for SVGAnimatedPreserveAspectRatio. Very simple now that everything is prepared.
3368         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedPreserveAspectRatioAnimator.
3369
3370         Modernize SVGPreserveAspectRatio, align parsing this object from String, with the other SVG DOM primitives,
3371         who supply a "void parse(const String&)" method, for this task.
3372
3373         Extended existing tests to cover this.
3374
3375         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3376         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
3377         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
3378         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation):
3379         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
3380         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValWillChange):
3381         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValDidChange):
3382         * svg/SVGAnimatedPreserveAspectRatio.h:
3383         (SVGAnimatedPreserveAspectRatioAnimator):
3384         * svg/SVGAnimatedType.cpp:
3385         (WebCore::SVGAnimatedType::valueAsString):
3386         (WebCore::SVGAnimatedType::setValueAsString):
3387         (WebCore::SVGAnimatedType::supportsAnimVal):
3388         * svg/SVGFEImageElement.cpp:
3389         (WebCore::SVGFEImageElement::parseAttribute):
3390         * svg/SVGFitToViewBox.cpp:
3391         (WebCore::SVGFitToViewBox::parseAttribute):
3392         * svg/SVGImageElement.cpp:
3393         (WebCore::SVGImageElement::parseAttribute):
3394         * svg/SVGPreserveAspectRatio.cpp:
3395         (WebCore::SVGPreserveAspectRatio::parse):
3396         (WebCore):
3397         * svg/SVGPreserveAspectRatio.h:
3398         (SVGPreserveAspectRatio):
3399         * svg/SVGViewSpec.cpp:
3400         (WebCore::SVGViewSpec::setPreserveAspectRatioString):
3401         (WebCore::SVGViewSpec::parseViewSpec):
3402
3403 2012-03-28  Pavel Feldman  <pfeldman@chromium.org>
3404
3405         Web Inspector: [v8] inspection of CanvasPixelArray is slow.
3406         https://bugs.webkit.org/show_bug.cgi?id=82455
3407
3408         Reviewed by Vsevolod Vlasov.
3409
3410         Added CanvasPixelArray to the list of classes that we consider
3411         arrays.
3412
3413         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3414         (WebCore::V8InjectedScriptHost::typeCallback):
3415
3416 2012-03-28  Leandro Gracia Gil  <leandrogracia@chromium.org>
3417
3418         Selectively retrieve text content around a given position.
3419         https://bugs.webkit.org/show_bug.cgi?id=78361
3420
3421         Reviewed by Ryosuke Niwa.
3422
3423         Tests: a new layout test will be introduced once the required WebKit API code is ready.
3424
3425         Introduce the DOMTextContentWalker class to selectively retrieve content
3426         around a given VisiblePosition into a string in such a way that a text
3427         Range can be extracted later from a pair of the string's positions.
3428
3429         A new boolean called m_shouldStop is also introduced in the TextIterator to force
3430         it advancing under certain conditions. Although this is usually done by setting
3431         m_positionNode to zero, it can't be applied in this case since by doing so the
3432         iterator's range is lost.
3433
3434         * WebCore.gypi:
3435         * editing/SurroundingText.cpp: Added.
3436         (WebCore):
3437         (WebCore::SurroundingText::SurroundingText):
3438         (WebCore::SurroundingText::rangeFromContentOffsets):
3439         (WebCore::SurroundingText::content):
3440         (WebCore::SurroundingText::positionOffsetInContent):
3441         * editing/SurroundingText.h: Added.
3442         (WebCore):
3443         (SurroundingText):
3444         * editing/TextIterator.cpp:
3445         (WebCore::TextIterator::TextIterator):
3446         (WebCore::TextIterator::advance):
3447         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
3448         (WebCore::SimplifiedBackwardsTextIterator::advance):
3449         * editing/TextIterator.h:
3450         (WebCore::TextIterator::atEnd):
3451         (TextIterator):
3452         (WebCore::SimplifiedBackwardsTextIterator::atEnd):
3453         (SimplifiedBackwardsTextIterator):
3454         * html/HTMLFormControlElement.cpp:
3455         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
3456         (WebCore):
3457         * html/HTMLFormControlElement.h:
3458         (HTMLFormControlElement):
3459
3460 2012-03-28  Alexis Menard  <alexis.menard@openbossa.org>
3461
3462         Speed up updates of existing CSS properties from JS.
3463         https://bugs.webkit.org/show_bug.cgi?id=82235
3464
3465         Reviewed by Andreas Kling.
3466
3467         Improve the way we handle updating an existing CSS property by replacing its value
3468         by the new one rather than removing the old value and then adding the new one. This
3469         speed up by 35% PerformanceTests/CSS/CSSPropertyUpdateValue.html.
3470
3471         No new tests : Updating existing tests that were relying on the order of the properties
3472         after modification. Each updated property is not appended to the list of properties of the
3473         style therefore the cssText value is slightly different. It matches Firefox behavior but not
3474         Opera.
3475
3476         * css/StylePropertySet.cpp:
3477         (WebCore::StylePropertySet::addParsedProperty):
3478
3479 2012-03-28  Leo Yang  <leo.yang@torchmobile.com.cn>
3480
3481         [BlackBerry] Remove PlatformMouseEvent::setClickCount for BlackBerry
3482         https://bugs.webkit.org/show_bug.cgi?id=82422
3483
3484         Reviewed by Rob Buis.
3485
3486         PlatformMouseEvent::setClickCount() is never used by BlackBerry.
3487         The declaration was added in PlatformMouseEvent.h internally for
3488         BlackBerry porting, but it has not been upstreamed yet.
3489
3490         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
3491
3492 2012-03-27  Antti Koivisto  <antti@apple.com>
3493
3494         Separate @import rules from other rules in CSSStyleSheet
3495         https://bugs.webkit.org/show_bug.cgi?id=82384 
3496
3497         Reviewed by Andreas Kling.
3498
3499         Import rules always come before all other rules (except @charset). They currently live 
3500         in the generic child rule vector. They can be moved to a vector of their own for stronger
3501         typing and more focused traversal. This will also make future refactoring easier.
3502         
3503         - @import rules go to m_importRules
3504         - the rest go to m_childRules
3505         
3506         * css/CSSStyleSelector.cpp:
3507         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3508         * css/CSSStyleSheet.cpp:
3509         (WebCore::CSSStyleSheet::parserAppendRule):
3510         (WebCore::CSSStyleSheet::length):
3511         (WebCore::CSSStyleSheet::item):
3512         (WebCore::CSSStyleSheet::clearRules):
3513         (WebCore::CSSStyleSheet::rules):
3514         (WebCore::CSSStyleSheet::insertRule):
3515         (WebCore::CSSStyleSheet::deleteRule):
3516         (WebCore::CSSStyleSheet::isLoading):
3517         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
3518         * css/CSSStyleSheet.h:
3519         (WebCore):
3520         (CSSStyleSheet):
3521         (WebCore::CSSStyleSheet::childRules):
3522         (WebCore::CSSStyleSheet::importRules):
3523
3524 2012-03-28  Pavel Feldman  <pfeldman@chromium.org>
3525
3526         Web Inspector: REGRESSION: Stack overflow on the page with > 100kloc
3527         https://bugs.webkit.org/show_bug.cgi?id=82436
3528
3529         Reviewed by Yury Semikhatsky.
3530
3531         This change migrates to manual splice implementation that uses additional
3532         information about the range being inserted to make it work faster / allocate
3533         less memory.
3534
3535         * inspector/front-end/TextEditorModel.js:
3536         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3537
3538 2012-03-28  Pavel Podivilov  <podivilov@chromium.org>
3539
3540         Web Inspector: breakpoints are not shown in sidebar pane after reload.
3541         https://bugs.webkit.org/show_bug.cgi?id=82351
3542
3543         Reviewed by Pavel Feldman.
3544
3545         When UISourceCode is added to ScriptsPanel, it could already have breakpoints.
3546         We should iterate over existing breakpoints and add them to sidebar pane.
3547
3548         * inspector/front-end/ScriptsPanel.js:
3549         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
3550
3551 2012-03-28  Li Yin  <li.yin@intel.com>
3552
3553         [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
3554         https://bugs.webkit.org/show_bug.cgi?id=82432
3555
3556         Reviewed by Kent Tamura.
3557
3558         From RFC6455: http://tools.ietf.org/html/rfc6455#section-11.3.4
3559         The |Sec-WebSocket-Protocol| header field must not appear 
3560         more than once in an HTTP response.
3561
3562         Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html
3563
3564         * Modules/websockets/WebSocketHandshake.cpp:
3565         (WebCore::WebSocketHandshake::readHTTPHeaders):
3566
3567 2012-03-27  James Robinson  <jamesr@chromium.org>
3568
3569         [chromium] Transfer wheel fling via WebCompositorInputHandlerClient
3570         https://bugs.webkit.org/show_bug.cgi?id=81740
3571
3572         Reviewed by Adrienne Walker.
3573
3574         Adds the ability to construct an in-progress PlatformGestureAnimation.
3575
3576         * platform/ActivePlatformGestureAnimation.cpp:
3577         (WebCore::ActivePlatformGestureAnimation::create):
3578         (WebCore):
3579         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
3580         * platform/ActivePlatformGestureAnimation.h:
3581         (ActivePlatformGestureAnimation):
3582         * platform/TouchpadFlingPlatformGestureCurve.cpp:
3583         (WebCore::TouchpadFlingPlatformGestureCurve::create):
3584         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
3585         * platform/TouchpadFlingPlatformGestureCurve.h:
3586         (TouchpadFlingPlatformGestureCurve):
3587
3588 2012-03-27  Nat Duca  <nduca@chromium.org>
3589
3590         [chromium] Route monotonic clock up from compositor
3591         https://bugs.webkit.org/show_bug.cgi?id=82154
3592
3593         Reviewed by James Robinson.
3594
3595         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3596         (WebCore::CCLayerTreeHost::updateAnimations):
3597         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3598         (CCLayerTreeHost):
3599         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3600         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3601         (WebCore::CCThreadProxy::beginFrame):
3602         * platform/graphics/chromium/cc/CCThreadProxy.h:
3603         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
3604         (BeginFrameAndCommitState):
3605
3606 2012-03-27  Robin Cao  <robin.cao@torchmobile.com.cn>
3607
3608         [BlackBerry] Upstream LayerAnimation.{cpp, h}
3609         https://bugs.webkit.org/show_bug.cgi?id=80123
3610
3611         Reviewed by Rob Buis.
3612
3613         Initial upstream, no new tests.
3614
3615         * platform/graphics/blackberry/LayerAnimation.cpp: Added.
3616         (WebCore):
3617         (WebCore::solveEpsilon):
3618         (WebCore::solveCubicBezierFunction):
3619         (WebCore::solveStepsFunction):
3620         (WebCore::timingFunctionForAnimationValue):
3621         (WebCore::progress):
3622         (WebCore::fetchIntervalEndpoints):
3623         (WebCore::LayerAnimation::apply):
3624         (WebCore::LayerAnimation::blendTransform):
3625         (WebCore::LayerAnimation::blendOpacity):
3626         (WebCore::LayerAnimation::validateTransformLists):
3627         * platform/graphics/blackberry/LayerAnimation.h: Added.
3628         (WebCore):
3629         (LayerAnimation):
3630         (WebCore::LayerAnimation::create):
3631         (WebCore::LayerAnimation::clone):
3632         (WebCore::LayerAnimation::~LayerAnimation):
3633         (WebCore::LayerAnimation::name):
3634         (WebCore::LayerAnimation::setStartTime):
3635         (WebCore::LayerAnimation::idFromAnimation):
3636         (WebCore::LayerAnimation::isEqualToAnimation):
3637         (WebCore::LayerAnimation::id):
3638         (WebCore::LayerAnimation::property):
3639         (WebCore::LayerAnimation::boxSize):
3640         (WebCore::LayerAnimation::timeOffset):
3641         (WebCore::LayerAnimation::startTime):
3642         (WebCore::LayerAnimation::valueCount):
3643         (WebCore::LayerAnimation::timingFunction):
3644         (WebCore::LayerAnimation::duration):
3645         (WebCore::LayerAnimation::iterationCount):
3646         (WebCore::LayerAnimation::direction):
3647         (WebCore::LayerAnimation::valueAt):
3648         (WebCore::LayerAnimation::LayerAnimation):
3649
3650 2012-03-27  Kenichi Ishibashi  <bashi@chromium.org>
3651
3652         [Chromium] Uninitialized access in SimpleFontDataSkia::platformInit
3653         https://bugs.webkit.org/show_bug.cgi?id=82411
3654
3655         Reviewed by Kent Tamura.
3656
3657         SimpleFontDataSkia::platformInit() could call widthForGlyph(), which
3658         accesses m_zeroWidthSpaceGlyph. This causes a valgrind memcheck error
3659         because m_zeroWidthSpaceGlyph isn't initialized at this point.
3660         Initialize m_zeroWidthSpaceGlyph with zero so that widthForGlyph() can
3661         return appropriate value(The value zero here means "unknown glyph").
3662
3663         No new tests. I manually confirmed this change fixes the valgrind
3664         memcheck error.
3665
3666         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3667         (WebCore::SimpleFontData::platformInit):
3668
3669 2012-03-27  YoungTaeck Song  <youngtaeck.song@samsung.com>
3670
3671         [EFL][WK2] Add RunLoopEfl and WorkQueueEfl
3672         https://bugs.webkit.org/show_bug.cgi?id=62777
3673
3674         Reviewed by Hajime Morita.
3675
3676         Add initial version RunLoopEfl for WebKit2 Efl.
3677
3678         * platform/RunLoop.h:
3679         (TimerBase):
3680         (RunLoop):
3681         * platform/efl/RunLoopEfl.cpp:
3682         (WebCore::RunLoop::RunLoop):
3683         (WebCore::RunLoop::~RunLoop):
3684         (WebCore):
3685         (WebCore::RunLoop::run):
3686         (WebCore::RunLoop::stop):
3687         (WebCore::RunLoop::wakeUpEvent):
3688         (WebCore::RunLoop::wakeUp):
3689         (WebCore::RunLoop::TimerBase::TimerBase):
3690         (WebCore::RunLoop::TimerBase::~TimerBase):
3691         (WebCore::RunLoop::TimerBase::timerFired):
3692         (WebCore::RunLoop::TimerBase::start):
3693         (WebCore::RunLoop::TimerBase::stop):
3694         (WebCore::RunLoop::TimerBase::isActive):
3695
3696 2012-03-27  Benjamin Poulain  <bpoulain@apple.com>
3697
3698         Reinforce Geolocation to prevent accidental leak of the user position
3699         https://bugs.webkit.org/show_bug.cgi?id=82396
3700
3701         Reviewed by Adam Barth.
3702
3703         It is very important not to provide the position of the user to a page
3704         unless the user authorize it.
3705
3706         The code used to make it easy to cause such problems, because any part
3707         of the Geolocation object could invoke the success callback directly.
3708
3709         This patch add encapsulation for all the attributes of GeoNotifier,
3710         and add extra guards for the two callbacks.
3711
3712         In the case of the success callback, we do one extra check before sending
3713         the value to the bindings.
3714
3715         * Modules/geolocation/Geolocation.cpp:
3716         (WebCore::Geolocation::GeoNotifier::runSuccessCallback):
3717         (WebCore::Geolocation::GeoNotifier::runErrorCallback):
3718         (WebCore):
3719         (WebCore::Geolocation::GeoNotifier::stopTimer):
3720         (WebCore::Geolocation::GeoNotifier::timerFired):
3721         (WebCore::Geolocation::startRequest):
3722         (WebCore::Geolocation::sendError):
3723         (WebCore::Geolocation::sendPosition):
3724         (WebCore::Geolocation::stopTimer):
3725         (WebCore::Geolocation::extractNotifiersWithCachedPosition):
3726         (WebCore::Geolocation::startUpdating):
3727         * Modules/geolocation/Geolocation.h:
3728         (WebCore::Geolocation::isAllowed):
3729         (Geolocation):
3730         (GeoNotifier):
3731         (WebCore::Geolocation::GeoNotifier::options):
3732         (WebCore::Geolocation::GeoNotifier::useCachedPosition):
3733
3734 2012-03-27  Kausalya Madhusudhanan  <kmadhusu@chromium.org>
3735
3736         [Coverity] Address some uninitialized constructor values.
3737         https://bugs.webkit.org/show_bug.cgi?id=82376
3738
3739         Reviewed by James Robinson.
3740
3741         New tests are not required since I did not modify any code behavior.
3742
3743         * html/shadow/MediaControlRootElementChromium.cpp:
3744         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
3745         * inspector/InspectorIndexedDBAgent.h:
3746         (InspectorIndexedDBAgent):
3747         * inspector/InspectorTimelineAgent.cpp:
3748         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3749         * page/scrolling/ScrollingCoordinator.cpp:
3750         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
3751         * platform/ScrollAnimatorNone.cpp:
3752         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
3753         * platform/chromium/DataTransferItemChromium.cpp:
3754         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
3755         * platform/graphics/skia/ImageBufferSkia.cpp:
3756         (WebCore::ImageBuffer::ImageBuffer):
3757         * storage/StorageTask.cpp:
3758         (WebCore::StorageTask::StorageTask):
3759
3760 2012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
3761
3762         Simplify CSSPropertyBorderSpacing parsing.
3763         https://bugs.webkit.org/show_bug.cgi?id=82397
3764
3765         Reviewed by Benjamin Poulain.
3766
3767         Remove the local array of longhand properties as it doesn't really
3768         bring much in this simple parsing algorithm.
3769
3770         No new tests, no functionality change intended.
3771
3772         * css/CSSParser.cpp:
3773         (WebCore::CSSParser::parseValue):
3774
3775 2012-03-27  Anders Carlsson  <andersca@apple.com>
3776
3777         Fix race condition when initializing the scrolling thread
3778         https://bugs.webkit.org/show_bug.cgi?id=82398
3779         <rdar://problem/11002166>
3780
3781         Reviewed by Sam Weinig.
3782
3783         Lock m_initializeRunLoopConditionMutex when assigning m_threadIdentifier since we're
3784         asserting that it's not null in the scrolling thread.
3785
3786         * page/scrolling/ScrollingThread.cpp:
3787         (WebCore::ScrollingThread::createThreadIfNeeded):
3788
3789 2012-03-27  Luke Macpherson  <macpherson@chromium.org>
3790
3791         Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging.
3792         https://bugs.webkit.org/show_bug.cgi?id=82393
3793
3794         Reviewed by Eric Seidel.
3795
3796         No new tests / adding assetions only.
3797
3798         * css/LengthFunctions.cpp:
3799         (WebCore::valueForLength):
3800         * rendering/RenderBox.cpp:
3801         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3802
3803 2012-03-27  Tony Chang  <tony@chromium.org>
3804
3805         use the correct size when computing flex-pack space
3806         https://bugs.webkit.org/show_bug.cgi?id=82378
3807
3808         Reviewed by Ojan Vafai.
3809
3810         Fix 2 bugs:
3811         - We weren't properly updating available space before computing
3812           packing space. If a min/max is not hit, we still need to adjust
3813           the available free space.
3814         - For flex-pack:end, we need to put the overflow in the start edge.
3815
3816         New test cases in css3/flexbox/flex-pack.html
3817
3818         * rendering/RenderFlexibleBox.cpp:
3819         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3820         (WebCore::initialPackingOffset):
3821
3822 2012-03-27  Dana Jansens  <danakj@chromium.org>
3823
3824         [chromium] Unknown transforms should be treated as non-axis aligned on main thread
3825         https://bugs.webkit.org/show_bug.cgi?id=82370
3826
3827         Reviewed by Adrienne Walker.
3828
3829         On main thread, animating transforms have "unknown" values as they are changing
3830         out of sync on the impl thread. So treat them as non-axis-aligned since they
3831         may be, when deciding to create a render surface.
3832
3833         In addition, since surfaces are cheap on main thread, create one for all layers
3834         with animating transforms and a drawing descendant, as this allows paint culling
3835         within the layer's subtree (the animated transform won't affect drawTransforms
3836         inside the subtree).
3837
3838         Also renamed the layerIsInAnimatingSubtreeFor* to animatingTransformTo*.
3839         The old name made me pause and think what it meant and I'm the one who
3840         created it. Hopefully this is more clear.
3841
3842         Unit test: CCLayerTreeHostCommonTest.verifyAnimationsForRenderSurfaceHierarchy
3843
3844         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3845         (WebCore::transformToParentIsKnown):
3846         (WebCore):
3847         (WebCore::subtreeShouldRenderToSeparateSurface):
3848         (WebCore::calculateDrawTransformsAndVisibilityInternal):
3849
3850 2012-03-27  Dirk Pranke  <dpranke@chromium.org>
3851
3852         Re-land r112277; reverting it doesn't seem to have fixed anything.
3853
3854         Unreviewed, build fix.
3855
3856         * svg/SVGUseElement.cpp:
3857         (WebCore::SVGUseElement::insertedIntoDocument):
3858         (WebCore::SVGUseElement::svgAttributeChanged):
3859         (WebCore::SVGUseElement::willRecalcStyle):
3860         (WebCore::SVGUseElement::finishParsingChildren):
3861         * xml/XMLErrors.cpp:
3862         (WebCore::XMLErrors::insertErrorMessageBlock):
3863
3864 2012-03-27  Dana Jansens  <danakj@chromium.org>
3865
3866         [chromium] Rename opaqueContentsRegion() to visibleContentOpaqueRegion()
3867         https://bugs.webkit.org/show_bug.cgi?id=81689
3868
3869         Reviewed by Adrienne Walker.
3870
3871         The return value from this function is a region of opaque pixels in the
3872         layer's content space that intersect with its visible rect. Rather than
3873         adding a comment to this effect, renaming the method to make it clear.
3874
3875         * platform/graphics/chromium/LayerChromium.h:
3876         (WebCore::LayerChromium::visibleContentOpaqueRegion):
3877         * platform/graphics/chromium/TiledLayerChromium.cpp:
3878         (WebCore::TiledLayerChromium::visibleContentOpaqueRegion):
3879         * platform/graphics/chromium/TiledLayerChromium.h:
3880         * platform/graphics/chromium/cc/CCLayerImpl.h:
3881         (WebCore::CCLayerImpl::visibleContentOpaqueRegion):
3882         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3883         (WebCore::computeOcclusionBehindLayer):
3884         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3885         (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion):
3886         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3887         (CCTiledLayerImpl):
3888
3889 2012-03-27  James Robinson  <jamesr@chromium.org>
3890
3891         Scrollable plugins not registered properly in ScrollingCoordinator
3892         https://bugs.webkit.org/show_bug.cgi?id=82163
3893
3894         Reviewed by Anders Carlsson.
3895
3896         Whenever a ScrollableArea is added or removed from a FrameView's ScrollableAreaSet, we have to recalculate the
3897         nonFastScrollableRegion. This can happen for certain types of plugins that are scrollable.
3898
3899         This also reverts 112142 which was a not quite right way to handle these plugins.
3900
3901         * page/FrameView.cpp:
3902         (WebCore::FrameView::addScrollableArea):
3903         (WebCore::FrameView::removeScrollableArea):
3904         * page/scrolling/ScrollingCoordinator.cpp:
3905         (WebCore::computeNonFastScrollableRegion):
3906         (WebCore::ScrollingCoordinator::frameViewScrollableAreasDidChange):
3907         (WebCore):
3908         * page/scrolling/ScrollingCoordinator.h:
3909         (ScrollingCoordinator):
3910         * plugins/PluginViewBase.h:
3911
3912 2012-03-27  Adam Klein  <adamk@chromium.org>
3913
3914         Hold a reference to refChild in insertBefore before calling collectChildrenAndRemoveFromOldParent
3915         https://bugs.webkit.org/show_bug.cgi?id=82377
3916
3917         Reviewed by Ryosuke Niwa.
3918
3919         This fixes a regression from r111925.
3920
3921         Test: fast/dom/insertBefore-refChild-crash.html
3922
3923         * dom/ContainerNode.cpp:
3924         (WebCore::ContainerNode::insertBefore): Move the 'next' RefPtr above the call to
3925         collectChildrenAndRemoveFromOldParent and rename refChildPreviousSibling
3926         to 'prev' (matching appendChild and replaceChild).
3927
3928 2012-03-27  Ryosuke Niwa  <rniwa@webkit.org>
3929
3930         cssText should not generate literal 'initial' in shorthand properties
3931         https://bugs.webkit.org/show_bug.cgi?id=82364
3932
3933         Reviewed by Antti Koivisto.
3934
3935         Fixed the bug by treating initial value as if the value is not set.
3936         While this is incorrect for properties that inherits by default,
3937         it's strictly better than generating unparsable value as we do today.
3938
3939         The proper fix is for CSSInitialValue::cssText to fetch the respective
3940         default value from what's currently in CSSStyleSelector code but that requires
3941         a considerable amount of refactoring and work.
3942
3943         * css/StylePropertySet.cpp:
3944         (WebCore::StylePropertySet::getShorthandValue):
3945         (WebCore::StylePropertySet::getCommonValue):
3946
3947 2012-03-26  Adam Klein  <adamk@chromium.org>
3948
3949         Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
3950         https://bugs.webkit.org/show_bug.cgi?id=82256
3951
3952         Reviewed by Adam Barth.
3953
3954         This moves leakRef() calls out of generated code, centralizing them in
3955         V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
3956         PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
3957         (which clearly can't be wrapped in a PassRefPtr).
3958
3959         Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.
3960
3961         Relanding r112207 with setJSWrapperForDOMSVGElementInstance defined
3962         out-of-line to avoid SVG header dependencies.
3963
3964         * bindings/scripts/CodeGeneratorV8.pm:
3965         (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
3966         (GenerateNamedConstructorCallback): ditto.
3967         (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
3968         instead of directly accessing the wrapper maps and calling set.
3969         (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
3970         (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
3971         * bindings/scripts/test/V8/V8Float64Array.cpp:
3972         (WebCore::V8Float64Array::wrapSlow):
3973         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3974         (WebCore::V8TestActiveDOMObject::wrapSlow):
3975         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3976         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3977         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3978         (WebCore::V8TestEventConstructor::wrapSlow):
3979         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3980         (WebCore::V8TestEventTarget::wrapSlow):
3981         * bindings/scripts/test/V8/V8TestInterface.cpp:
3982         (WebCore::V8TestInterface::wrapSlow):
3983         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3984         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3985         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3986         (WebCore::V8TestNamedConstructor::wrapSlow):
3987         * bindings/scripts/test/V8/V8TestObj.cpp:
3988         (WebCore::V8TestObj::wrapSlow):
3989         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3990         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3991         * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
3992         (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.
3993         Not inline to avoid header dependency on SVGElementInstance.h.
3994         * bindings/v8/V8DOMWrapper.h:
3995         (V8DOMWrapper):
3996         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
3997         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
3998         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
3999         this one handles non-active Nodes.
4000         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
4001         DOMNode method, now handles only active Nodes.
4002
4003 2012-03-27  Levi Weintraub  <leviw@chromium.org>
4004
4005         Correct LayoutUnit usage in virtual function layoutBlock in RenderFlexibleBox
4006         https://bugs.webkit.org/show_bug.cgi?id=82344
4007
4008         Reviewed by Eric Seidel.
4009
4010         Correcting the signature of RenderFlexibleBox::layoutBlock to use a LayoutUnit
4011         for the page height, and avoiding assigning the renderer's size to an IntSize.
4012
4013         No new tests. No change in behavior.
4014
4015         * rendering/RenderFlexibleBox.cpp:
4016         (WebCore::RenderFlexibleBox::layoutBlock):
4017         * rendering/RenderFlexibleBox.h:
4018         (RenderFlexibleBox):
4019
4020 2012-03-27  Timothy Hatcher  <timothy@apple.com>
4021
4022         Make WebKit properly load a staged framework when soft linking.
4023
4024         https://webkit.org/b/82371
4025         rdar://problem/11125989
4026
4027         Reviewed by Dan Bernstein.
4028
4029         * platform/mac/SoftLinking.h: Replaced SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL with
4030         SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL and made it use the StagedFrameworks path
4031         if the first dlopen failed.
4032
4033 2012-03-26  Dirk Schulze  <krit@webkit.org>
4034
4035         Use enumeration for CSS parser mode
4036         https://bugs.webkit.org/show_bug.cgi?id=82056
4037
4038         Reviewed by Antti Koivisto.
4039
4040         Introduce a new CSSParserMode enum to differ between strict / quirks and SVG presentation
4041         attribute parsing modes.
4042         The followup patch will make use of the enum in all other classes.
4043         After that it will be easier possible to reuse the CSS parser in SVG as much as possible and
4044         introduce SVG specific functionality.
4045
4046         No new tests. No change on functionality yet. This is just a refactoring to use the enumeration.
4047
4048         * GNUmakefile.list.am: Added new file CSSParserMode.h with the new enum, which can be used by any caller of CSSParser, CSSStyleSheet and others.
4049         * Target.pri: Ditto.
4050         * WebCore.gypi: Ditto.
4051         * WebCore.vcproj/WebCore.vcproj: Ditto.
4052         * WebCore.xcodeproj/project.pbxproj: Ditto.
4053         * css/CSSGrammar.y: Make use of the new enumeration.
4054         * css/CSSParser.cpp: Replaced boolean by enumeration. No change of functionality at this point of time.
4055         (WebCore::CSSParser::inStrictMode): Helper function.
4056         (WebCore):
4057         (WebCore::CSSParser::inQuirksMode): Helper function.
4058         (WebCore::CSSParser::CSSParser):
4059         (WebCore::CSSParser::validUnit):
4060         (WebCore::CSSParser::checkForOrphanedUnits):
4061         (WebCore::CSSParser::parseValue):
4062         (WebCore::CSSParser::parseSizeParameter):
4063         (WebCore::CSSParser::parseBackgroundColor):