2011-06-30 Pavel Feldman <pfeldman@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-30  Pavel Feldman  <pfeldman@chromium.org>
2
3         Reviewed by Yury Semikhatsky.
4
5         Web Inspector: introduce "filter" icons for timeline panel and elements sidebar.
6         https://bugs.webkit.org/show_bug.cgi?id=63731
7
8         * inspector/front-end/EventListenersSidebarPane.js:
9         * inspector/front-end/Images/paneFilterButtons.png: Added.
10         * inspector/front-end/Images/statusbarButtonGlyphs.png:
11         * inspector/front-end/StylesSidebarPane.js:
12         * inspector/front-end/inspector.css:
13         (.pane > .title > select):
14         (.pane > .title > select.select-settings):
15         (.pane > .title > select.select-filter):
16         (.timeline-filter-status-bar-item .glyph):
17
18 2011-06-28  Hans Wennborg  <hans@chromium.org>
19
20         Reviewed by Tony Chang.
21
22         IndexedDB: Support for deleteIndex with LevelDB backing store
23         https://bugs.webkit.org/show_bug.cgi?id=63539
24
25         Covered by storage/indexeddb/mozilla/remove-index.html.
26
27         * storage/IDBLevelDBBackingStore.cpp:
28         (WebCore::IDBLevelDBBackingStore::deleteIndex):
29
30 2011-06-30  Abhishek Arya  <inferno@chromium.org>
31
32         Reviewed by Ryosuke Niwa.
33
34         Crash when calling DOMSubtreeModified event when extracting range
35         contents.
36         https://bugs.webkit.org/show_bug.cgi?id=63650
37
38         Convert a few nodes to RefPtrs and add commonRoot verification checks
39         for Range::processContents.
40
41         Tests: fast/dom/Range/range-extract-contents-event-fire-crash.html
42                fast/dom/Range/range-extract-contents-event-fire-crash2.html
43
44         * dom/Range.cpp:
45         (WebCore::childOfCommonRootBeforeOffset):
46         (WebCore::Range::processContents):
47         (WebCore::Range::processContentsBetweenOffsets):
48         (WebCore::Range::processAncestorsAndTheirSiblings):
49
50 2011-06-30  Dan Bernstein  <mitz@apple.com>
51
52         Reviewed by Adele Peterson.
53
54         Add +[WebView _allowsRoundingHacks]
55         https://bugs.webkit.org/show_bug.cgi?id=63734
56
57         * WebCore.exp.in: Export TextRun::allowsRoundingHacks().
58         * platform/graphics/TextRun.cpp:
59         (WebCore::TextRun::allowsRoundingHacks): Added this accessor.
60         * platform/graphics/TextRun.h:
61
62 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
63
64         Reviewed by Adam Roben.
65
66         [WIN] Don't redefine the keyboard codes
67         https://bugs.webkit.org/show_bug.cgi?id=63726
68
69         Only define the codes when undefined.
70         r64957 fixed this problem for COMPILER(MINGW) but not for OS(WINCE).
71
72         * platform/WindowsKeyboardCodes.h:
73
74 2011-06-30  Yury Semikhatsky  <yurys@chromium.org>
75
76         Reviewed by Pavel Feldman.
77
78         Web Inspector: hide "Enabled background events collection" option in context menu until the setting is persisted
79         https://bugs.webkit.org/show_bug.cgi?id=63708
80
81         The option has no much sense if it is not preserved between browser restarts.
82
83         * inspector/front-end/NetworkPanel.js:
84         (WebInspector.NetworkPanel.prototype._contextMenu):
85
86 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
87
88         Reviewed by Darin Adler.
89
90         Remove dependnecy on IDL generation for disabled features in JSC bindings
91         https://bugs.webkit.org/show_bug.cgi?id=63718
92
93         Move the #if ENABLE() line directly after #include "config.h".
94         This enables us to compile all files even when we don't generate the IDL output.
95
96         * bindings/js/IDBBindingUtilities.cpp:
97         * bindings/js/JSConsoleCustom.cpp:
98         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
99         * bindings/js/JSCustomXPathNSResolver.cpp:
100         * bindings/js/JSDOMApplicationCacheCustom.cpp:
101         * bindings/js/JSDeviceMotionEventCustom.cpp:
102         * bindings/js/JSDeviceOrientationEventCustom.cpp:
103         * bindings/js/JSInjectedScriptHostCustom.cpp:
104         * bindings/js/JSInjectedScriptManager.cpp:
105         * bindings/js/JSInspectorFrontendHostCustom.cpp:
106         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
107         * bindings/js/JSSQLResultSetRowListCustom.cpp:
108         * bindings/js/JSSQLTransactionCustom.cpp:
109         * bindings/js/JSSQLTransactionSyncCustom.cpp:
110         * bindings/js/JSSVGElementInstanceCustom.cpp:
111         * bindings/js/JSStorageCustom.cpp:
112         * bindings/js/JSTouchCustom.cpp:
113         * bindings/js/JSTouchListCustom.cpp:
114         * bindings/js/JSXPathResultCustom.cpp:
115         * bindings/js/JavaScriptCallFrame.cpp:
116         * bindings/js/PageScriptDebugServer.cpp:
117         * bindings/js/ScriptDebugServer.cpp:
118         * bindings/js/ScriptGCEvent.cpp:
119         * bindings/js/ScriptProfile.cpp:
120         * bindings/js/WorkerScriptDebugServer.cpp:
121
122 2011-06-30  Alexander Pavlov  <apavlov@chromium.org>
123
124         Reviewed by Kent Tamura.
125
126         [Chromium] Autofill suggestions appear in upper left corner after input change
127         https://bugs.webkit.org/show_bug.cgi?id=63702
128
129         This change fixes a few popup layout issues, some of which have existed for quite a while:
130         - the absence of the ChromeClientImpl::screenToWindow() implementation (the method used to always return (0, 0));
131         - the confusion of window and screen coordinates passed into the autofill popup client's setWindowRect() method;
132         - the use of the current frameRect() width as the target element's width (which was wrong when refreshing
133           a popup resized during the initial layout (e.g. made wider than the target element)).
134
135         No new tests, as this is a change to platform-specific widget code. The test case is provided in the bug description.
136
137         * platform/chromium/PopupMenuChromium.cpp:
138         (WebCore::PopupContainer::layoutAndGetRTLOffset): Use original target element width, not frameRect().width(),
139         since the latter gets updated if the popup is not the same width as the target element.
140         (WebCore::PopupContainer::refresh): Restore only the popup bounds rather than its original rectangle,
141         since it sometimes breaks the invalidation region and layout.
142
143 2011-06-30  Sheriff Bot  <webkit.review.bot@gmail.com>
144
145         Unreviewed, rolling out r90102.
146         http://trac.webkit.org/changeset/90102
147         https://bugs.webkit.org/show_bug.cgi?id=63714
148
149         Lots of tests asserting beneath
150         SVGSMILElement::findInstanceTime (Requested by aroben on
151         #webkit).
152
153         * svg/animation/SVGSMILElement.cpp:
154         (WebCore::SVGSMILElement::findInstanceTime):
155
156 2011-06-30  Andrey Kosyakov  <caseq@chromium.org>
157
158         Reviewed by Yury Semikhatsky.
159
160         Web Inspector: remove ExtensionAPISchema.json
161         https://bugs.webkit.org/show_bug.cgi?id=63687
162
163         * inspector/front-end/ExtensionAPISchema.json: Removed.
164
165 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
166
167         Unreviewed build fix for chromium.
168
169         * inspector/CodeGeneratorInspector.pm:
170
171 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
172
173         Unreviewed build fix for mac.
174
175         * inspector/CodeGeneratorInspector.pm:
176
177 2011-06-30  Ilya Tikhonovsky  <loislo@chromium.org>
178
179         Reviewed by Pavel Feldman.
180
181         Web Inspector: Protocol: error object needs some improvement.
182         https://bugs.webkit.org/show_bug.cgi?id=63707
183
184         Current implementation is not useful in the code.
185         We need to have toString implementation with nice formatting
186         I'd like to use error.message property as the main place for the error's text.
187
188         * inspector/CodeGeneratorInspector.pm:
189
190 2011-06-30  Mikhail Naganov  <mnaganov@chromium.org>
191
192         Reviewed by Yury Semikhatsky.
193
194         Web Inspector: [Chromium] Support annotations for arrays in heap profiler.
195         https://bugs.webkit.org/show_bug.cgi?id=63690
196
197         * inspector/front-end/DetailedHeapshotGridNodes.js:
198         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
199
200
201 2011-06-30  Patrick Gansterer  <paroga@webkit.org>
202
203         Unreviewed build fix for !ENABLE(SVG_ANIMATION) after r88663, r89187, r89220, r89431 and r89661.
204
205         * svg/SVGAnimatedAngle.h:
206         * svg/SVGAnimatedLength.h:
207         * svg/SVGAnimatedNumber.h:
208         * svg/SVGAnimatedRect.h:
209         * svg/SVGAnimatedString.h:
210
211 2011-06-30  Gabor Loki  <loki@webkit.org>
212
213         Reviewed by Csaba Osztrogonác.
214
215         Fixed several style and typo issues after r90091.
216         https://bugs.webkit.org/show_bug.cgi?id=63692
217
218         Rename yStart to extremaStartY during computing extremas
219
220         * platform/graphics/filters/FEMorphology.cpp:
221         (WebCore::FEMorphology::platformApplyGeneric):
222         * platform/graphics/filters/FEMorphology.h:
223
224 2011-06-30  Oliver Varga  <Varga.Oliver@stud.u-szeged.hu>
225
226         Reviewed by Nikolas Zimmermann.
227
228         Speed up SVGSMILElement::findInstanceTime.
229         https://bugs.webkit.org/show_bug.cgi?id=61025
230
231         Replace the linear search to binary search on ordered list because
232         the previous searches from the beginning was not efficient.
233
234         No new tests this is only a performance tweak.
235
236         * svg/animation/SVGSMILElement.cpp:
237         (WebCore::extractTimeFromVector):
238         (WebCore::SVGSMILElement::findInstanceTime):
239
240 2011-06-30  Kentaro Hara  <haraken@google.com>
241
242         Reviewed by Kent Tamura.
243
244         Change the label of an HTML5 file chooser button to "Choose Files"
245         https://bugs.webkit.org/show_bug.cgi?id=49245
246
247         We should notify capability of multiple files to users.
248
249         Test: fast/forms/input-file-label.html
250
251         * English.lproj/Localizable.strings:
252         * html/FileInputType.cpp:
253         (WebCore::UploadButtonElement::createForMultiple): Constructs a multiple file chooser button.
254         (WebCore::FileInputType::createShadowSubtree): Constructs a single/multiple file chooser button depending on 'multiple' attribute.
255         (WebCore::FileInputType::multipleAttributeChanged): Updates the label of the file chooser button.
256         * html/FileInputType.h:
257         * html/HTMLInputElement.cpp:
258         (WebCore::HTMLInputElement::parseMappedAttribute): Updates the shadow tree of the file chooser button when 'multiple' attribute is set or unset.
259         * html/InputType.cpp:
260         (WebCore::InputType::multipleAttributeChanged): Virtual method to be overridden by FileInputType.
261         * html/InputType.h:
262         * platform/DefaultLocalizationStrategy.cpp:
263         (WebCore::DefaultLocalizationStrategy::fileButtonChooseFileLabel): Updated the description for "Choose File".
264         (WebCore::DefaultLocalizationStrategy::fileButtonChooseMultipleFilesLabel): Returns a string "Choose Files".
265         * platform/DefaultLocalizationStrategy.h:
266         * platform/LocalizationStrategy.h:
267         * platform/LocalizedStrings.cpp:
268         (WebCore::fileButtonChooseMultipleFilesLabel): Wrapper method for getting the "Choose Files" label.
269         * platform/LocalizedStrings.h:
270         * platform/brew/LocalizedStringsBrew.cpp:
271         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
272         * platform/efl/LocalizedStringsEfl.cpp:
273         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
274         * platform/gtk/LocalizedStringsGtk.cpp:
275         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
276         * platform/haiku/LocalizedStringsHaiku.cpp:
277         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
278         * platform/wx/LocalizedStringsWx.cpp:
279         (WebCore::fileButtonChooseMultipleFilesLabel): Returns a "Choose Files" label.
280
281 2011-06-30  Ryosuke Niwa  <rniwa@webkit.org>
282
283         Reviewed by Kent Tamura.
284
285         Replace isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&)
286         https://bugs.webkit.org/show_bug.cgi?id=63672
287
288         Replaced isNodeInTextFormControl(Node*) by enclosingTextFormControl(const Position&).
289         Also added a safe toTextFormControl to HTMLFormControlElement.h.
290
291         * editing/DeleteSelectionCommand.cpp:
292         (WebCore::DeleteSelectionCommand::doApply): Calls enclosingTextFormControl instead of manually
293         checking the tag name of shadowAncestorNode.
294         * editing/Editor.cpp:
295         (WebCore::Editor::selectionForCommand): Rewritten using enclosingTextFormControl and toTextFormControl.
296         (WebCore::Editor::cut): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
297         (WebCore::Editor::copy): Ditto.
298         (WebCore::Editor::setBaseWritingDirection): Calls toTextFormControl instead of manually checking tag name.
299         * editing/FrameSelection.cpp:
300         (WebCore::FrameSelection::isInPasswordField): Calls enclosingTextFormControl.
301         * editing/ReplaceSelectionCommand.cpp:
302         (WebCore::ReplaceSelectionCommand::doApply): Ditto.
303         * editing/htmlediting.cpp:
304         (WebCore::enclosingTextFormControl): Added.
305         * editing/htmlediting.h:
306         * html/HTMLFormControlElement.h:
307         (WebCore::toTextFormControl): Added.
308         * page/DragController.cpp:
309         (WebCore::DragController::startDrag): Calls enclosingTextFormControl instead of isNodeInTextFormControl.
310
311 2011-06-27  Pavel Podivilov  <podivilov@chromium.org>
312
313         Reviewed by Pavel Feldman.
314
315         Web Inspector: source code is not highlighted after drawer height animations.
316         https://bugs.webkit.org/show_bug.cgi?id=62860
317
318         * inspector/front-end/Drawer.js:
319         (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
320         (WebInspector.Drawer.prototype._animateDrawerHeight):
321
322 2011-06-30  MORITA Hajime  <morrita@google.com>
323
324         Reviewed by Dimitri Glazkov.
325
326         Crash if ShadowRoot has a text node.
327         https://bugs.webkit.org/show_bug.cgi?id=63607
328         
329         Node::styleForRenderer() for Text node wasn't shadow-aware.
330         This change allow styleForRenderer() to know its visual parent by
331         passing NodeRenderingContext.
332         
333         Changes other than NodeRenderingContext and Element is just a
334         follow up for change above.
335
336         * dom/Element.cpp: use NodeRenderingContext to resolve parent node.
337         (WebCore::Element::recalcStyle):
338         * dom/Node.cpp:
339         (WebCore::Node::styleForRenderer): Added NodeRenderingContext as a parameter.
340         * dom/Node.h:
341         * dom/NodeRenderingContext.cpp:
342         (WebCore::NodeRendererFactory::createRendererAndStyle):
343         * html/HTMLOptGroupElement.cpp:
344         (WebCore::HTMLOptGroupElement::attach):
345         * html/HTMLOptionElement.cpp:
346         (WebCore::HTMLOptionElement::attach):
347         * html/HTMLTitleElement.cpp:
348         (WebCore::HTMLTitleElement::textWithDirection):
349         * html/shadow/TextControlInnerElements.cpp:
350         (WebCore::TextControlInnerElement::styleForRenderer):
351         (WebCore::TextControlInnerTextElement::styleForRenderer):
352         * html/shadow/TextControlInnerElements.h:
353
354         Test: fast/dom/shadow/shadow-root-text-child.html
355         
356 2011-06-30  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
357
358         Reviewed by Dirk Schulze.
359
360         Apply the ParallelJobs support to FEMorphology
361         https://bugs.webkit.org/show_bug.cgi?id=63064
362
363         The FEMorphology filter of SVG can consume lots of resources if it is
364         applied to a large area. The computation can be distributed to multiple
365         cores if the architecture supports.
366         The average performance progression is 20-25% on dual-core machines.
367
368         * platform/graphics/filters/FEMorphology.cpp:
369         (WebCore::FEMorphology::platformApplyGeneric): Apply the filter between yStart and yEnd interval
370         (WebCore::FEMorphology::platformApplyWorker): Call the generic apply from a parallel worker
371         (WebCore::FEMorphology::platformApply):
372         (WebCore::FEMorphology::apply): Move the functionality into platformApply
373         (WebCore::FEMorphology::externalRepresentation): Remove whitespaces
374         * platform/graphics/filters/FEMorphology.h:
375
376 2011-06-29  Kent Tamura  <tkent@chromium.org>
377
378         Reviewed by Dimitri Glazkov.
379
380         Avoid custom layout code of RenderTextControlSingleLine
381         https://bugs.webkit.org/show_bug.cgi?id=61415
382
383         If a text field has a search results button, a search cancel
384         button, a speech button, or a spin button, the editable inner text
385         element and the buttons are wrapped by a flexible box container,
386         and the editable inner text element has flexibility. As the result
387         of applying the flexible box, we don't need any horizontal layout
388         code in RenderTextControlSingleLine except the inner spin button.
389
390         Also, we remove custom hit-testing code in nodeAtPoint(). If a
391         user clicks on a position left of the inner editable text but not
392         on the search results button, the search results button doesn't
393         work though it worked.
394
395         * css/html.css:
396         (input::-webkit-textfield-decoration-container):
397           New style definition for the "container" element.
398         (input[type="search"]::-webkit-search-cancel-button):
399           It should be a block element because it's a child of the flexible box.
400           Also, this doesn't have flexibility.
401         (input[type="search"]::-webkit-search-decoration): ditto.
402         (input[type="search"]::-webkit-search-results-decoration): ditto.
403         (input[type="search"]::-webkit-search-results-button): ditto.
404         (input::-webkit-inner-spin-button): ditto.
405         (input::-webkit-input-speech-button): ditto.
406         * html/HTMLInputElement.cpp:
407         (WebCore::HTMLInputElement::containerElement):
408           Add an accessor of the flexible box container.
409           It just calls InputType::containerElement().
410         * html/HTMLInputElement.h: Declare it.
411         * html/InputType.h:
412         (WebCore::InputType::containerElement): New accessor for a shadow element.
413         * html/SearchInputType.cpp:
414         (WebCore::SearchInputType::SearchInputType):
415           m_innerBlock is moved to TextFieldInputType.
416         (WebCore::SearchInputType::needsContainer):
417           A search field always needs the flexible box container because
418           of the results button and the cancel button.
419         (WebCore::SearchInputType::createShadowSubtree):
420           Use TextFieldInputType::createShadowSubtree(), then modify the tree.
421         (WebCore::SearchInputType::destroyShadowSubtree):
422           m_innerBlock is moved to TextFieldInputType.
423         * html/SearchInputType.h:
424         * html/TextFieldInputType.cpp:
425         (WebCore::TextFieldInputType::TextFieldInputType):
426           Initialize the new members.
427         (WebCore::TextFieldInputType::needsContainer):
428           Returns true if x-webkit-speech. We check a spin button separately.
429         (WebCore::TextFieldInputType::createShadowSubtree):
430           Wrap everything with the flexible box container if needsContainer() or we need a spin button.
431         (WebCore::TextFieldInputType::containerElement): Added an accessor.
432         (WebCore::TextFieldInputType::innerBlockElement): ditto.
433         (WebCore::TextFieldInputType::innerTextElement): ditto.
434         (WebCore::TextFieldInputType::innerSpinButtonElement): ditto.
435         (WebCore::TextFieldInputType::speechButtonElement): ditto.
436         (WebCore::TextFieldInputType::destroyShadowSubtree):
437           Clear references to new shadow nodes.
438         * html/TextFieldInputType.h:
439         * rendering/RenderTextControlSingleLine.cpp:
440         (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor.
441         (WebCore::RenderTextControlSingleLine::innerTextElement):
442         (WebCore::RenderTextControlSingleLine::layout):
443          - Correct heights check
444           Comparing with height(), not contentHeigth(), was incorrect.
445          - Adjust the container height like the editable inner text.
446          - Remove width adjustment
447          - Remove the speech button layout code
448           The flexible box layout is enough.
449         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
450           Remove custom code for results/cancel/speech buttons, and
451           Simplify comments.
452         (WebCore::RenderTextControlSingleLine::forwardEvent):
453           Remove custom forwarding code for results/cancel buttons.
454         (WebCore::RenderTextControlSingleLine::styleDidChange):
455           Clear the style of the container because we update it in layout().
456         (WebCore::RenderTextControlSingleLine::hasControlClip):
457           Decoration buttons should be clipped by the container.
458         (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
459         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
460           We don't need to use display:inline-block any more.
461         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
462           The text wrapper element should have flexibility.
463         (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
464           Updated for the tree structure change.
465         * rendering/RenderTextControlSingleLine.h:
466
467 2011-06-29  Kent Tamura  <tkent@chromium.org>
468
469         [Mac] Attempt to fix Leopard build.
470
471         * platform/mac/CursorMac.mm:
472         (WebCore::Cursor::ensurePlatformCursor):
473
474 2011-06-29  Darin Adler  <darin@apple.com>
475
476         Reviewed by Dan Bernstein.
477
478         [Mac] Use system cursors instead of custom bitmaps where possible
479         https://bugs.webkit.org/show_bug.cgi?id=63679
480
481         * Resources/crossHairCursor.png: Removed.
482         * Resources/notAllowedCursor.png: Removed.
483         * WebCore.exp.in: Added wkCursor.
484         * WebCore/WebCore.gyp/WebCore.gyp: Removed the two now-unused PNG files.
485         * WebCore.xcodeproj/project.pbxproj: Ditto.
486
487         * platform/mac/CursorMac.mm:
488         (WebCore::Cursor::ensurePlatformCursor): Use NSCursor API for Cross, Hand,
489         VerticalText, ContextMenu, Copy, and NotAllowed. Use wkCursor for Move,
490         Alias, Progress, and the resize and panning cursors.
491
492         * platform/mac/WebCoreSystemInterface.h: Added wkCursor.
493         * platform/mac/WebCoreSystemInterface.mm: Ditto.
494
495 2011-06-29  Keishi Hattori  <keishi@webkit.org>
496
497         Reviewed by Adam Barth.
498
499         Remove extra space at EOL in view source mode
500         https://bugs.webkit.org/show_bug.cgi?id=63620
501
502         Test: fast/frames/viewsource-linebreak.html
503
504         * css/view-source.css:
505         (tbody:last-child .webkit-line-content:empty:before): If we don't do this
506         the last line will be empty and the height will be shorter than the rest.
507         * html/HTMLViewSourceDocument.cpp:
508         (WebCore::HTMLViewSourceDocument::addSource): If source file is empty, add an empty line.
509         (WebCore::HTMLViewSourceDocument::finishLine): Call when you are done with the current line.
510         Adds a BR element if the line is empty and sets current to tbody.
511         (WebCore::HTMLViewSourceDocument::addText):
512         * html/HTMLViewSourceDocument.h:
513
514 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
515
516         [WinCE] Correct logical state of WINCE test.
517
518         * platform/win/ScrollbarThemeWin.cpp: The #if OS(WINCE)
519           should have been #if !OS(WINCE)
520         (WebCore::ScrollbarThemeWin::paintTrackPiece):
521         (WebCore::ScrollbarThemeWin::paintButton):
522         (WebCore::ScrollbarThemeWin::paintThumb):
523         * rendering/RenderThemeWin.cpp: ditto.
524         (WebCore::drawControl):
525
526 2011-06-29  Justin Garcia  <justin.garcia@apple.com>
527
528         Reviewed by Enrica Casucci.
529         
530         I forgot to include these (reviewed) style fix-ups in my previous check-in.
531
532         * editing/htmlediting.cpp:
533         (WebCore::indexForVisiblePosition):
534         (WebCore::visiblePositionForIndex):
535
536 2011-06-29  Justin Garcia  <justin.garcia@apple.com>
537
538         Reviewed by Enrica Casucci.
539
540         https://bugs.webkit.org/show_bug.cgi?id=62922
541         indexForVisiblePosition(const VisiblePosition& visiblePosition) does not consider shadow content
542         
543         VisiblePositions can be inside web form text regions, which use shadow trees. Made indexForVisiblePosition
544         aware of this, and added a new parameter to obtain the scope for a VisiblePosition, in addition to its index.
545         
546         Added visiblePositionForIndex to go in the opposite direction, taking into account the scope
547         used to compute the index.
548         
549         These two functions use TextIterators to convert between VisiblePositions and indices. But 
550         TextIterator iteration using TextIteratorEmitsCharactersBetweenAllVisiblePositions does not 
551         exactly match VisiblePosition iteration, so using them to preserve a selection during an 
552         editing operation is unreliable. This can be seen in the expected results for:
553         
554         editing/execCommand/indent-pre-list.html
555         editing/execCommand/crash-indenting-list-item.html
556         
557         TextIterator's TextIteratorEmitsCharactersBetweenAllVisiblePositions mode needs to be fixed, or 
558         these functions need to be changed to iterate using actual VisiblePositions. See:
559         
560         https://bugs.webkit.org/show_bug.cgi?id=63590
561         TextIterators in TextIteratorEmitsCharactersBetweenAllVisiblePositions do not exactly match VisiblePositions
562         
563         Also:
564         
565         https://bugs.webkit.org/show_bug.cgi?id=63592
566         Use visiblePositionForIndex and indexForVisiblePosition everywhere that TextIterators are used to convert between VisiblePositions and indices
567         
568         No new tests added because indexForVisiblePosition is currently only used for editing operations
569         that cannot be performed inside web form fields.
570
571         * editing/ApplyBlockElementCommand.cpp:
572         (WebCore::ApplyBlockElementCommand::doApply):
573         * editing/InsertListCommand.cpp:
574         (WebCore::InsertListCommand::doApply):
575         * editing/htmlediting.cpp:
576         (WebCore::indexForVisiblePosition):
577         (WebCore::visiblePositionForIndex):
578         * editing/htmlediting.h:
579
580 2011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
581
582         Reviewed by Kent Tamura.
583
584         Remove ElementWithPseudoId, since now an Element can store it all by itself.
585         https://bugs.webkit.org/show_bug.cgi?id=63657
586
587         Refactoring, covered by existing tests.
588
589         * CMakeLists.txt: Removed ElementWithPseudoId from build.
590         * GNUmakefile.list.am: Ditto.
591         * WebCore.gypi: Ditto.
592         * WebCore.order: Ditto.
593         * WebCore.pro: Ditto.
594         * WebCore.vcproj/WebCore.vcproj: Ditto.
595         * WebCore.xcodeproj/project.pbxproj: Ditto.
596         * html/ColorInputType.cpp:
597         (WebCore::ColorInputType::createShadowSubtree): Changed to use plain-old HTMLDivElement.
598         * html/RangeInputType.cpp:
599         (WebCore::RangeInputType::createShadowSubtree): Ditto.
600         * html/ValidationMessage.cpp:
601         (WebCore::ValidationMessage::buildBubbleTree): Ditto.
602         * html/shadow/ElementWithPseudoId.cpp: Removed.
603         * html/shadow/ElementWithPseudoId.h: Removed.
604
605 2011-06-29  Levi Weintraub  <leviw@chromium.org>
606
607         Reviewed by Eric Seidel.
608
609         Switch computeWidth and computeHeight functions to new layout types
610         https://bugs.webkit.org/show_bug.cgi?id=63655
611
612         Switch computeWidth and computeHeight functions over to the new layout unit abstraction.
613
614         Making a point to mark rounding that should eventually be removed by linking to a new
615         tracking bug: 63645.
616
617         No new tests, no functionality changes.
618
619         * rendering/AutoTableLayout.cpp:
620         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
621         * rendering/AutoTableLayout.h:
622         * rendering/FixedTableLayout.cpp:
623         (WebCore::FixedTableLayout::computePreferredLogicalWidths):
624         * rendering/FixedTableLayout.h:
625         * rendering/LayoutTypes.h:
626         * rendering/RenderBlock.cpp:
627         (WebCore::RenderBlock::computePreferredLogicalWidths):
628         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
629         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
630         * rendering/RenderBox.cpp:
631         (WebCore::RenderBox::computeLogicalWidthUsing):
632         (WebCore::RenderBox::computeLogicalHeight):
633         (WebCore::RenderBox::computeLogicalHeightUsing):
634         (WebCore::RenderBox::computePercentageLogicalHeight):
635         (WebCore::RenderBox::computeReplacedLogicalWidth):
636         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
637         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
638         (WebCore::RenderBox::computeReplacedLogicalHeight):
639         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
640         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
641         * rendering/RenderBox.h:
642         * rendering/RenderIFrame.cpp:
643         (WebCore::RenderIFrame::computeLogicalWidth):
644         * rendering/RenderImage.cpp:
645         (WebCore::RenderImage::computeReplacedLogicalWidth):
646         (WebCore::RenderImage::computeReplacedLogicalHeight):
647         * rendering/RenderImage.h:
648         * rendering/RenderListBox.cpp:
649         (WebCore::RenderListBox::computePreferredLogicalWidths):
650         * rendering/RenderListMarker.cpp:
651         (WebCore::RenderListMarker::computePreferredLogicalWidths):
652         * rendering/RenderMenuList.cpp:
653         (WebCore::RenderMenuList::computePreferredLogicalWidths):
654         * rendering/RenderReplaced.cpp:
655         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
656         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
657         (WebCore::RenderReplaced::computePreferredLogicalWidths):
658         * rendering/RenderReplaced.h:
659         * rendering/RenderSlider.cpp:
660         (WebCore::RenderSlider::computePreferredLogicalWidths):
661         * rendering/RenderTable.cpp:
662         (WebCore::RenderTable::computeLogicalWidth):
663         * rendering/RenderTextControl.cpp:
664         (WebCore::RenderTextControl::computePreferredLogicalWidths):
665         * rendering/RenderVideo.cpp:
666         (WebCore::RenderVideo::computeReplacedLogicalWidth):
667         (WebCore::RenderVideo::computeReplacedLogicalHeight):
668         * rendering/RenderVideo.h:
669         * rendering/svg/RenderSVGForeignObject.cpp:
670         (WebCore::RenderSVGForeignObject::computeLogicalWidth):
671         (WebCore::RenderSVGForeignObject::computeLogicalHeight):
672         * rendering/svg/RenderSVGRoot.cpp:
673         (WebCore::RenderSVGRoot::computePreferredLogicalWidths):
674         (WebCore::RenderSVGRoot::computeIntrinsicWidth):
675         (WebCore::RenderSVGRoot::computeIntrinsicHeight):
676         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
677         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
678         (WebCore::RenderSVGRoot::layout):
679         * rendering/svg/RenderSVGRoot.h:
680
681 2011-06-23  Abhishek Arya  <inferno@chromium.org>
682
683         Reviewed by James Robinson.
684
685         In RenderBlock, RenderWidget and RenderReplaced destroy functions,
686         call dirtyLinesFromChangedChild to tell our parent that we are going away.
687         https://bugs.webkit.org/show_bug.cgi?id=60307
688
689         Test: fast/block/child-not-removed-from-parent-lineboxes-crash.html
690               fast/block/block-not-removed-from-parent-lineboxes-crash.html
691
692         * rendering/RenderBlock.cpp:
693         (WebCore::RenderBlock::destroy):
694         * rendering/RenderReplaced.cpp:
695         (WebCore::RenderReplaced::destroy):
696         * rendering/RenderReplaced.h:
697         * rendering/RenderWidget.cpp:
698         (WebCore::RenderWidget::destroy):
699
700 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
701
702         Speculative WinCE build correction.
703
704         * rendering/RenderThemeWin.cpp:
705         (WebCore::drawControl): Don't call setRGBABitmapAlpha
706           for WinCE case.
707
708 2011-06-29  Ryosuke Niwa  <rniwa@webkit.org>
709
710         Reviewed by Darin Adler.
711
712         REGRESSION(r89952): r89952 added a wrong assertion in visible_units.cpp
713         https://bugs.webkit.org/show_bug.cgi?id=63668
714
715         We need to assert the offset to be zero only when the position is NOT offset in node.
716
717         * editing/visible_units.cpp:
718         (WebCore::startOfParagraph):
719
720 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
721
722         Speculative WinCE build correction after r90057.
723
724         * CMakeListsWinCE.txt: Roll back r90061, since GetWorldTransform
725           is not available in WinCE.
726         * platform/win/ScrollbarThemeWin.cpp: Conditionally exclude calls
727           to DIBPixelData::setRGBABitmapAlpha for WinCE.
728         (WebCore::ScrollbarThemeWin::paintTrackPiece):
729         (WebCore::ScrollbarThemeWin::paintButton):
730         (WebCore::ScrollbarThemeWin::paintThumb):
731
732 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
733
734         Speculative WinCE build correction after r90057.
735
736         * CMakeListsWinCE.txt: Add missing DIBPixelData.cpp to
737         WinCE build to support setting bitmap image alpha value.
738
739 2011-06-29  Simon Fraser  <simon.fraser@apple.com>
740
741         Reviewed by Beth Dakin.
742
743         Lay some groundwork for rubber-banding in overflow:scroll divs
744         https://bugs.webkit.org/show_bug.cgi?id=63654
745
746         Make it possible for scrollTop and scrollLeft on a RenderLayer to be
747         set to negative values, which we will do during rubber-banding in
748         future. Continue to clamp programmatic scrolls, and scroll positions
749         set by layout between 0 and the max value.
750
751         Test: fast/layers/negative-scroll-positions.html
752
753         * rendering/RenderBox.cpp:
754         (WebCore::RenderBox::setScrollLeft):
755         (WebCore::RenderBox::setScrollTop):
756         * rendering/RenderLayer.cpp:
757         (WebCore::RenderLayer::scrollToOffset):
758         (WebCore::RenderLayer::scrollTo):
759         * rendering/RenderLayer.h:
760         (WebCore::RenderLayer::scrollToXOffset):
761         (WebCore::RenderLayer::scrollToYOffset):
762         * rendering/RenderTextControlSingleLine.cpp:
763         (WebCore::RenderTextControlSingleLine::forwardEvent):
764
765 2011-06-29  Anders Carlsson  <andersca@apple.com>
766
767         Reviewed by Simon Fraser.
768
769         RenderLayer::maximumScrollPosition() is wrong
770         https://bugs.webkit.org/show_bug.cgi?id=62667
771
772         * platform/ScrollableArea.h:
773         (WebCore::ScrollableArea::isVerticalScrollerPinnedToMinimumPosition):
774         (WebCore::ScrollableArea::isVerticalScrollerPinnedToMaximumPosition):
775         Add these for good measure; they will be needed in an upcoming patch.
776
777         * rendering/RenderLayer.cpp:
778         (WebCore::RenderLayer::maximumScrollPosition):
779         Subtract the visible content rect, including the scroll bars.
780
781 2011-06-29  Brent Fulgham  <bfulgham@webkit.org>
782
783         Speculative WinCE build correction after r90053.
784
785         * platform/graphics/GraphicsContext.h:
786         (WebCore::GraphicsContext::inTransparencyLayer): Provide
787         stub implementation for 'inTransparencyLayer'.
788
789 2011-06-29  Xu Fan  <qifuren1985@gmail.com>
790
791         Reviewed by Brent Fulgham.
792
793         Fix Scrollbars Transparent in Windows XP if WebKit is using Layered Window
794         https://bugs.webkit.org/show_bug.cgi?id=61136
795
796         * platform/graphics/win/DIBPixelData.h: add a static method setRGBABitmapAlpha
797         * platform/graphics/win/DIBPixelData.cpp: add implementation
798         * platform/win/ScrollbarThemeWin.cpp: fix scroolbar transparent
799         * rendering/RenderThemeWin.cpp: fix textbox and button transparent
800
801 2011-06-29  Emil A Eklund  <eae@chromium.org>
802
803         Reviewed by Eric Seidel.
804
805         Switch RenderBoxModelObject::margin* and setMargin* to to new layout types
806         https://bugs.webkit.org/show_bug.cgi?id=63652
807
808         Switch margin methods for render tree over to the new layout unit abstraction.
809
810         No new tests, no functionality changes.
811
812         * rendering/InlineFlowBox.h:
813         * rendering/RenderBlock.cpp:
814         * rendering/RenderBlock.h:
815         * rendering/RenderBox.cpp:
816         * rendering/RenderBox.h:
817         * rendering/RenderBoxModelObject.h:
818         * rendering/RenderInline.cpp:
819         * rendering/RenderInline.h:
820         * rendering/RenderText.h:
821
822 2011-06-29  Levi Weintraub  <leviw@chromium.org>
823
824         Reviewed by Eric Seidel.
825
826         Switch paint to new layout types
827         https://bugs.webkit.org/show_bug.cgi?id=63645
828
829         Switch vanilla paint function over to the new layout unit abstraction.
830
831         No new tests, no functionality changes.
832
833         * rendering/RenderBlock.cpp:
834         (WebCore::RenderBlock::paint):
835         * rendering/RenderBlock.h:
836         * rendering/RenderBox.cpp:
837         (WebCore::RenderBox::paint):
838         * rendering/RenderBox.h:
839         * rendering/RenderDetailsMarker.cpp:
840         (WebCore::RenderDetailsMarker::paint):
841         * rendering/RenderDetailsMarker.h:
842         * rendering/RenderEmbeddedObject.cpp:
843         (WebCore::RenderEmbeddedObject::paint):
844         * rendering/RenderEmbeddedObject.h:
845         * rendering/RenderFrameSet.cpp:
846         (WebCore::RenderFrameSet::paint):
847         * rendering/RenderFrameSet.h:
848         * rendering/RenderImage.cpp:
849         (WebCore::RenderImage::paint):
850         * rendering/RenderImage.h:
851         * rendering/RenderInline.cpp:
852         (WebCore::RenderInline::paint):
853         * rendering/RenderInline.h:
854         * rendering/RenderLineBoxList.h:
855         * rendering/RenderListItem.cpp:
856         (WebCore::RenderListItem::paint):
857         * rendering/RenderListItem.h:
858         * rendering/RenderListMarker.cpp:
859         (WebCore::RenderListMarker::paint):
860         * rendering/RenderListMarker.h:
861         * rendering/RenderObject.h:
862         * rendering/RenderReplaced.cpp:
863         (WebCore::RenderReplaced::paint):
864         * rendering/RenderReplaced.h:
865         * rendering/RenderReplica.cpp:
866         (WebCore::RenderReplica::paint):
867         * rendering/RenderReplica.h:
868         * rendering/RenderTable.cpp:
869         (WebCore::RenderTable::paint):
870         * rendering/RenderTable.h:
871         * rendering/RenderTableCell.cpp:
872         (WebCore::RenderTableCell::paint):
873         * rendering/RenderTableCell.h:
874         * rendering/RenderTableRow.cpp:
875         (WebCore::RenderTableRow::paint):
876         * rendering/RenderTableRow.h:
877         * rendering/RenderTableSection.cpp:
878         (WebCore::RenderTableSection::paint):
879         * rendering/RenderTableSection.h:
880         * rendering/RenderTextControlSingleLine.cpp:
881         (WebCore::RenderTextControlSingleLine::paint):
882         * rendering/RenderTextControlSingleLine.h:
883         * rendering/RenderTheme.h:
884         * rendering/RenderView.cpp:
885         (WebCore::RenderView::paint):
886         * rendering/RenderView.h:
887         * rendering/RenderWidget.cpp:
888         (WebCore::RenderWidget::paint):
889         * rendering/RenderWidget.h:
890         * rendering/mathml/RenderMathMLBlock.h:
891         * rendering/mathml/RenderMathMLFraction.h:
892         * rendering/mathml/RenderMathMLRoot.h:
893         * rendering/mathml/RenderMathMLSquareRoot.h:
894         * rendering/svg/RenderSVGContainer.h:
895         * rendering/svg/RenderSVGForeignObject.h:
896         * rendering/svg/RenderSVGHiddenContainer.h:
897         * rendering/svg/RenderSVGImage.h:
898         * rendering/svg/RenderSVGPath.h:
899         * rendering/svg/RenderSVGRoot.cpp:
900         (WebCore::RenderSVGRoot::paint):
901         * rendering/svg/RenderSVGRoot.h:
902         * rendering/svg/RenderSVGText.h:
903
904 2011-06-29  Jian Li  <jianli@chromium.org>
905
906         Reviewed by Kenneth Russell.
907
908         WebGL test failing on SL bots: fast/canvas/webgl/data-view-test.html 
909         https://bugs.webkit.org/show_bug.cgi?id=63151
910
911         The fix is to change to throw TypeError in custom JS/V8 bindings.
912
913         * bindings/js/JSDataViewCustom.cpp:
914         (WebCore::getDataViewMember):
915         (WebCore::setDataViewMember):
916         * bindings/v8/custom/V8DataViewCustom.cpp:
917         (WebCore::V8DataView::constructorCallback):
918         (WebCore::V8DataView::getInt8Callback):
919
920 2011-06-29  Luke Macpherson   <macpherson@chromium.org>
921
922         Reviewed by Darin Adler.
923
924         Convert uses of computeLengthIntForLength() to computeLength<Length>()
925         https://bugs.webkit.org/show_bug.cgi?id=63641
926
927         No new tests / refactoring only.
928
929         * css/CSSStyleSelector.cpp:
930         (WebCore::convertToLength):
931         (WebCore::CSSStyleSelector::applyProperty):
932         (WebCore::CSSStyleSelector::applyPageSizeProperty):
933         (WebCore::CSSStyleSelector::mmLength):
934         (WebCore::CSSStyleSelector::inchLength):
935         (WebCore::CSSStyleSelector::mapFillSize):
936         (WebCore::CSSStyleSelector::mapFillXPosition):
937         (WebCore::CSSStyleSelector::mapFillYPosition):
938
939 2011-06-29  Chris Rogers  <crogers@google.com>
940
941         Reviewed by Kenneth Russell.
942
943         Simplify AudioBufferSourceNode rendering
944         https://bugs.webkit.org/show_bug.cgi?id=63586
945
946         No new tests since this doesn't change API.
947
948         * webaudio/AudioBufferSourceNode.cpp:
949         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
950         (WebCore::AudioBufferSourceNode::process):
951         (WebCore::AudioBufferSourceNode::renderFromBuffer):
952         (WebCore::AudioBufferSourceNode::reset):
953         (WebCore::AudioBufferSourceNode::setBuffer):
954         (WebCore::AudioBufferSourceNode::noteOn):
955         (WebCore::AudioBufferSourceNode::noteGrainOn):
956         (WebCore::AudioBufferSourceNode::totalPitchRate):
957         * webaudio/AudioBufferSourceNode.h:
958
959 2011-06-29  Martin Robinson  <mrobinson@igalia.com>
960
961         Reviewed by Xan Lopez.
962
963         [Freetype] Many tests report ERROR: Failed to get glyph page zero.
964         https://bugs.webkit.org/show_bug.cgi?id=63498
965
966         Instead of conditionally instantiating the m_scaledFont member of FontPlatformData,
967         always instantiate it. For times when the size is 0 and the instantiation would lead
968         to a Cairo error, we use size 1 and just make operations which would fail conditional
969         on the m_size > 0.
970
971         No new tests. This change is covered by existing tests. We should
972         observe no errors on the bots after landing.
973
974         * platform/graphics/cairo/FontCairo.cpp:
975         (WebCore::Font::drawGlyphs): Instead of looking at whether or not there is
976         a scaled font to determine whether to draw, just look at the size.
977         * platform/graphics/freetype/FontPlatformData.h: Remove the m_font member.
978         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Always instantiate
979         a scaled font member and remove references to m_font. If we are instantiating
980         a scaled font for a 0 size font, instantiate a size 1 font, so that we can
981         still use Cairo to query font properties.
982         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
983         (WebCore::GlyphPage::fill): We can assume there is always a scaled font now.
984         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
985         (WebCore::SimpleFontData::platformInit): Ditto.
986         (WebCore::SimpleFontData::createScaledFontData): Ditto.
987         (WebCore::SimpleFontData::containsCharacters): Ditto.
988         (WebCore::SimpleFontData::platformWidthForGlyph): Ditto.
989
990 2011-06-29  Eric Carlson  <eric.carlson@apple.com>
991
992         Reviewed by Darin Adler.
993
994         Media element loads blocked by a resource load delegate do not generate an error event
995         https://bugs.webkit.org/show_bug.cgi?id=63558
996
997         Tests: media/media-blocked-by-beforeload.html
998                media/media-blocked-by-willsendrequest.html
999
1000         * html/HTMLMediaElement.cpp:
1001         (WebCore::HTMLMediaElement::selectMediaResource): Call mediaLoadingFailed instead of noneSupported
1002             so all failures follow the same code path.
1003         (WebCore::HTMLMediaElement::loadResource): Call mediaLoadingFailed when there is no frame, when 
1004             the loader delegate rejects the url, or when MediaPlayer doesn't find a media engine that
1005             supports the type.
1006         (WebCore::HTMLMediaElement::selectNextSourceChild): Fix incorrect logging.
1007         (WebCore::HTMLMediaElement::mediaLoadingFailed): Change name of parameter from "state" to
1008             "error" to make its purpose obvious.
1009
1010         * platform/graphics/MediaPlayer.cpp:
1011         (WebCore::MediaPlayer::load): Return a bool indicating whether or not the url was given to
1012             a media engine.
1013         (WebCore::MediaPlayer::loadWithNextMediaEngine): Add some logging.
1014         * platform/graphics/MediaPlayer.h:
1015
1016 2011-06-29  Darin Adler  <darin@apple.com>
1017
1018         Reviewed by Anders Carlsson.
1019
1020         [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded
1021         https://bugs.webkit.org/show_bug.cgi?id=63483
1022
1023         Test: fast/loader/create-frame-in-DOMContentLoaded.html
1024
1025         * loader/FrameLoader.cpp:
1026         (WebCore::FrameLoader::init): Added an assertion.
1027         (WebCore::FrameLoader::finishedLoadingDocument): Removed a non-helpful #if
1028         statement. The rule that we do not call the client when creating the initial
1029         empty document was nominally specific to Windows and Chromium but is needed
1030         for all platforms.
1031
1032 2011-06-29  Emil A Eklund  <eae@chromium.org>
1033
1034         Reviewed by Darin Adler.
1035
1036         Switch hitTestColumns/Contents/Floats to to new layout types
1037         https://bugs.webkit.org/show_bug.cgi?id=63589
1038
1039         Switch location and size methods for RenderBox over to the new layout unit abstraction.
1040
1041         No new tests, no functionality changes.
1042
1043         * rendering/ColumnInfo.h:
1044         (WebCore::ColumnInfo::desiredColumnWidth):
1045         (WebCore::ColumnInfo::setDesiredColumnWidth):
1046         (WebCore::ColumnInfo::columnHeight):
1047         (WebCore::ColumnInfo::setColumnCountAndHeight):
1048         (WebCore::ColumnInfo::setColumnHeight):
1049         (WebCore::ColumnInfo::updateMinimumColumnHeight):
1050         (WebCore::ColumnInfo::minimumColumnHeight):
1051         * rendering/RenderBlock.cpp:
1052         (WebCore::RenderBlock::addOverflowFromChildren):
1053         (WebCore::RenderBlock::paintColumnRules):
1054         (WebCore::RenderBlock::paintColumnContents):
1055         (WebCore::RenderBlock::hitTestFloats):
1056         (WebCore::RenderBlock::hitTestColumns):
1057         (WebCore::RenderBlock::hitTestContents):
1058         (WebCore::RenderBlock::columnRectAt):
1059         * rendering/RenderBlock.h:
1060         (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
1061         (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
1062         * rendering/RenderLayer.cpp:
1063         (WebCore::RenderLayer::hitTestContents):
1064         * rendering/RenderLayer.h:
1065
1066 2011-06-29  Adrienne Walker  <enne@google.com>
1067
1068         Reviewed by James Robinson.
1069
1070         [chromium] Divide by zero in TilingData
1071         https://bugs.webkit.org/show_bug.cgi?id=63305
1072
1073         Add safety checks for empty layers.
1074
1075         * platform/graphics/chromium/LayerTilerChromium.cpp:
1076         (WebCore::LayerTilerChromium::prepareToUpdate):
1077         (WebCore::LayerTilerChromium::reset):
1078         (WebCore::LayerTilerChromium::updateRect):
1079
1080 2011-06-29  Dimitri Glazkov  <dglazkov@chromium.org>
1081
1082         Reviewed by Adam Barth.
1083
1084         Extract setShadowRoot function, harden it in preparation to be exposed to script.
1085         https://bugs.webkit.org/show_bug.cgi?id=63596
1086
1087         Refactoring, covered by existing tests.
1088
1089         * dom/Element.cpp:
1090         (WebCore::validateShadowRoot): Added.
1091         (WebCore::Element::setShadowRoot): Extracted from ensureShadowRoot.
1092         (WebCore::Element::ensureShadowRoot): Changed to use setShadowRoot.
1093         * dom/Element.h: Added decl.
1094
1095 2011-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
1096
1097         Reviewed by Pavel Feldman.
1098
1099         Web Inspector: REGRESSION Resource revision fails to request content if it was not yet loaded for resource.
1100         https://bugs.webkit.org/show_bug.cgi?id=63631
1101
1102         Test: http/tests/inspector/network/network-request-revision-content.html
1103
1104         * inspector/front-end/Resource.js:
1105         (WebInspector.ResourceRevision.prototype.requestContent):
1106
1107 2011-06-29  Igor Oliveira  <igor.oliveira@openbossa.org>
1108
1109         Reviewed by Andreas Kling.
1110
1111         [Qt] GraphicsContext::clipToImageBuffer does not support scale transformation
1112         https://bugs.webkit.org/show_bug.cgi?id=63555
1113
1114         Scale alphaMask if GraphicsContext is scaled
1115
1116         * platform/graphics/qt/GraphicsContextQt.cpp:
1117         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
1118         * platform/graphics/qt/ImageBufferQt.cpp:
1119         (WebCore::ImageBuffer::clip):
1120
1121 2011-06-29  Andrey Kosyakov  <caseq@chromium.org>
1122
1123         Reviewed by Pavel Feldman.
1124
1125         Web Inspector: backend needs to provide system-unique object ids, so these remain unique across navigation
1126         https://bugs.webkit.org/show_bug.cgi?id=62894
1127
1128         * inspector/InspectorController.cpp:
1129         (WebCore::InspectorController::setAgentProcessIdentifier):
1130         * inspector/InspectorController.h:
1131         * inspector/InspectorPageAgent.cpp:
1132         (WebCore::InspectorPageAgent::setAgentIdentifier):
1133         (WebCore::InspectorPageAgent::createIdentifier):
1134         (WebCore::InspectorPageAgent::frameForId):
1135         (WebCore::InspectorPageAgent::frameId):
1136         (WebCore::InspectorPageAgent::frameDestroyed):
1137         * inspector/InspectorPageAgent.h:
1138
1139 2011-06-29  Pavel Feldman  <pfeldman@google.com>
1140
1141         Reviewed by Yury Semikhatsky.
1142
1143         Web Inspector: create status bar buttons programmatically. Add "Inspect" button to all panels.
1144         https://bugs.webkit.org/show_bug.cgi?id=63450
1145
1146         Buttons should be created in code, not in HTML. Also making Inspect Element
1147         action available on all panels (as an experiment).
1148
1149         * inspector/front-end/ConsoleView.js:
1150         (WebInspector.ConsoleView.prototype.show):
1151         (WebInspector.ConsoleView.prototype.hide):
1152         * inspector/front-end/ElementsPanel.js:
1153         (WebInspector.ElementsPanel):
1154         (WebInspector.ElementsPanel.prototype.get statusBarItems):
1155         (WebInspector.ElementsPanel.prototype.updateFocusedNode):
1156         (WebInspector.ElementsPanel.prototype._setSearchingForNode):
1157         (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
1158         * inspector/front-end/inspector.css:
1159         (button.dock-status-bar-item.status-bar-item .glyph):
1160         (button.dock-status-bar-item.status-bar-item.toggled-on .glyph):
1161         (.console-status-bar-item .glyph):
1162         * inspector/front-end/inspector.html:
1163         * inspector/front-end/inspector.js:
1164         (WebInspector._createGlobalStatusBarItems):
1165         (WebInspector.set attached):
1166
1167 2011-06-29  Pavel Feldman  <pfeldman@google.com>
1168
1169         Reviewed by Yury Semikhatsky.
1170
1171         Web Inspector: tab crash after deleting trailing quote when editing attribute
1172         https://bugs.webkit.org/show_bug.cgi?id=63544
1173
1174         * inspector/InspectorDOMAgent.cpp:
1175         (WebCore::InspectorDOMAgent::setAttributesText):
1176         * inspector/front-end/ElementsTreeOutline.js:
1177         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded):
1178         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
1179
1180 2011-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
1181
1182         Reviewed by Pavel Feldman.
1183
1184         Web Inspector: REGRESSION Inspector failing to load resource content after navigation. Safari.
1185         https://bugs.webkit.org/show_bug.cgi?id=63480
1186
1187         * inspector/front-end/NetworkManager.js:
1188         (WebInspector.NetworkDispatcher):
1189         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1190
1191 2011-06-29  Mike West  <mkwst@chromium.org>
1192
1193         Reviewed by Pavel Feldman.
1194
1195         Web Inspector: Missing fields in HAR
1196         https://bugs.webkit.org/show_bug.cgi?id=58127
1197         
1198         Specifically, this patch adds:
1199         - entry.request.httpVersion
1200         - entry.request.headersSize
1201         - entry.request.bodySize
1202         - entry.response.httpVersion
1203         - entry.response.headersSize
1204         - entry.response.bodySize
1205         - entry.response.content.compression
1206         
1207         Tests: http/tests/inspector/resource-har-conversion.html
1208                http/tests/inspector/resource-har-headers.html
1209                http/tests/inspector/resource-parameters.html
1210                http/tests/inspector/network/network-size.html
1211
1212         * inspector/front-end/HAREntry.js:
1213         (WebInspector.HAREntry.prototype.build):
1214         (WebInspector.HAREntry.prototype._buildRequest):
1215         (WebInspector.HAREntry.prototype._buildResponse):
1216         (WebInspector.HAREntry.prototype._buildContent):
1217         (WebInspector.HAREntry.prototype._buildCookie):
1218         (WebInspector.HAREntry.prototype._interval):
1219         (WebInspector.HAREntry.prototype.get requestBodySize):
1220         (WebInspector.HAREntry.prototype.get responseBodySize):
1221         (WebInspector.HAREntry.prototype.get responseCompression):
1222         (WebInspector.HARLog.prototype.build):
1223         * inspector/front-end/Resource.js:
1224         (WebInspector.Resource.prototype.set requestHeaders):
1225         (WebInspector.Resource.prototype.get requestHeadersText):
1226         (WebInspector.Resource.prototype.set requestHeadersText):
1227         (WebInspector.Resource.prototype.get requestHeadersSize):
1228         (WebInspector.Resource.prototype.get requestHttpVersion):
1229         (WebInspector.Resource.prototype.set responseHeaders):
1230         (WebInspector.Resource.prototype.get responseHeadersText):
1231         (WebInspector.Resource.prototype.set responseHeadersText):
1232         (WebInspector.Resource.prototype.get responseHeadersSize):
1233         (WebInspector.Resource.prototype.get responseHttpVersion):
1234
1235 2011-06-29  Hayato Ito  <hayato@chromium.org>
1236
1237         Reviewed by Hajime Morita.
1238
1239         Make a shadow host transfer a focus to the first focusable element in the shadow root when its focus() is called.
1240         https://bugs.webkit.org/show_bug.cgi?id=62358.
1241
1242         This patch doesn't take an effect on the following elements to keep a compatibility.
1243         - <input>, <textarea>, <video> and <audio> elements
1244         We'll address these elements separately after re-targeting focus events
1245         (bug 61421) is implemented.
1246
1247         A shadow root's <content> is not considered in this patch.
1248         That should be addressed in another patch. See bug 63522.
1249
1250         Test: fast/dom/shadow/shadow-host-transfer-focus.html
1251
1252         * dom/Element.cpp:
1253         (WebCore::Element::focus):
1254         * page/FocusController.cpp:
1255         (WebCore::shadowRoot):
1256         (WebCore::isTreeScopeOwner):
1257         (WebCore::FocusController::transferFocusToElementInShadowRoot):
1258         (WebCore::hasCustomFocusLogic):
1259         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot):
1260         (WebCore::FocusController::advanceFocusInDocumentOrder):
1261         (WebCore::ownerOfTreeScope):
1262         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
1263         * page/FocusController.h:
1264
1265 2011-06-29  Ryan Sleevi  <rsleevi@chromium.org>
1266
1267         Reviewed by Dirk Schulze.
1268
1269         SVGRadialGradientElement::selfHasRelativeLengths() doesn't consider if cx() is relative
1270         https://bugs.webkit.org/show_bug.cgi?id=61600
1271
1272         Correct the logic for checking for relative lengths in a SVGRadialGradientElement to consider cx() in addition to cy()
1273         
1274         No new tests, as there is no way to currently test this. With the bug present, a side-effect is causing the
1275         expected/correct image to be rendered. This is because the cached SVG resource is getting invalided through a
1276         different path, forcing a repaint. The repaint takes into consideration the proper dimensions, hiding the bug.
1277
1278         * svg/SVGRadialGradientElement.cpp:
1279         (WebCore::SVGRadialGradientElement::selfHasRelativeLengths):
1280
1281 2011-06-28  Dirk Schulze  <krit@webkit.org>
1282
1283         Reviewed by Nikolas Zimmermann.
1284
1285         SVGAnimatedType should support SVGBoolean animation
1286         https://bugs.webkit.org/show_bug.cgi?id=63529
1287
1288         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
1289         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGBoolean.
1290         
1291         The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed
1292         to support animVal and baseVal later.
1293
1294         Test: svg/animations/svgboolean-animation-1.html
1295
1296         * CMakeLists.txt: Add new file to build system.
1297         * GNUmakefile.list.am: Ditto.
1298         * WebCore.gypi: Ditto.
1299         * WebCore.pro: Ditto.
1300         * WebCore.xcodeproj/project.pbxproj: Ditto.
1301         * svg/SVGAllInOne.cpp: Ditto.
1302         * svg/SVGAnimateElement.cpp: Make use of AnimatedBoolean.
1303         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
1304         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1305         (WebCore::SVGAnimateElement::calculateFromAndToValues):
1306         (WebCore::SVGAnimateElement::calculateFromAndByValues):
1307         (WebCore::SVGAnimateElement::resetToBaseValue):
1308         (WebCore::SVGAnimateElement::applyResultsToTarget):
1309         (WebCore::SVGAnimateElement::calculateDistance):
1310         * svg/SVGAnimatedBoolean.cpp: Added. New animator for SVGBoolean.
1311         (WebCore::SVGAnimatedBooleanAnimator::SVGAnimatedBooleanAnimator):
1312         (WebCore::SVGAnimatedBooleanAnimator::constructFromString):
1313         (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndToValues):
1314         (WebCore::SVGAnimatedBooleanAnimator::calculateFromAndByValues):
1315         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
1316         (WebCore::SVGAnimatedBooleanAnimator::calculateDistance):
1317         * svg/SVGAnimatedBoolean.h:
1318         (WebCore::SVGAnimatedBooleanAnimator::~SVGAnimatedBooleanAnimator):
1319         * svg/SVGAnimatedType.cpp: Use bool for SVGBoolean.
1320         (WebCore::SVGAnimatedType::~SVGAnimatedType):
1321         (WebCore::SVGAnimatedType::createBoolean):
1322         (WebCore::SVGAnimatedType::boolean):
1323         (WebCore::SVGAnimatedType::valueAsString):
1324         (WebCore::SVGAnimatedType::setValueAsString):
1325         * svg/SVGAnimatedType.h:
1326         * svg/SVGAnimatorFactory.h: New crate function for SVGAnimatedSVGBooleanAnimator.
1327         (WebCore::SVGAnimatorFactory::create):
1328
1329 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1330
1331         Reviewed by Adam Barth.
1332
1333         Make applyAuthorSheets settable on ShadowRoot.
1334         https://bugs.webkit.org/show_bug.cgi?id=63599
1335
1336         Refactoring and adding not-yet used function, tests to follow when API lands.
1337
1338         * dom/ShadowRoot.cpp:
1339         (WebCore::ShadowRoot::ShadowRoot): Added initializer.
1340         (WebCore::ShadowRoot::applyAuthorSheets): Made to use member variable.
1341         (WebCore::ShadowRoot::setApplyAuthorSheets): Added.
1342         * dom/ShadowRoot.h: Tweaked, added decls.
1343
1344 2011-06-28  Ilya Sherman  <isherman@chromium.org>
1345
1346         Reviewed by Adam Barth.
1347
1348         form.autocomplete="off" does not work
1349         Rename the autoComplete() method for HTMLFormElement, HTMLFormControlElementWithState, and HTMLInputElement to shouldAutocomplete()
1350         Add the autocomplete attribute to HTMLFormElement.idl and HTMLInputElement.idl
1351         https://bugs.webkit.org/show_bug.cgi?id=35823
1352
1353         Test: fast/forms/autocomplete.html
1354
1355         * html/HTMLFormControlElement.cpp:
1356         (WebCore::HTMLFormControlElementWithState::shouldAutocomplete): Renamed from ::autoComplete()
1357         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState): Update callsite.
1358         * html/HTMLFormControlElement.h:
1359         * html/HTMLFormElement.cpp:
1360         (WebCore::HTMLFormElement::~HTMLFormElement): Update callsite.
1361         (WebCore::HTMLFormElement::parseMappedAttribute): Update callsite.
1362         (WebCore::HTMLFormElement::documentDidBecomeActive): Update callsite.
1363         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Update callsite.
1364         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Update callsite.
1365         (WebCore::HTMLFormElement::shouldAutocomplete): Renamed from ::autoComplete()
1366         * html/HTMLFormElement.h:
1367         * html/HTMLFormElement.idl: Bind the autocomplete attribute to a JavaScript property.
1368         * html/HTMLInputElement.cpp:
1369         (WebCore::HTMLInputElement::shouldAutocomplete): Renamed from ::autoComplete()
1370         * html/HTMLInputElement.h:
1371         * html/HTMLInputElement.idl: Bind the autocomplete attribute to a JavaScript property.
1372         * WebCore.exp.in: Updated autoComplete() -> shouldAutocomplete()
1373
1374 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1375
1376         Reviewed by Kent Tamura.
1377
1378         Store shadowPseudoId in ElementRareData.
1379         https://bugs.webkit.org/show_bug.cgi?id=63604
1380
1381         No new tests, because the code isn't yet used.
1382
1383         * css/CSSSelector.cpp:
1384         (WebCore::CSSSelector::isUnknownPseudoType): Added convenience helper.
1385         * css/CSSSelector.h: Added decl.
1386         * dom/Element.cpp:
1387         (WebCore::Element::shadowPseudoId): Changed to use ElementRareData.
1388         (WebCore::Element::setShadowPseudoId): Ditto.
1389         * dom/Element.h: Added decls.
1390         * dom/ElementRareData.h: Added a member to keep shadowPseudoId.
1391
1392 2011-06-28  Kenichi Ishibashi  <bashi@chromium.org>
1393
1394         Reviewed by Tony Chang.
1395
1396         [Chromium] Remove dependencies on harfbuzz from FontPlatformDataLinux and FontLinux
1397         https://bugs.webkit.org/show_bug.cgi?id=62530
1398
1399         - Moved codes of FontLinux which depend on harfbuzz APIs to ComplexTextController.  Removed Some methods of ComplexTextController(advances() and logClusters()) since they are no longer needed.
1400         - Moved RefCountedHarfbuzzFace from FontPlatformDataLinux to HarfbuzzSkia and renamed it to HarfbuzzFace.
1401
1402         No new tests because there is no behavior change (The existing tests should cover the changes).
1403
1404         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
1405         (WebCore::ComplexTextController::ComplexTextController): Added arguments so eliminating setter invocations.
1406         (WebCore::ComplexTextController::setupForRTL): Added.
1407         (WebCore::ComplexTextController::setupFontForScriptRun): Adopt the change of HarfbuzzFace class.
1408         (WebCore::ComplexTextController::setGlyphPositions): Use m_item.log_clusters instead of removed method.
1409         (WebCore::ComplexTextController::glyphIndexForXPositionInScriptRun): Added.
1410         (WebCore::ComplexTextController::offsetForPosition): Ditto.
1411         (WebCore::ComplexTextController::selectionRect): Ditto.
1412         * platform/graphics/chromium/ComplexTextControllerLinux.h:
1413         (WebCore::ComplexTextController::width):
1414         * platform/graphics/chromium/FontLinux.cpp: Removed truncateFixedPointToInteger().
1415         (WebCore::Font::drawComplexText): Removed setter invocations of ComplexTextController.
1416         (WebCore::Font::floatWidthForComplexText): Ditto.
1417         (WebCore::Font::offsetForPositionForComplexText): Moved harfbuzz dependent code to ComplexTextController.
1418         (WebCore::Font::selectionRectForComplexText): Ditto.
1419         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1420         (WebCore::FontPlatformData::harfbuzzFace): Wrapped up HB_FaceRec in HarfbuzzFace class.
1421         * platform/graphics/chromium/FontPlatformDataLinux.h: Moved RefCountedHarfbuzzFace class and renamed to HarfbuzzFace.
1422         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1423         (WebCore::allocHarfbuzzFont): Moved from ComplexTextControllerLinux.cpp.
1424         (WebCore::HarfbuzzFace::HarfbuzzFace): Added.
1425         (WebCore::HarfbuzzFace::~HarfbuzzFace): Added.
1426         * platform/graphics/chromium/HarfbuzzSkia.h:
1427         (WebCore::HarfbuzzFace::create): Added.
1428         (WebCore::HarfbuzzFace::face): Added.
1429         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
1430         (WebCore::substituteWithVerticalGlyphs): Adopt  the change of HarfbuzzFace class.
1431
1432 2011-06-28  Roland Steiner  <rolandsteiner@chromium.org>
1433
1434         Reviewed by Eric Seidel.
1435
1436         Bug 55930 - (CVE-2011-1440) Incorrect handling of 'display:' property within nested <ruby> tags
1437         https://bugs.webkit.org/show_bug.cgi?id=55930
1438
1439         Don't set style type BEFORE/AFTER on anonymous wrapper block.
1440         Rather, check style type on generated wrapped child.
1441
1442         Tests: fast/ruby/generated-after-counter-doesnt-crash.html
1443                fast/ruby/generated-before-and-after-counter-doesnt-crash.html
1444                fast/ruby/generated-before-counter-doesnt-crash.html
1445
1446         * rendering/RenderRuby.cpp:
1447         (WebCore::isAnonymousRubyInlineBlock):
1448         (WebCore::isRubyBeforeBlock):
1449         (WebCore::isRubyAfterBlock):
1450         (WebCore::rubyBeforeBlock):
1451         (WebCore::rubyAfterBlock):
1452         (WebCore::createAnonymousRubyInlineBlock):
1453         (WebCore::RenderRubyAsInline::addChild):
1454         (WebCore::RenderRubyAsBlock::addChild):
1455
1456 2011-06-28  Emil A Eklund  <eae@chromium.org>
1457
1458         Reviewed by Eric Seidel.
1459
1460         Switch RenderLayer position/size to to new layout types
1461         https://bugs.webkit.org/show_bug.cgi?id=63578
1462
1463         Switch location and size methods for RenderLayer over to the new layout unit abstraction.
1464         
1465         No new tests, no functionality changes.
1466
1467         * rendering/RenderLayer.cpp:
1468         (WebCore::RenderLayer::resize):
1469         (WebCore::RenderLayer::visibleHeight):
1470         (WebCore::RenderLayer::visibleWidth):
1471         (WebCore::RenderLayer::offsetFromResizeCorner):
1472         * rendering/RenderLayer.h:
1473         (WebCore::RenderLayer::location):
1474         (WebCore::RenderLayer::setLocation):
1475         (WebCore::RenderLayer::size):
1476         (WebCore::RenderLayer::setSize):
1477         (WebCore::RenderLayer::rect):
1478         (WebCore::RenderLayer::renderBoxLocation):
1479         (WebCore::RenderLayer::renderBoxX):
1480         (WebCore::RenderLayer::renderBoxY):
1481         * rendering/RenderListBox.cpp:
1482         (WebCore::RenderListBox::visibleHeight):
1483         (WebCore::RenderListBox::visibleWidth):
1484         * rendering/RenderListBox.h:
1485
1486 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1487
1488         Reviewed by Eric Seidel.
1489
1490         Switch paintObject and paintReplaced to new layout types
1491         https://bugs.webkit.org/show_bug.cgi?id=63585
1492
1493         Switching paintObject and paintReplaced to layout type abstractions from more integral types.
1494
1495         No new tests as this is just moving to an abstraction.
1496
1497         * rendering/RenderBlock.cpp:
1498         (WebCore::RenderBlock::paintObject):
1499         * rendering/RenderBlock.h:
1500         * rendering/RenderBox.h:
1501         (WebCore::RenderBox::paintObject):
1502         * rendering/RenderEmbeddedObject.cpp:
1503         (WebCore::RenderEmbeddedObject::paintReplaced):
1504         * rendering/RenderEmbeddedObject.h:
1505         * rendering/RenderFileUploadControl.cpp:
1506         (WebCore::RenderFileUploadControl::paintObject):
1507         * rendering/RenderFileUploadControl.h:
1508         * rendering/RenderHTMLCanvas.cpp:
1509         (WebCore::RenderHTMLCanvas::paintReplaced):
1510         * rendering/RenderHTMLCanvas.h:
1511         * rendering/RenderImage.cpp:
1512         (WebCore::RenderImage::paintReplaced):
1513         * rendering/RenderImage.h:
1514         * rendering/RenderListBox.cpp:
1515         (WebCore::RenderListBox::paintObject):
1516         * rendering/RenderListBox.h:
1517         * rendering/RenderReplaced.h:
1518         (WebCore::RenderReplaced::paintReplaced):
1519         * rendering/RenderTable.cpp:
1520         (WebCore::RenderTable::paintObject):
1521         * rendering/RenderTable.h:
1522         * rendering/RenderTableSection.cpp:
1523         (WebCore::RenderTableSection::paintObject):
1524         * rendering/RenderTableSection.h:
1525         * rendering/RenderTextControl.cpp:
1526         (WebCore::RenderTextControl::paintObject):
1527         * rendering/RenderTextControl.h:
1528         * rendering/RenderVideo.cpp:
1529         (WebCore::RenderVideo::paintReplaced):
1530         * rendering/RenderVideo.h:
1531
1532 2011-06-28  Adam Langley  <agl@chromium.org>
1533
1534         Reviewed by Adam Barth.
1535
1536         Skip cache validation on back with HTTPS.
1537         https://bugs.webkit.org/show_bug.cgi?id=63537
1538
1539         For back navigations over HTTP, WebKit sets a flag to use cached data
1540         irrespective of whether it has expired. However, this isn't currently
1541         done for HTTPS.
1542
1543         The logic in question was added in
1544         https://bugs.webkit.org/show_bug.cgi?id=33993 and appears to have been
1545         precautionary. However, both Firefox and IE will use this back
1546         navigation trick for HTTPS as well and so we should probably behave
1547         likewise.
1548
1549         Test: http/tests/cache/history-only-cached-subresource-loads-max-age-https.html
1550
1551         * loader/FrameLoader.cpp:
1552         (WebCore::FrameLoader::addExtraFieldsToRequest):
1553
1554 2011-06-28  Dimitri Glazkov  <dglazkov@chromium.org>
1555
1556         Reviewed by Adam Barth.
1557
1558         Remove errant isShadowBoundary on ShadowRoot.
1559         https://bugs.webkit.org/show_bug.cgi?id=63588
1560
1561         Removing dead code, no tests for that.
1562
1563         * dom/ShadowRoot.h: Removed a function that's no longer used.
1564
1565 2011-06-28  Zeng Huiqing  <huiqing.zeng@intel.com>
1566
1567         Reviewed by Kenneth Russell.
1568
1569         [chromium]Optimize GraphicsLayerChromium::setChildren()
1570         https://bugs.webkit.org/show_bug.cgi?id=62837
1571
1572         No new tests. 
1573
1574         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1575         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
1576         (WebCore::GraphicsLayerChromium::setChildren):
1577         (WebCore::GraphicsLayerChromium::addChild):
1578         * platform/graphics/chromium/GraphicsLayerChromium.h:
1579
1580 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1581
1582         Reviewed by Eric Seidel.
1583
1584         Switch paintBoxShadow and paintBoxDecorations to new layout types
1585         https://bugs.webkit.org/show_bug.cgi?id=63577
1586
1587         Switching paintBoxShadow and paintBoxDecorations to layout type abstraction 
1588         from more integral types.
1589
1590         No new tests as this is just moving to an abstraction.
1591
1592         * rendering/InlineFlowBox.cpp:
1593         (WebCore::InlineFlowBox::paintBoxShadow):
1594         (WebCore::InlineFlowBox::paintBoxDecorations):
1595         * rendering/InlineFlowBox.h:
1596         * rendering/RenderBox.cpp:
1597         (WebCore::RenderBox::paintBoxDecorations):
1598         * rendering/RenderBox.h:
1599         * rendering/RenderBoxModelObject.cpp:
1600         (WebCore::RenderBoxModelObject::paintBoxShadow):
1601         * rendering/RenderBoxModelObject.h:
1602         * rendering/RenderFieldset.cpp:
1603         (WebCore::RenderFieldset::paintBoxDecorations):
1604         * rendering/RenderFieldset.h:
1605         * rendering/RenderTable.cpp:
1606         (WebCore::RenderTable::paintBoxDecorations):
1607         * rendering/RenderTable.h:
1608         * rendering/RenderTableCell.cpp:
1609         (WebCore::RenderTableCell::paintBoxDecorations):
1610         * rendering/RenderTableCell.h:
1611         * rendering/RenderView.cpp:
1612         (WebCore::RenderView::paintBoxDecorations):
1613         * rendering/RenderView.h:
1614
1615 2011-06-28  Emil A Eklund  <eae@chromium.org>
1616
1617         Reviewed by Eric Seidel.
1618
1619         Switch RenderBox position/size to to new layout types
1620         https://bugs.webkit.org/show_bug.cgi?id=63571
1621
1622         Switch location and size methods for RenderBox over to the new layout unit abstraction.
1623
1624         No new tests, no functionality changes.
1625
1626         * rendering/RenderBox.cpp:
1627         * rendering/RenderBox.h:
1628         * rendering/RenderBoxModelObject.cpp:
1629         * rendering/RenderBoxModelObject.h:
1630         * rendering/RenderInline.cpp:
1631         * rendering/RenderInline.h:
1632         * rendering/RenderVideo.cpp:
1633         * rendering/RenderVideo.h:
1634
1635 2011-06-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1636
1637         Unreviewed, rolling out r89968.
1638         http://trac.webkit.org/changeset/89968
1639         https://bugs.webkit.org/show_bug.cgi?id=63581
1640
1641         Broke chromium windows compile (Requested by jamesr on
1642         #webkit).
1643
1644         * WebCore.gyp/WebCore.gyp:
1645         * loader/cache/CachedFont.cpp:
1646         * platform/chromium/DragImageRef.h:
1647         * platform/graphics/FloatPoint.h:
1648         * platform/graphics/FloatRect.h:
1649         * platform/graphics/FloatSize.h:
1650         * platform/graphics/FontPlatformData.h:
1651         (WebCore::FontPlatformData::hash):
1652         * platform/graphics/GlyphBuffer.h:
1653         (WebCore::GlyphBuffer::advanceAt):
1654         (WebCore::GlyphBuffer::add):
1655         (WebCore::GlyphBuffer::expandLastAdvance):
1656         * platform/graphics/IntPoint.h:
1657         * platform/graphics/IntRect.h:
1658         * platform/graphics/IntSize.h:
1659         * platform/graphics/SimpleFontData.h:
1660         * platform/graphics/cg/FloatPointCG.cpp:
1661         * platform/graphics/cg/FloatRectCG.cpp:
1662         * platform/graphics/cg/FloatSizeCG.cpp:
1663         * platform/graphics/cg/IntPointCG.cpp:
1664         * platform/graphics/cg/IntRectCG.cpp:
1665         * platform/graphics/cg/IntSizeCG.cpp:
1666         * platform/graphics/mac/FontCustomPlatformData.cpp:
1667         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1668         (WebCore::createFontCustomPlatformData):
1669         * platform/graphics/mac/FontCustomPlatformData.h:
1670         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1671
1672 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1673
1674         Reviewed by Eric Seidel.
1675
1676         Switch PaintMask* to new layout types
1677         https://bugs.webkit.org/show_bug.cgi?id=63576
1678
1679         Switching paintMask* to layout type abstraction from more integral types.
1680
1681         No new tests as this is just moving to an abstraction.
1682
1683         * rendering/InlineFlowBox.cpp:
1684         (WebCore::InlineFlowBox::paintMask):
1685         * rendering/InlineFlowBox.h:
1686         * rendering/RenderBox.cpp:
1687         (WebCore::RenderBox::paintMask):
1688         (WebCore::RenderBox::paintMaskImages):
1689         * rendering/RenderBox.h:
1690         * rendering/RenderFieldset.cpp:
1691         (WebCore::RenderFieldset::paintMask):
1692         * rendering/RenderFieldset.h:
1693         * rendering/RenderTable.cpp:
1694         (WebCore::RenderTable::paintMask):
1695         * rendering/RenderTable.h:
1696         * rendering/RenderTableCell.cpp:
1697         (WebCore::RenderTableCell::paintMask):
1698         * rendering/RenderTableCell.h:
1699
1700 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1701
1702         Reviewed by Eric Seidel.
1703
1704         Switch paintFillLayer* to new layout types
1705         https://bugs.webkit.org/show_bug.cgi?id=63570
1706
1707         Switching painFillLayer* to layout type abstraction from more integral types.
1708
1709         No new tests as this is just moving to an abstraction.
1710
1711         * rendering/InlineFlowBox.cpp:
1712         (WebCore::InlineFlowBox::paintFillLayers):
1713         (WebCore::InlineFlowBox::paintFillLayer):
1714         * rendering/InlineFlowBox.h:
1715         * rendering/RenderBox.cpp:
1716         (WebCore::RenderBox::paintFillLayers):
1717         (WebCore::RenderBox::paintFillLayer):
1718         * rendering/RenderBox.h:
1719         * rendering/RenderBoxModelObject.cpp:
1720         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1721         * rendering/RenderBoxModelObject.h:
1722         * rendering/RenderObject.h:
1723
1724 2011-06-28  Luke Macpherson   <macpherson@chromium.org>
1725
1726         Reviewed by Eric Seidel.
1727
1728         Use appropriate macro for CSSPropertyWebkitAppearance in CSSStyleSelector::applyProperty()
1729         https://bugs.webkit.org/show_bug.cgi?id=63197
1730
1731         No new tests / no functionality changed.
1732
1733         * css/CSSStyleSelector.cpp:
1734         (WebCore::CSSStyleSelector::applyProperty):
1735         Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro and delete duplicate code.
1736
1737 2011-06-28  Cary Clark  <caryclark@google.com>
1738
1739         Reviewed by James Robinson.
1740
1741         Use Skia if Skia on Mac Chrome is enabled
1742         https://bugs.webkit.org/show_bug.cgi?id=62999
1743
1744         No new tests. This does not affect existing
1745         functionality.
1746
1747         * WebCore.gyp/WebCore.gyp:
1748         Include Skia and related files and exclude CG
1749         and related files when building Chromium for Skia
1750         on the Mac.
1751
1752         * loader/cache/CachedFont.cpp:
1753         Rename CHROME to CHROMIUM.
1754
1755         * platform/chromium/DragImageRef.h:
1756         * platform/graphics/FloatPoint.h:
1757         * platform/graphics/FloatRect.h:
1758         * platform/graphics/FloatSize.h:
1759         * platform/graphics/FontPlatformData.h:
1760         (WebCore::FontPlatformData::hash):
1761         * platform/graphics/GlyphBuffer.h:
1762         (WebCore::GlyphBuffer::advanceAt):
1763         (WebCore::GlyphBuffer::add):
1764         (WebCore::GlyphBuffer::expandLastAdvance):
1765         * platform/graphics/IntPoint.h:
1766         * platform/graphics/IntRect.h:
1767         * platform/graphics/IntSize.h:
1768         * platform/graphics/SimpleFontData.h:
1769         * platform/graphics/cg/FloatPointCG.cpp:
1770         * platform/graphics/cg/FloatRectCG.cpp:
1771         * platform/graphics/cg/FloatSizeCG.cpp:
1772         * platform/graphics/cg/IntPointCG.cpp:
1773         * platform/graphics/cg/IntRectCG.cpp:
1774         * platform/graphics/cg/IntSizeCG.cpp:
1775         * platform/graphics/mac/FontCustomPlatformData.cpp:
1776         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1777         (WebCore::createFontCustomPlatformData):
1778         * platform/graphics/mac/FontCustomPlatformData.h:
1779         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1780         Ditto.
1781
1782 2011-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1783
1784         Reviewed by Darin Adler.
1785
1786         Stop instantiating Position with PositionIsOffsetInAnchor in various files
1787         https://bugs.webkit.org/show_bug.cgi?id=63384
1788
1789         Refactoring.
1790
1791         Removed many if conditions that compared the anchor type to Position::PositionIsOffsetInAnchor
1792         because there were also checking that containerNode is a text node.
1793
1794         Also added Position::containerText() to avoid manually casting containerNode().
1795
1796         * dom/Position.cpp:
1797         (WebCore::Position::Position): Added an assertion to ensure BeforeChildren/AfterChildren
1798         anchor type won't be used for a node whose contents is ignored by editing.
1799         (WebCore::Position::containerText): Added.
1800         * dom/Position.h:
1801         * editing/ApplyBlockElementCommand.cpp:
1802         (WebCore::isNewLineAtPosition): Removed a redundant comparison of anchor type.
1803         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): Since containerNode
1804         is always a text node when renderStyleOfEnclosingTextNode returns a render style, use new Position
1805         constructor that takes Text* and offset.
1806         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Removed redundant
1807         comparison of anchor type and use new Position constructor that takes Text* and offset.
1808         * editing/ApplyStyleCommand.cpp:
1809         (WebCore::ApplyStyleCommand::splitTextAtStart): Replaced an assertion that compared anchor type by
1810         an assertion that the container node is a text node; use new constructor.
1811         (WebCore::ApplyStyleCommand::splitTextAtEnd): Ditto; also added early exits in the case script
1812         modified DOM.
1813         (WebCore::ApplyStyleCommand::splitTextElementAtStart): Ditto.
1814         (WebCore::ApplyStyleCommand::splitTextElementAtEnd): Ditto.
1815         (WebCore::ApplyStyleCommand::joinChildTextNodes): Use new constructor.
1816         * editing/CompositeEditCommand.cpp:
1817         (WebCore::Editor::replaceSelectedTextInNode): Calls containerText instead of manually casting containerNode.
1818         * editing/Editor.cpp:
1819         (WebCore::Editor::canDeleteRange): Call Range::startPosition instead of manually instantiating Position
1820         by calling startContainer and startOffset.
1821         * editing/FrameSelection.cpp:
1822         (WebCore::FrameSelection::setSelectedRange): Ditto.
1823         * editing/InsertTextCommand.cpp:
1824         (WebCore::InsertTextCommand::input): Calls containerText instead of manually casting containerNode.
1825         * editing/ReplaceSelectionCommand.cpp:
1826         (WebCore::ReplaceSelectionCommand::doApply): Calls containerText instead of manually casting containerNode.
1827         * editing/VisiblePosition.cpp:
1828         (WebCore::VisiblePosition::characterAfter): Removed a redundant anchor type comparison.
1829         (WebCore::startVisiblePosition): Call Range::startPosition instead of startContainer and startOffset.
1830         (WebCore::endVisiblePosition): Call Range::endPosition instead of endContainer and endOffset.
1831         * editing/htmlediting.cpp:
1832         (WebCore::firstInSpecialElement): Call containerNode() to address <rdar://problem/5027702>.
1833         (WebCore::lastInSpecialElement): Ditto; use new constructor.
1834         * editing/visible_units.cpp:
1835         (WebCore::endPositionForLine): Use new constructor.
1836         (WebCore::startOfParagraph): Ditto.
1837         (WebCore::endOfParagraph): Ditto.
1838
1839 2011-06-28  Rob Buis  <rbuis@rim.com>
1840
1841         Reviewed by Nikolas Zimmermann.
1842
1843         SVG1.1SE test text-tref-03-b.svg fails
1844         https://bugs.webkit.org/show_bug.cgi?id=63390
1845
1846         Support tref on forward referenced content by listening to DOMSubtreeModified events. This also
1847         allows updating after modifications in the referenced content subtree.
1848
1849         Tests: svg/W3C-SVG-1.1-SE/text-tref-03-b.svg
1850                svg/custom/text-tref-03-b-change-href-dom.svg
1851                svg/custom/text-tref-03-b-change-href.svg
1852                svg/custom/text-tref-03-b-dynamic.svg
1853                svg/custom/text-tref-03-b-dynamic2.svg
1854                svg/custom/text-tref-03-b-referenced-element-removal.svg
1855                svg/custom/text-tref-03-b-tref-removal.svg
1856
1857         * svg/SVGTRefElement.cpp:
1858         (WebCore::SubtreeModificationEventListener::create):
1859         (WebCore::SubtreeModificationEventListener::cast):
1860         (WebCore::SubtreeModificationEventListener::removeFromTarget):
1861         (WebCore::SubtreeModificationEventListener::SubtreeModificationEventListener):
1862         (WebCore::SubtreeModificationEventListener::operator==):
1863         (WebCore::SubtreeModificationEventListener::handleEvent):
1864         (WebCore::SVGTRefElement::updateReferencedText):
1865         (WebCore::SVGTRefElement::parseMappedAttribute):
1866         (WebCore::SVGTRefElement::svgAttributeChanged):
1867         (WebCore::SVGTRefElement::buildPendingResource):
1868         (WebCore::SVGTRefElement::removedFromDocument):
1869         * svg/SVGTRefElement.h:
1870
1871 2011-06-28  Abhishek Arya  <inferno@chromium.org>
1872
1873         Reviewed by Anders Carlsson.
1874
1875         Split the string creation into a local (while creating text runs)
1876         so that it is not destroyed prematurely.
1877         https://bugs.webkit.org/show_bug.cgi?id=63543
1878
1879         Run fast/forms/text-control-intrinsic-widths.html under valgrind/ASAN.       
1880         * rendering/RenderFileUploadControl.cpp:
1881         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1882         this one is just done for caution, in case, we don't do the same
1883         mistake when adding legacy rounding hacks option.
1884         * rendering/RenderTextControl.cpp:
1885         (WebCore::RenderTextControl::getAvgCharWidth):
1886
1887 2011-06-28  Greg Simon  <gregsimon@chromium.org>
1888
1889         Reviewed by Dimitri Glazkov.
1890
1891         Migrate SQLite backing store to LevelDB backing store for Indexeddb.
1892         https://bugs.webkit.org/show_bug.cgi?id=62780
1893
1894         * storage/IDBFactoryBackendImpl.cpp:
1895         (WebCore::computeFileIdentifier):
1896         (WebCore::computeUniqueIdentifier):
1897         (WebCore::IDBFactoryBackendImpl::open):
1898         (WebCore::migrateObjectStores):
1899         (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB):
1900         * storage/IDBLevelDBBackingStore.cpp:
1901         (WebCore::IDBLevelDBBackingStore::backingStoreExists):
1902         * storage/IDBLevelDBBackingStore.h:
1903         * storage/IDBObjectStoreBackendImpl.cpp:
1904         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
1905         * storage/IDBObjectStoreBackendImpl.h:
1906         * storage/IDBSQLiteBackingStore.cpp:
1907         (WebCore::IDBSQLiteBackingStore::backingStoreExists):
1908         * storage/IDBSQLiteBackingStore.h:
1909
1910 2011-06-28  Levi Weintraub  <leviw@chromium.org>
1911
1912         Reviewed by Darin Adler.
1913
1914         Create intermediate classes as a path towards getting off of pixel offsets
1915         https://bugs.webkit.org/show_bug.cgi?id=61896
1916
1917         Creating three intermediate typedefs to aid in moving layout and hit testing from integers
1918         to floats. We'll transition the render tree over to these intermediate types and add
1919         infrastructure to support the new types behind USE(FLOAT_LAYOUT_OFFSETS). This allows the ultimate
1920         changeover to be easier.
1921
1922         Switching LayoutState over to this abstraction to verify it works correctly.
1923
1924         No new tests since this is creating a new abstraction, not changing current behavior.
1925
1926         * GNUmakefile.list.am:
1927         * WebCore.gypi:
1928         * WebCore.pro:
1929         * WebCore.vcproj/WebCore.vcproj:
1930         * WebCore.xcodeproj/project.pbxproj:
1931         * rendering/LayoutState.cpp:
1932         (WebCore::LayoutState::LayoutState):
1933         (WebCore::LayoutState::pageLogicalOffset):
1934         (WebCore::LayoutState::addForcedColumnBreak):
1935         * rendering/LayoutState.h:
1936         * rendering/LayoutTypes.h: Added.
1937
1938 2011-06-28  Jeff Miller  <jeffm@apple.com>
1939
1940         Add fullscreen.css and fullscreenQuickTime.css to the WebCore Visual Studio project for convenience.
1941         Looks like Visual Studio also re-sorted one more file since my last checkin.
1942
1943         * WebCore.vcproj/WebCore.vcproj:
1944
1945 2011-06-28  Jeff Miller  <jeffm@apple.com>
1946
1947         Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML.
1948
1949         * WebCore.vcproj/WebCore.vcproj:
1950
1951 2011-06-28  Joone Hur  <joone.hur@collabora.co.uk>
1952
1953         Reviewed by Martin Robinson.
1954
1955         [GTK] Rename 3D transforms to 3D rendering
1956         https://bugs.webkit.org/show_bug.cgi?id=63508
1957
1958         This patch allows to include ENABLE_3D_RENDERING to build WebKitGtk+.
1959
1960         * GNUmakefile.am: Add ENABLE_3D_RENDERING
1961
1962 2011-06-22  Pavel Podivilov  <podivilov@chromium.org>
1963
1964         Reviewed by Yury Semikhatsky.
1965
1966         Web Inspector: use column numbers when linking to script location in timeline and console.
1967         https://bugs.webkit.org/show_bug.cgi?id=63126
1968
1969         * inspector/front-end/ConsoleView.js:
1970         (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
1971         * inspector/front-end/TimelinePanel.js:
1972         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
1973         (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace):
1974
1975 2011-06-28  Joone Hur  <joone.hur@collabora.co.uk>
1976
1977         Reviewed by Martin Robinson.
1978
1979         [GTK] Allow to build WebKitGtk+ with accelerated compositing
1980         https://bugs.webkit.org/show_bug.cgi?id=63404
1981
1982         WebKitGtk+ needs to implement accelerated compositing for running CSS3 3D transforms 
1983         and animation through GPU acceleration. We could implement GraphicsLayer using Clutter.
1984
1985         * GNUmakefile.list.am:
1986         * platform/graphics/clutter/GraphicsLayerClutter.cpp: Added.
1987         (WebCore::GraphicsLayer::create): Not implemented yet.
1988         (WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
1989         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
1990         (WebCore::GraphicsLayerClutter::setNeedsDisplay): Ditto.
1991         (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Ditto.
1992         * platform/graphics/clutter/GraphicsLayerClutter.h: Added.
1993
1994 2011-06-28  Dan Bernstein  <mitz@apple.com>
1995
1996         Reviewed by Darin Adler.
1997
1998         REGRESSION (r89733): fast/text/zero-font-size.html is failing on Leopard
1999         https://bugs.webkit.org/show_bug.cgi?id=63512
2000
2001         * platform/graphics/mac/SimpleFontDataMac.mm:
2002         (WebCore::SimpleFontData::platformWidthForGlyph): Initialize the advance local variable, because
2003         on Leopard wkGetGlyphTransformedAdvances can return successfully yet not update the variable when
2004         the font size is 0. Presumably, r89733 exposed this by changing the values put on the stack just
2005         before this function is called.
2006
2007 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
2008
2009         Reviewed by Pavel Feldman.
2010
2011         Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection
2012         https://bugs.webkit.org/show_bug.cgi?id=63446
2013
2014         * inspector/Inspector.json:
2015         * inspector/InspectorCSSAgent.cpp:
2016         (WebCore::computePseudoClassMask):
2017         (WebCore::InspectorCSSAgent::getStylesForNode):
2018         * inspector/InspectorCSSAgent.h:
2019         * inspector/front-end/AuditRules.js:
2020         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2021         * inspector/front-end/CSSStyleModel.js:
2022         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2023         * inspector/front-end/StylesSidebarPane.js:
2024         (WebInspector.StylesSidebarPane.prototype.update):
2025
2026 2011-06-28  Kent Tamura  <tkent@chromium.org>
2027
2028         Fix a build error on Mac by r89907.
2029
2030         * svg/animation/SVGSMILElement.cpp:
2031         (WebCore::SVGSMILElement::endListChanged):
2032
2033 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
2034
2035         Reviewed by Kent Tamura.
2036
2037         [Chromium] SELECT or autofill popup is trimmed by screen edge on Windows
2038         https://bugs.webkit.org/show_bug.cgi?id=63438
2039
2040         If the popup is calculated to be trimmed by a screen edge, an attempt is made
2041         to alter its vertical edge alignment (set to the right edge for LTR or to the left edge for RTL)
2042         to see if the trimmed portion becomes smaller than that with the original layout.
2043         The change involves remembering the original frameRect for the popup and restoring it in refresh().
2044         This is due to the fact that the frameRect originally set in showInRect() is overwritten
2045         by layoutAndGetRTLOffset(), which breaks the originally requested popup container layout metrics.
2046         The max width is reset on every layoutAndCalculateWidgetRect(), as it can be constrained by the screen edge,
2047         and thus should be re-checked every time the popup is displayed, in case the browser window has been moved.
2048
2049         Tests: manual-tests/popup-width-restriction-within-screen.html partly covers the fix (should not regress).
2050         Other than that, there is no way to unit-test the platform-specific native code.
2051
2052         * platform/chromium/PopupMenuChromium.cpp:
2053         (WebCore::PopupListBox::setMaxWidth): Added. Avoid duplicate popup content layouts (in contrast with setMaxWidthAndLayout()).
2054         (WebCore::PopupListBox::PopupListBox):
2055         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Attempt a left-right popup alignment inversion
2056         to minimize the trimmed content. Also restore a default max popup width.
2057         (WebCore::PopupContainer::layoutAndGetRTLOffset): Always return the popup listbox offset for the RTL (right alignment) case.
2058         The method rename is due to the return value semantics change.
2059         (WebCore::PopupContainer::showInRect): Store the originally requested frameRect for the popup.
2060         (WebCore::PopupContainer::refresh): Restore the original popup frameRect to avoid layout artifacts on refresh.
2061         (WebCore::PopupContainer::isRTL): This check should be made by the layoutAndGetRTLOffset() clients.
2062         * platform/chromium/PopupMenuChromium.h:
2063
2064 2011-06-28  Kentaro Hara  <haraken@google.com>
2065
2066         Reviewed by Kent Tamura.
2067
2068         Allow spaces between e-mail addresses in 'email' input type.
2069         https://bugs.webkit.org/show_bug.cgi?id=55987
2070
2071         Allowed spaces between e-mail addresses in 'email' input type,
2072         e.g. ' a@p.com , b@p.com ' is a valid value. Implemented the
2073         value sanitization algorithm for an e-mail value.  Added more unit
2074         tests that check the e-mail value parser.
2075
2076         Test: fast/forms/ValidityState-typeMismatch-email.html
2077
2078         * html/EmailInputType.cpp:
2079         (WebCore::EmailInputType::typeMismatchFor):
2080         (WebCore::EmailInputType::sanitizeValue):
2081         * html/EmailInputType.h:
2082         * html/parser/HTMLParserIdioms.cpp:
2083         (WebCore::stripHTMLLineBreaks):
2084         * html/parser/HTMLParserIdioms.h:
2085         (WebCore::isHTMLLineBreak):
2086
2087 2011-06-28  Kent Tamura  <tkent@chromium.org>
2088
2089         Reviewed by Hajime Morita.
2090
2091         Refactor RenderTextControl::text().
2092         https://bugs.webkit.org/show_bug.cgi?id=63519
2093
2094         No new tests because this is just a refactoring.
2095
2096         * rendering/RenderTextControl.cpp:
2097         (WebCore::RenderTextControl::setInnerTextValue):
2098          Resuce the number of text() calls.
2099         (WebCore::finishText):
2100           - Use StringBuilder.
2101           - Make this a static function.
2102             This function doesn't access anything of RenderTextControl.
2103         (WebCore::RenderTextControl::text):
2104          Use emptyString() and StringBuilder.
2105         (WebCore::RenderTextControl::textWithHardLineBreaks): ditto.
2106         * rendering/RenderTextControl.h: Remove finishText().
2107
2108 2011-06-28  Yury Semikhatsky  <yurys@chromium.org>
2109
2110         Reviewed by Pavel Feldman.
2111
2112         Web Inspector: console.group messages should never be coalesced
2113         https://bugs.webkit.org/show_bug.cgi?id=63521
2114
2115         * inspector/InspectorConsoleAgent.cpp:
2116         (WebCore::isGroupMessage):
2117         (WebCore::InspectorConsoleAgent::addConsoleMessage):
2118
2119 2011-06-28  Yury Semikhatsky  <yurys@chromium.org>
2120
2121         Reviewed by Pavel Feldman.
2122
2123         Web Inspector: console group boundaries should be more distinct in UI
2124         https://bugs.webkit.org/show_bug.cgi?id=63455
2125
2126         Show grey bracket to on the left side of a console group message to highlight
2127         the group extent.
2128
2129         * inspector/front-end/ConsoleView.js:
2130         (WebInspector.ConsoleGroup):
2131         * inspector/front-end/inspector.css:
2132         (#console-prompt):
2133         (.console-message, .console-user-command):
2134         (.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before):
2135         (.console-group-title::before):
2136         (.console-group):
2137         (.console-group-bracket):
2138         (.console-group.collapsed > .console-group-bracket):
2139
2140 2011-06-28  Kent Tamura  <tkent@chromium.org>
2141
2142         Reviewed by Hajime Morita.
2143
2144         Use RefPtr for the HTMLElement data members of TextFieldInptType
2145         and SearchInputType.
2146         https://bugs.webkit.org/show_bug.cgi?id=63511
2147
2148         No new tests because of no behavior change.
2149
2150         * html/SearchInputType.cpp:
2151         (WebCore::SearchInputType::SearchInputType):
2152         No need to initialize the element members explicitly because
2153         RefPtr constructor works well.
2154         (WebCore::SearchInputType::createShadowSubtree):
2155         Substitute an element to a data member, and don't call RefPtr<>::release().
2156         (WebCore::SearchInputType::innerBlockElement):
2157         Moved from the header file, and adjustment for RefPtr<>.
2158         (WebCore::SearchInputType::resultsButtonElement): ditto.
2159         (WebCore::SearchInputType::cancelButtonElement): ditto.
2160         (WebCore::SearchInputType::destroyShadowSubtree):
2161          Adjustment for RefPtr<>.
2162         * html/SearchInputType.h:
2163          - Move accessor functions to the cpp file because they are virtual.
2164          - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>.
2165         * html/TextFieldInputType.cpp:
2166         (WebCore::TextFieldInputType::TextFieldInputType):
2167         No need to initialize the element members explicitly because
2168         RefPtr constructor works well.
2169         (WebCore::TextFieldInputType::~TextFieldInputType):
2170         Explicityly defines the destructor in the cpp file to avoid to
2171         make it implicitly in the header file. If the destructor was made
2172         in the header file, we would need to include HTMLElement.h in the
2173         header file.
2174         (WebCore::TextFieldInputType::createShadowSubtree):
2175         - Don't call RenderTheme::themeForPage().
2176         - Substitute an element to a data member, and don't call RefPtr<>::release().
2177         (WebCore::TextFieldInputType::setInnerTextElement):
2178          Moved from the header file to avoid to include HTMLElement.h.
2179         (WebCore::TextFieldInputType::setSpeechButtonElement): ditto.
2180         (WebCore::TextFieldInputType::innerTextElement):
2181         Moved from the header file, and adjustment for RefPtr<>.
2182         (WebCore::TextFieldInputType::innerSpinButtonElement): ditto.
2183         (WebCore::TextFieldInputType::speechButtonElement): ditto.
2184         (WebCore::TextFieldInputType::destroyShadowSubtree):
2185          Adjustment for RefPtr<>.
2186         * html/TextFieldInputType.h:
2187          - Move accessor functions to the cpp file because they are virtual.
2188          - Change element data member types: HTMLElement* -> RefPtr<HTMLElement>.
2189
2190 2011-06-28  Felician Marton  <marton.felician.zoltan@stud.u-szeged.hu>
2191
2192         Reviewed by Nikolas Zimmermann.
2193
2194         SVG animation flickers when restarting
2195         https://bugs.webkit.org/show_bug.cgi?id=18450
2196
2197         Add new parameter to the following methods. The new parameter is the time of adding a "begin" or "end" time to the SVG animation.
2198          - WebCore::SVGSMILElement::addBeginTime
2199          - WebCore::SVGSMILElement::beginListChanged
2200          - WebCore::SVGSMILElement::addEndTime
2201          - WebCore::SVGSMILElement::endListChanged
2202         In case of beginTime and beginListChanged it's necessary, because the delay between the event of adding a new begin time
2203         (in WebCore::SVGAnimationElement::beginElementAt) and the actual processing (in WebCore::SVGSMILElement::endListChanged)
2204         is significant. In lack of event time we can't decide that we should consider the new time or not.
2205         If the new begin time is smaller than the event time, we musn't begin the animation, else we shoud do further calculations.
2206
2207         The following methods just modified for consistency:
2208          - WebCore::SVGSMILElement::addEndTime
2209          - WebCore::SVGSMILElement::endListChanged
2210
2211         No new tests, because currently there is no way to test SVG flickering at zero time.
2212
2213         * svg/SVGAnimationElement.cpp:
2214         (WebCore::SVGAnimationElement::beginElementAt):
2215         (WebCore::SVGAnimationElement::endElementAt):
2216         * svg/animation/SVGSMILElement.cpp:
2217         (WebCore::SVGSMILElement::attributeChanged):
2218         (WebCore::SVGSMILElement::addBeginTime):
2219         (WebCore::SVGSMILElement::addEndTime):
2220         (WebCore::SVGSMILElement::beginListChanged):
2221         (WebCore::SVGSMILElement::endListChanged):
2222           The body changed:
2223            - Use new parameter, the time of adding the new begin time.
2224            - Cancel some incorrect optimalization. We should also do further calculations when elapsed >= m_intervalBegin.
2225         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
2226         (WebCore::SVGSMILElement::handleConditionEvent):
2227         (WebCore::SVGSMILElement::beginByLinkActivation):
2228         * svg/animation/SVGSMILElement.h:
2229
2230 2011-06-28  Csaba Osztrogonác  <ossy@webkit.org>
2231
2232         Reviewed by Andreas Kling.
2233
2234         Adding MHTML reading support.
2235         https://bugs.webkit.org/show_bug.cgi?id=7168
2236
2237         * features.pri: Disable MHTML on Qt by default in a proper way.
2238
2239 2011-06-28  Csaba Osztrogonác  <ossy@webkit.org>
2240
2241         Reviewed by Andreas Kling.
2242
2243         [Qt] Remove ENABLE_XBL, because there aren't ENABLE(XBL) macros anymore.
2244
2245         * features.pri:
2246
2247 2011-06-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2248
2249         Unreviewed. Fix style error related to wrong include order.
2250
2251         * platform/graphics/efl/ImageEfl.cpp:
2252
2253 2011-06-27  Brian Weinstein  <bweinstein@apple.com>
2254
2255         Fix the WebCore vcproj file after r89851.
2256
2257         * WebCore.vcproj/WebCore.vcproj:
2258
2259 2011-06-27  Joe Wild  <joseph.wild@nokia.com>
2260
2261         Reviewed by Simon Fraser.
2262
2263         Crash on www.crave.cnet.com in FrameView::windowClipRect()
2264         https://bugs.webkit.org/show_bug.cgi?id=56393
2265
2266         Check for a null renderer to fix a crash. This situation can
2267         arise when external content/plugins is referenced from html
2268         elements with style="display:none".
2269
2270         Test: plugins/hidden-iframe-with-swf-plugin.html
2271
2272         * page/FrameView.cpp:
2273         (WebCore::FrameView::windowClipRect):
2274
2275 2011-06-27  Raymes Khoury  <raymes@chromium.org>
2276
2277         Reviewed by Tony Chang.
2278
2279         WebCore fails to compile in thumb mode when neon instructions are
2280         enabled.
2281
2282         There are two files (FELightingNEON.cpp and FEGaussianBlur.cpp)
2283         which fail to build when -mthumb is passed to gcc. These contain inline
2284         assembly for neon instructions on arm. This patch forces the -marm flag
2285         to be passed when compiling these files to work around this.
2286
2287         https://bugs.webkit.org/show_bug.cgi?id=62916
2288
2289         Built WebKit in Chromium and checked that -marm is passed
2290         only when building these files.
2291
2292         https://bugs.webkit.org/show_bug.cgi?id=62916
2293
2294         * WebCore.gyp/WebCore.gyp:
2295
2296 2011-06-27  Jay Civelli  <jcivelli@chromium.org>
2297
2298         Reviewed by Darin Fisher.
2299
2300         Adding binary part support to MHTML.
2301         https://bugs.webkit.org/show_bug.cgi?id=63310
2302
2303         * loader/archive/mhtml/MHTMLArchive.cpp:
2304         (WebCore::MHTMLArchive::generateMHTMLData):
2305         (WebCore::MHTMLArchive::generateMHTMLDataUsingBinaryEncoding):
2306         * loader/archive/mhtml/MHTMLArchive.h:
2307         * loader/archive/mhtml/MHTMLParser.cpp:
2308         (WebCore::MHTMLParser::parseNextPart):
2309         * platform/SharedBuffer.cpp:
2310         (WebCore::SharedBuffer::append):
2311         * platform/SharedBuffer.h:
2312         * platform/network/MIMEHeader.cpp:
2313         (WebCore::MIMEHeader::parseContentTransferEncoding):
2314         * platform/network/MIMEHeader.h:
2315
2316 2011-06-27  Levi Weintraub  <leviw@chromium.org>
2317
2318         Reviewed by Eric Seidel.
2319
2320         Add support for unicode-bidi:plaintext CSS property
2321         https://bugs.webkit.org/show_bug.cgi?id=50949
2322
2323         Adding support for unicode-bidi: plaintext. This involves invoking P2 and P3
2324         of the Unicode BiDi algorithm on each paragraph of a block with that style.
2325         This is similar to dir=auto but done per-paragraph instead of per element.
2326
2327         Test: fast/text/international/unicode-bidi-plaintext.html
2328
2329         * css/CSSParser.cpp:
2330         (WebCore::CSSParser::parseValue):  Added plaintext.
2331         * css/CSSPrimitiveValueMappings.h:
2332         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Ditto.
2333         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi): Ditto.
2334         * css/CSSValueKeywords.in: Ditto.
2335         * html/HTMLElement.cpp:
2336         (WebCore::unicodeBidiAttributeForDirAuto): Helper to map elements with dir=auto
2337         to their proper unicode-bidi attribute.
2338         (WebCore::HTMLElement::parseMappedAttribute): Assign plaintext to pre and textarea
2339         when dir=auto.
2340         * platform/text/UnicodeBidi.h: Added plaintext.
2341         * rendering/RenderBlockLineLayout.cpp:
2342         (WebCore::determineParagraphDirection): Determines the direction of a paragraph
2343         based on the first strong character. Stops at first paragraph separator.
2344         (WebCore::RenderBlock::layoutInlineChildren): Uses determineParagraphDirection
2345         when in unicode-bidi: plaintext mode (and operating at the block's BidiContext)
2346         to set each paragraph to the proper base BidiContext.
2347         (WebCore::RenderBlock::determineStartPosition): Ditto.
2348         * rendering/style/RenderStyle.h: Gave _unicodebidi another bit to accomodate
2349         for plaintext.
2350
2351 2011-06-27  Alexis Menard  <alexis.menard@openbossa.org>
2352
2353         Reviewed by Darin Adler.
2354
2355         Use specific headers includes rather than full system headers.
2356         https://bugs.webkit.org/show_bug.cgi?id=63475
2357
2358         Use only needed headers rather than system headers.
2359
2360         No new tests, it's just a little cosmetic change.
2361
2362         * platform/mac/WebVideoFullscreenController.h:
2363         * platform/mac/WebVideoFullscreenHUDWindowController.h:
2364
2365 2011-06-27  Joseph Pecoraro  <joepeck@webkit.org>
2366
2367         Reviewed by Darin Adler.
2368
2369         Allow non-main thread text drawing in ICU ports
2370         https://bugs.webkit.org/show_bug.cgi?id=63482
2371
2372         Some ports allow multiple threads to draw strings.
2373         LineBreakIteratorPool is not thread safe and the existing
2374         ASSERT caught cases where multiple threads were trying
2375         to access the shared pool. This makes the pool a lazily
2376         created per-thread pool to allow for thread safe pool use.
2377
2378         * platform/ThreadGlobalData.h:
2379         * platform/ThreadGlobalData.cpp:
2380         (WebCore::ThreadGlobalData::ThreadGlobalData): start with null.
2381         (WebCore::ThreadGlobalData::lineBreakIteratorPool): lazily create.
2382         (WebCore::ThreadGlobalData::destroy): delete.
2383         Manage the lifetime of the per-thread pool instance.
2384
2385         * platform/text/LineBreakIteratorPoolICU.h:
2386         (WebCore::LineBreakIteratorPool::sharedPool):
2387         Use the per-thread pool instance and remove the ASSERT that
2388         this needs to be on the main thread.
2389
2390         (WebCore::LineBreakIteratorPool::create):
2391         Create a PassOwnPtr so we can use OwnPtr on pools.
2392
2393         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
2394         Private now that there is a public create function.
2395
2396 2011-06-27  Joseph Pecoraro  <joepeck@webkit.org>
2397
2398         Reviewed by Darin Adler.
2399
2400         Extract LineBreakIteratorPool class into its own file
2401         https://bugs.webkit.org/show_bug.cgi?id=63471
2402
2403         * GNUmakefile.list.am:
2404         * WebCore.gypi:
2405         * WebCore.vcproj/WebCore.vcproj:
2406         * WebCore.xcodeproj/project.pbxproj:
2407         Add the new file to builds that used TextBreakIteratorPoolICU.h.
2408
2409         * platform/text/LineBreakIteratorPoolICU.h: Added.
2410         (WebCore::LineBreakIteratorPool::sharedPool):
2411         (WebCore::LineBreakIteratorPool::LineBreakIteratorPool):
2412         Expose the constructor so it can be used by others.
2413
2414         * platform/text/TextBreakIteratorICU.cpp:
2415         Remove the old LineBreakIteratorPool implementation.
2416
2417 2011-06-27  Justin Garcia  <justin.garcia@apple.com>
2418
2419         Reviewed by Ryosuke Niwa.
2420
2421         CompositeEditCommand::inputText(const String& text, bool selectedInsertText) is unused
2422         https://bugs.webkit.org/show_bug.cgi?id=62921
2423
2424         * editing/CompositeEditCommand.cpp:
2425         * editing/CompositeEditCommand.h:
2426         * editing/InsertTextCommand.cpp:
2427         (WebCore::InsertTextCommand::input):
2428
2429 2011-05-17  Nat Duca  <nduca@chromium.org>
2430
2431         Reviewed by James Robinson.
2432
2433         [chromium] Implement CCLayerTreeHost and CCLayerTreeHostImpl portions of threaded compositor
2434         https://bugs.webkit.org/show_bug.cgi?id=58408
2435
2436         Create CCLayerTreeHost and CCLayerTreeHostImpl, which are the main
2437         thread and compositor thread halves of a composited view. Communication
2438         between the two is based on the design used in FileStreamProxy.
2439
2440         * WebCore.gypi:
2441         * platform/chromium/TraceEvent.h:
2442         * platform/graphics/chromium/LayerRendererChromium.cpp:
2443         (WebCore::LayerRendererChromium::create):
2444         (WebCore::LayerRendererChromium::LayerRendererChromium):
2445         (WebCore::LayerRendererChromium::setViewport):
2446         (WebCore::LayerRendererChromium::updateLayers):
2447         (WebCore::LayerRendererChromium::drawLayers):
2448         (WebCore::LayerRendererChromiumImpl::create):
2449         (WebCore::LayerRendererChromiumImpl::drawLayersAndPresent):
2450         (WebCore::LayerRendererChromiumImpl::LayerRendererChromiumImpl):
2451         (WebCore::LayerRendererChromiumImpl::drawLayersOnMainThread):
2452         (WebCore::LayerRendererChromiumImplProxy::create):
2453         (WebCore::LayerRendererChromiumImplProxy::createLayerTreeHostImpl):
2454         (WebCore::LayerRendererChromiumImplProxy::LayerRendererChromiumImplProxy):
2455         (WebCore::LayerRendererChromium::createLayerTreeHostImplProxy):
2456         * platform/graphics/chromium/LayerRendererChromium.h:
2457         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2458         (WebCore::CCHeadsUpDisplay::setShowFPSCounter):
2459         (WebCore::CCHeadsUpDisplay::setShowPlatformLayerTree):
2460         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
2461         (WebCore::CCHeadsUpDisplay::currentFrameNumber):
2462         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2463         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2464         (WebCore::CCLayerTreeHost::init):
2465         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
2466         (WebCore::CCLayerTreeHost::beginCommit):
2467         (WebCore::CCLayerTreeHost::commitComplete):
2468         (WebCore::CCLayerTreeHost::animateAndLayout):
2469         (WebCore::CCLayerTreeHost::createLayerTreeHostCommitter):
2470         (WebCore::CCLayerTreeHost::setNeedsCommitAndRedraw):
2471         (WebCore::CCLayerTreeHost::setNeedsRedraw):
2472         (WebCore::CCLayerTreeHost::updateLayers):
2473         * platform/graphics/chromium/cc/CCLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2474         (WebCore::CCLayerTreeHost::frameNumber):
2475         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2476         (WebCore::CCLayerTreeHostCommitter::create):
2477         (WebCore::CCLayerTreeHostCommitter::commit):
2478         * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2479         (WebCore::CCLayerTreeHostCommitter::CCLayerTreeHostCommitter):
2480         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Added.
2481         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2482         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
2483         (WebCore::CCLayerTreeHostImpl::beginCommit):
2484         (WebCore::CCLayerTreeHostImpl::commitComplete):
2485         (WebCore::CCLayerTreeHostImpl::drawLayers):
2486         (WebCore::CCLayerTreeHostImpl::setNeedsCommitAndRedraw):
2487         (WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
2488         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCThread.cpp.
2489         (WebCore::CCLayerTreeHostImplClient::~CCLayerTreeHostImplClient):
2490         (WebCore::CCLayerTreeHostImpl::frameNumber):
2491         (WebCore::CCLayerTreeHostImpl::sourceFrameNumber):
2492         (WebCore::CCLayerTreeHostImpl::setSourceFrameNumber):
2493         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Added.
2494         (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy):
2495         (WebCore::CCLayerTreeHostImplProxy::start):
2496         (WebCore::CCLayerTreeHostImplProxy::~CCLayerTreeHostImplProxy):
2497         (WebCore::CCLayerTreeHostImplProxy::isStarted):
2498         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedraw):
2499         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedraw):
2500         (WebCore::CCLayerTreeHostImplProxy::stop):
2501         (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread):
2502         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread):
2503         (WebCore::CCLayerTreeHostImplProxy::isMainThread):
2504         (WebCore::CCLayerTreeHostImplProxy::isCCThread):
2505         (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):
2506         (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread):
2507         (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread):
2508         (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread):
2509         (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread):
2510         (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread):
2511         (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread):
2512         * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: Added.
2513         (WebCore::CCLayerTreeHostImplProxy::host):
2514         * platform/graphics/chromium/cc/CCMainThreadTask.h:
2515         * platform/graphics/chromium/cc/CCThread.cpp:
2516         (WebCore::CCThread::runLoop):
2517         * platform/graphics/chromium/cc/CCThreadTask.h:
2518
2519 2011-06-27  Abhishek Arya  <inferno@chromium.org>
2520
2521         Reviewed by Simon Fraser.
2522
2523         Fix removal of overhanging floats on style changes to absolute/fixed position.
2524         https://bugs.webkit.org/show_bug.cgi?id=63355
2525
2526         1. If we are not currently positioned.
2527         2. And we are not floating. (If we are floating, then this will be automatically
2528            done in RenderBox::styleWillChange as part of removeFloatingOrPositionedChildFromBlockLists) 
2529         3. And we have overhanging floats from previous sibling blocks.
2530         4. And our new new style tells that we will have absolute or fixed position.
2531
2532         Then, we mark all our descendants with floats for layout. This will make sure that
2533         overhanging floats are removed. Also, it is important to do that since if that previous
2534         sibling block goes away, it is not able to tell us that to remove those floats thinking 
2535         that being a positioned block, we should have removed them already.
2536
2537         Tests: fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html
2538                fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html
2539                fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html
2540                fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html
2541                fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html
2542                fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html
2543                fast/block/float/overhanging-float-add-in-static-position-block.html
2544                fast/block/float/overhanging-float-add-in-static-position-block2.html
2545                fast/block/float/overhanging-float-remove-from-absolute-position-block.html
2546                fast/block/float/overhanging-float-remove-from-absolute-position-block2.html
2547                fast/block/float/overhanging-float-remove-from-fixed-position-block.html
2548                fast/block/float/overhanging-float-remove-from-fixed-position-block2.html
2549
2550         * rendering/RenderBlock.cpp:
2551         (WebCore::RenderBlock::styleWillChange):
2552
2553 2011-06-27  Dirk Schulze  <krit@webkit.org>
2554
2555         Reviewed by Nikolas Zimmermann.
2556
2557         SVGAnimatedType should support SVGPreserveAspectRatio animation
2558         https://bugs.webkit.org/show_bug.cgi?id=63456
2559         
2560         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2561         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedPreserveAspectRatio.
2562         
2563         The new animator does not affect any behavior, since it was animated with SVGAnimatedString before. The new animator is still needed
2564         to support animVal and baseVal later.
2565
2566         Test: svg/animations/svgPreserveAspectRatio-animation-1.html
2567
2568         * CMakeLists.txt: Added new file.
2569         * GNUmakefile.list.am: Ditto.
2570         * WebCore.gypi: Ditto.
2571         * WebCore.pro: Ditto.
2572         * WebCore.xcodeproj/project.pbxproj: Ditto.
2573         * svg/SVGAllInOne.cpp: Ditto.
2574         * svg/SVGAnimateElement.cpp: Handle AnimatedPreserveAspectRatio.
2575         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2576         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2577         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2578         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2579         (WebCore::SVGAnimateElement::resetToBaseValue):
2580         (WebCore::SVGAnimateElement::applyResultsToTarget):
2581         (WebCore::SVGAnimateElement::calculateDistance):
2582         * svg/SVGAnimatedPreserveAspectRatio.cpp: Added. New animator for SVGAnimatedPreserveAspectRatio.
2583         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::SVGAnimatedPreserveAspectRatioAnimator):
2584         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
2585         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndToValues):
2586         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateFromAndByValues):
2587         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
2588         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateDistance):
2589         * svg/SVGAnimatedPreserveAspectRatio.h:
2590         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::~SVGAnimatedPreserveAspectRatioAnimator):
2591         * svg/SVGAnimatedType.cpp: Support for SVGPreserveAspectRatio.
2592         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2593         (WebCore::SVGAnimatedType::createPreserveAspectRatio):
2594         (WebCore::SVGAnimatedType::preserveAspectRatio):
2595         (WebCore::SVGAnimatedType::valueAsString):
2596         (WebCore::SVGAnimatedType::setValueAsString):
2597         (WebCore::SVGAnimatedType::setPreserveAspectRatioBaseValue):
2598         * svg/SVGAnimatedType.h:
2599         * svg/SVGAnimatorFactory.h:
2600         (WebCore::SVGAnimatorFactory::create):
2601
2602 2011-06-27  Alexis Menard  <alexis.menard@openbossa.org>
2603
2604         Reviewed by Kenneth Rohde Christiansen.
2605
2606         [Qt] Remove Phonon MediaPlayer from the tree.
2607         https://bugs.webkit.org/show_bug.cgi?id=63448
2608
2609         Remove Phonon mediaplayer as it is unused, not finished and
2610         unmaintained.
2611
2612         * WebCore.gypi:
2613         * WebCore.pri:
2614         * WebCore.pro:
2615         * features.pri:
2616         * platform/graphics/MediaPlayer.cpp:
2617         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Removed.
2618         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Removed.
2619
2620 2011-06-27  Ryosuke Niwa  <rniwa@webkit.org>
2621
2622         Reviewed by Kent Tamura.
2623
2624         Crash in TextIterator
2625         https://bugs.webkit.org/show_bug.cgi?id=63334
2626
2627         Fix a crash in TextIterator. Keep m_sortedTextBoxes and renderer consistent
2628         and check !m_offset when handling first letter.
2629
2630         Also add more assertions to help detecting similar bugs.
2631
2632         Test: editing/text-iterator/first-letter-rtl-crash.html
2633
2634         * editing/TextIterator.cpp:
2635         (WebCore::TextIterator::handleTextNode):
2636         (WebCore::TextIterator::emitText):
2637
2638 2011-06-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2639
2640         Reviewed by Andreas Kling.
2641
2642         [Qt] tst_QWebFrame::overloadedSlots() fails
2643         https://bugs.webkit.org/show_bug.cgi?id=37319
2644
2645         This patch is based on Noam Rosenthal original patch in the same bug.
2646
2647         When hinted with QWebElement metatype, we qualify the conversion
2648         from JSElement as a "perfect match".
2649
2650         The test was failing because the wrong slot was called, since the QWebElement
2651         match was taken as equal to the others and not chosen when the metacall happened.
2652
2653         * bridge/qt/qt_runtime.cpp:
2654         (JSC::Bindings::convertValueToQVariant): Identify the conversion between JSElement
2655         to QWebElement as a "perfect match" (dist = 0). Add comments to explain the reason
2656         why we have the implicit conversion.
2657
2658 2011-06-27  ChangSeok Oh  <shivamidow@gmail.com>
2659
2660         Reviewed by Martin Robinson.
2661
2662         [GTK] Fix build break to support webgl
2663         https://bugs.webkit.org/show_bug.cgi?id=63425
2664
2665         Some missing files in ANGLE are just added to fix build-break.
2666
2667         No test reqired
2668
2669         * GNUmakefile.list.am:
2670
2671 2011-06-27  Hyowon Kim  <hw1008.kim@samsung.com>
2672
2673         Reviewed by Martin Robinson.
2674
2675         [EFL] Add some PLATFORM(EFL) ifdefs to GraphicsContext3D.h
2676         https://bugs.webkit.org/show_bug.cgi?id=62959
2677
2678         Add PLATFORM(EFL) ifdefs to use GraphicsContextInternal.
2679
2680         * platform/graphics/GraphicsContext3D.h:
2681
2682 2011-06-27  Alexandru Chiculita  <achicu@adobe.com>
2683
2684         Reviewed by Ojan Vafai.
2685
2686         css combinator "+" in combination with NAV tag is buggy
2687         https://bugs.webkit.org/show_bug.cgi?id=47971
2688
2689         Added a new state in css/tokenizer.flex for the "nth" rule. The state begins
2690         at nth-*( functions and ends at the first ")". It avoids parsing selectors 
2691         like "#div+nav" as: "#div" "+n" "av".
2692
2693         Test: fast/css/div_plus_nav_bug47971.html
2694
2695         * css/maketokenizer:
2696         * css/tokenizer.flex:
2697
2698 2011-06-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2699
2700         Unreviewed, rolling out r89822.
2701         http://trac.webkit.org/changeset/89822
2702         https://bugs.webkit.org/show_bug.cgi?id=63461
2703
2704         Broken builds (Requested by apavlov on #webkit).
2705
2706         * inspector/Inspector.json:
2707         * inspector/InspectorCSSAgent.cpp:
2708         (WebCore::InspectorCSSAgent::getStylesForNode):
2709         * inspector/InspectorCSSAgent.h:
2710         * inspector/front-end/AuditRules.js:
2711         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2712         * inspector/front-end/CSSStyleModel.js:
2713         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2714         * inspector/front-end/StylesSidebarPane.js:
2715         (WebInspector.StylesSidebarPane.prototype.update):
2716
2717 2011-06-27  Noel Gordon  <noel.gordon@gmail.com>
2718
2719         Reviewed by Adam Roben.
2720
2721         Send keypress events to windowless plugins on the windows port.
2722         https://bugs.webkit.org/show_bug.cgi?id=63144
2723
2724         No new tests.  Covered by existing windowless plugin tests plugins/mouse-events.html
2725         and plugins/keyboard-events.html.  Both are not yet working as desired because focus
2726         events are not being fowarded to windowed plugins on the win port (bug 62375).  Test
2727         plugin logging on the win port was added in bug 61721.  New failing expectations for
2728         plugins/keyboard-events.html were subsequently added in bug 33973 so there's no need
2729         to update test expectations in this patch.
2730
2731          * plugins/win/PluginViewWin.cpp:
2732         (WebCore::PluginView::handleKeyboardEvent): Add an ASSERT(m_plugin && !m_isWindowed)
2733         to indicate that the routine is for windowless plugins.  Remove trailing whitespace.
2734         Add handling for keyPress events (map to WM_CHAR).
2735         (WebCore::PluginView::handleMouseEvent): Add the ASSERT to indicate that the routine
2736         is for windowless plugins.  Add FIXME note.  Remove trailing whitespace.
2737
2738 2011-06-27  Alexander Pavlov  <apavlov@chromium.org>
2739
2740         Reviewed by Pavel Feldman.
2741
2742         Web Inspector: Change the inspector model API and backend to allow CSS pseudoclass inspection
2743         https://bugs.webkit.org/show_bug.cgi?id=63446
2744
2745         * inspector/Inspector.json:
2746         * inspector/InspectorCSSAgent.cpp:
2747         (WebCore::computePseudoClassMask):
2748         (WebCore::InspectorCSSAgent::getStylesForNode):
2749         * inspector/InspectorCSSAgent.h:
2750         * inspector/front-end/AuditRules.js:
2751         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2752         * inspector/front-end/CSSStyleModel.js:
2753         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2754         * inspector/front-end/StylesSidebarPane.js:
2755         (WebInspector.StylesSidebarPane.prototype.update):
2756
2757 2011-06-27  Pavel Feldman  <pfeldman@google.com>
2758
2759         Reviewed by Yury Semikhatsky.
2760
2761         Web Inspector: [REGRESSION r84481] updateLayout called from DrawNodeHighlight
2762         https://bugs.webkit.org/show_bug.cgi?id=63405
2763
2764         We should not call layout from paint.
2765
2766         * inspector/DOMNodeHighlighter.cpp:
2767         (WebCore::DOMNodeHighlighter::drawNodeHighlight):
2768         * inspector/DOMNodeHighlighter.h:
2769         * inspector/InspectorDOMAgent.cpp:
2770         (WebCore::InspectorDOMAgent::drawNodeHighlight):
2771
2772 2011-06-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2773
2774         Unreviewed. Fix style error in EFL port.
2775
2776         * platform/efl/PlatformKeyboardEventEfl.cpp:
2777         * platform/efl/PlatformScreenEfl.cpp:
2778         * platform/efl/SharedBufferEfl.cpp:
2779
2780 2011-06-27  Pavel Feldman  <pfeldman@google.com>
2781
2782         Reviewed by Yury Semikhatsky.
2783
2784         Web Inspector: node selection is slow in the Elements panel.
2785         https://bugs.webkit.org/show_bug.cgi?id=60813
2786
2787         * inspector/front-end/StylesSidebarPane.js:
2788         (WebInspector.StylesSidebarPane.prototype.update.stylesCallback):
2789         (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
2790         (WebInspector.StylesSidebarPane.prototype.update):
2791
2792 2011-06-26  Pavel Feldman  <pfeldman@chromium.org>
2793
2794         Reviewed by Yury Semikhatsky.
2795
2796         Web Inspector: roll out r88337 for making tests flaky.
2797         https://bugs.webkit.org/show_bug.cgi?id=63422
2798
2799         * inspector/front-end/ElementsPanel.js:
2800         (WebInspector.ElementsPanel):
2801         (WebInspector.ElementsPanel.prototype.updateStyles):
2802         (WebInspector.ElementsPanel.prototype._stylesUpdated):
2803         * inspector/front-end/StylesSidebarPane.js:
2804         (WebInspector.StylesSidebarPane.prototype.update.stylesCallback):
2805         (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback):
2806         (WebInspector.StylesSidebarPane.prototype.update):
2807
2808 2011-06-27  Huang Dongsung  <luxtella@company100.net>
2809
2810         Reviewed by Kenneth Rohde Christiansen.
2811
2812         TiledBackingStore endlessly creates and destroys tiles due to an off-by-one
2813         error.
2814         https://bugs.webkit.org/show_bug.cgi?id=62422
2815
2816         REGRESSION(r77286): Remove bottomRight().
2817         REGRESSION(r77312): Change the logic to get the bottom right point.
2818         REGRESSION(r77928): Cause off-by-one error in TiledBackingStore.
2819         REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy.
2820         REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy.
2821
2822         If the viewport width equals the contents width, especially in the mobile
2823         device, TiledBackingStore endlessly creates and deletes the rightmost
2824         column and bottom row of tiles.
2825         In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles()
2826         deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates
2827         tiles infinitely.
2828         Modified TiledDrawingAreaProxy also.
2829
2830         * platform/graphics/TiledBackingStore.cpp:
2831         (WebCore::innerBottomRight):
2832         (WebCore::TiledBackingStore::invalidate):
2833         (WebCore::TiledBackingStore::paint):
2834         (WebCore::TiledBackingStore::createTiles):
2835
2836 2011-06-26  Adam Barth  <abarth@webkit.org>
2837
2838         Reviewed by Eric Seidel.
2839
2840         Remove LegacyDefaultOptionalArguments from WebAudio IDL files
2841         https://bugs.webkit.org/show_bug.cgi?id=63416
2842
2843         WebAudio isn't that widely used, so it's seems somewhat safe to remove
2844         legacy code generation hacks.  I'm not an expert on WebAudio, but the
2845         API doesn't appear to need many optional arguments.
2846
2847         There are a bunch of APIs that have custom bindings that look like they
2848         could be autogenerated.  I've added FIXME comments where appropriate.
2849
2850         * webaudio/AudioBuffer.idl:
2851         * webaudio/AudioContext.idl:
2852         * webaudio/AudioListener.idl:
2853         * webaudio/AudioNode.idl:
2854         * webaudio/AudioPannerNode.idl:
2855         * webaudio/AudioParam.idl:
2856         * webaudio/RealtimeAnalyserNode.idl:
2857
2858 2011-06-26  Yury Semikhatsky  <yurys@chromium.org>
2859
2860         Reviewed by Pavel Feldman.
2861
2862         Web Inspector: REGRESSION Scripts panel sidebar pane context menu has no "Remove breakpoint" item
2863         https://bugs.webkit.org/show_bug.cgi?id=63421
2864
2865         Show generic sidebar menu only if no pane-specific menu has been shown.
2866
2867         * inspector/front-end/ScriptsPanel.js:
2868         (WebInspector.ScriptsPanel):
2869
2870 2011-06-26  Adam Barth  <abarth@webkit.org>
2871
2872         Build fix for clang.  Apparently clang doesn't want us to use the std
2873         namespace in headers, which makes sense.
2874
2875         * svg/SVGAnimatedType.h:
2876
2877 2011-06-26  Adam Barth  <abarth@webkit.org>
2878
2879         Reviewed by Eric Seidel.
2880
2881         Remove LegacyDefaultOptionalArguments from XMLHttpRequest.idl and XMLHttpRequestUpload.idl
2882         https://bugs.webkit.org/show_bug.cgi?id=63418
2883
2884         The XMLHttpRequest.idl interface used to implement the new behavior
2885         manually using the RequiresAllArguments attribute.  Now that we have
2886         that behavior by default, we can simply remove the
2887         LegacyDefaultOptionalArguments attribute.
2888
2889         * xml/XMLHttpRequest.idl:
2890         * xml/XMLHttpRequestUpload.idl:
2891
2892 2011-06-26  Dirk Schulze  <krit@webkit.org>
2893
2894         Reviewed by Nikolas Zimmermann.
2895
2896         SVGAnimatedType should support SVGLengthList animation
2897         https://bugs.webkit.org/show_bug.cgi?id=63399
2898
2899         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
2900         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedLengthList.
2901         
2902         Interpolated animations of glyph positions are possible now.
2903
2904         Tests: svg/animations/svglengthlist-animation-1.html
2905                svg/animations/svglengthlist-animation-2.html
2906                svg/animations/svglengthlist-animation-3.html
2907                svg/animations/svglengthlist-animation-4.html
2908
2909         * CMakeLists.txt: Add new file to build system.
2910         * GNUmakefile.list.am: Ditto.
2911         * WebCore.gypi: Ditto.
2912         * WebCore.pro: Ditto.
2913         * WebCore.xcodeproj/project.pbxproj: Ditto.
2914         * svg/SVGAllInOne.cpp: Ditto.
2915         * svg/SVGAnimateElement.cpp: Make use of AnimatedLengthList.
2916         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
2917         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2918         (WebCore::SVGAnimateElement::calculateFromAndToValues):
2919         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2920         (WebCore::SVGAnimateElement::resetToBaseValue):
2921         (WebCore::SVGAnimateElement::applyResultsToTarget):
2922         (WebCore::SVGAnimateElement::calculateDistance):
2923         * svg/SVGAnimatedLengthList.cpp: Added. New animator for SVGLengthList.
2924         (WebCore::SVGAnimatedLengthListAnimator::SVGAnimatedLengthListAnimator):
2925         (WebCore::SVGAnimatedLengthListAnimator::constructFromString):
2926         (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndToValues):
2927         (WebCore::SVGAnimatedLengthListAnimator::calculateFromAndByValues):
2928         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2929         (WebCore::SVGAnimatedLengthListAnimator::calculateDistance):
2930         * svg/SVGAnimatedLengthList.h:
2931         (WebCore::SVGAnimatedLengthListAnimator::~SVGAnimatedLengthListAnimator):
2932         * svg/SVGAnimatedType.cpp: Add SVGLengthList.
2933         (WebCore::SVGAnimatedType::~SVGAnimatedType):
2934         (WebCore::SVGAnimatedType::createLengthList):
2935         (WebCore::SVGAnimatedType::lengthList):
2936         (WebCore::SVGAnimatedType::valueAsString):
2937         (WebCore::SVGAnimatedType::setValueAsString):
2938         * svg/SVGAnimatedType.h:
2939         * svg/SVGAnimatorFactory.h:
2940         (WebCore::SVGAnimatorFactory::create):
2941         * svg/SVGLength.cpp: Add new constructor with LengthType, LengthMode and value.
2942         (WebCore::SVGLength::SVGLength):
2943         * svg/SVGLength.h:
2944
2945 2011-06-26  Adam Barth  <abarth@webkit.org>
2946
2947         Reviewed by Eric Seidel.
2948
2949         window.location should use the holder's prototype chain
2950         https://bugs.webkit.org/show_bug.cgi?id=63411
2951
2952         This patch corrects the prototype chain for Location, but we really
2953         should do a complete cleanup of the prototype chain generation, like we
2954         did for JavaScriptCore.
2955
2956         Test: http/tests/security/location-prototype.html
2957
2958         * bindings/scripts/CodeGeneratorV8.pm:
2959
2960 2011-06-26  Adam Barth  <abarth@webkit.org>
2961
2962         Reviewed by Eric Seidel.
2963
2964         Add [Optional] attributes where appropriate for addEventListener and removeEventListener
2965         https://bugs.webkit.org/show_bug.cgi?id=63417
2966
2967         This patch doesn't actually change behavior because these interfaces
2968         have the LegacyDefaultOptionalArguments attribute.  This patch paves
2969         the way to removing LegacyDefaultOptionalArguments from some of these
2970         interfaces as well as making the project safer for copy-and-pasting
2971         these methods into new IDL files that don't have the
2972         LegacyDefaultOptionalArguments attribute.
2973
2974         * bindings/scripts/test/TestObj.idl:
2975         * dom/EventTarget.idl:
2976         * dom/MediaStream.idl:
2977         * dom/MessagePort.idl:
2978         * dom/Node.idl:
2979         * loader/appcache/DOMApplicationCache.idl:
2980         * notifications/Notification.idl:
2981         * page/DOMWindow.idl:
2982         * page/EventSource.idl:
2983         * storage/IDBRequest.idl:
2984         * storage/IDBTransaction.idl:
2985         * svg/SVGElementInstance.idl:
2986         * websockets/WebSocket.idl:
2987         * workers/AbstractWorker.idl:
2988         * workers/WorkerContext.idl:
2989         * xml/XMLHttpRequest.idl:
2990         * xml/XMLHttpRequestUpload.idl:
2991
2992 2011-06-26  Adam Barth  <abarth@webkit.org>
2993
2994         Reviewed by Kent Tamura.
2995
2996         m_formElementsWithFormAttribute doesn't ref the objects it holds
2997         https://bugs.webkit.org/show_bug.cgi?id=62956
2998
2999         Test: fast/forms/form-associated-element-crash3.html
3000
3001         * dom/Document.h:
3002
3003 2011-06-26  Dimitri Glazkov  <dglazkov@chromium.org>
3004
3005         Reviewed by Adam Barth.
3006
3007         FileList::filenames should be FileList::paths, because it's more accurate.
3008         https://bugs.webkit.org/show_bug.cgi?id=63414
3009
3010         Refactoring, no change in behavior.
3011
3012         * fileapi/FileList.cpp:
3013         (WebCore::FileList::paths): Renamed from filenames.
3014         * fileapi/FileList.h:
3015         * html/FileInputType.cpp:
3016         (WebCore::FileInputType::handleDOMActivateEvent): Changed to use filenames, also fixed a reach-unto-thyself whoopsie.
3017         (WebCore::FileInputType::requestIcon): Ditto.
3018         (WebCore::FileInputType::filesChosen): Ditto.
3019         * rendering/RenderFileUploadControl.cpp:
3020         (WebCore::RenderFileUploadControl::fileTextValue): Ditto.
3021
3022 2011-06-26  Young Han Lee  <joybro@company100.net>
3023
3024         Reviewed by Dirk Schulze.
3025
3026         SVGAnimation - keyTime value 1 never get animated
3027         https://bugs.webkit.org/show_bug.cgi?id=63230
3028
3029         According to the SMIL 3.0 specification, the index of the keyTimes should be 
3030         determined under the end-point-exclusive rule (e.g. Given keyTimes(0;0.5;1) 
3031         and t=0.5, the current index of the keyTimes have to be 1 not 0).
3032         http://www.w3.org/TR/SMIL3/smil-animation.html#animationNS-InterpolationExamplesAdvanced
3033
3034         Test: svg/animations/animate-number-calcMode-discrete-keyTimes.html
3035
3036         * svg/SVGAnimationElement.cpp:
3037         (WebCore::SVGAnimationElement::calculateKeyTimesIndex):
3038
3039 2011-06-26  Dan Bernstein  <mitz@apple.com>
3040
3041         Reviewed by Darin Adler.
3042
3043         With word-break: break-all, words do not break correctly before a surrogate pair
3044         https://bugs.webkit.org/show_bug.cgi?id=63401
3045
3046         The code to check for mid-word breaks accumulates width one character at a time. It was actually
3047         measuring the two parts of the surrogate pair individually, so they appeared to have zero width.
3048         Fixed by checking for surrogate pairs and measuring the pair as one unit.
3049
3050         Test: fast/text/midword-break-before-surrogate-pair.html
3051
3052         * rendering/RenderBlockLineLayout.cpp:
3053         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
3054
3055 2011-06-26  Dirk Schulze  <krit@webkit.org>
3056
3057         Reviewed by Nikolas Zimmermann.
3058
3059         SVGAnimatedType should support SVGNumberOptionalNumber animation
3060         https://bugs.webkit.org/show_bug.cgi?id=63397
3061         
3062         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
3063         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGAnimatedNumberOptionalNumber.
3064         
3065         Animations of attributes with type SVGAnimatedNumberOptionalNumber can be interpolated now. This can be used for smooth
3066         growing shadows with feGaussianBlur, feDropShadow or other filter effects.
3067
3068         Tests: svg/animations/svgnumberoptionalnumber-animation-1.html
3069                svg/animations/svgnumberoptionalnumber-animation-2.html
3070                svg/animations/svgnumberoptionalnumber-animation-3.html
3071                svg/animations/svgnumberoptionalnumber-animation-4.html
3072
3073         * CMakeLists.txt: Added new files to build system.
3074         * GNUmakefile.list.am: Ditto.
3075         * WebCore.gypi: Ditto.
3076         * WebCore.pro: Ditto.
3077         * WebCore.vcproj/WebCore.vcproj: Ditto.
3078         * WebCore.xcodeproj/project.pbxproj: Ditto.
3079         * svg/SVGAllInOne.cpp: Ditto.
3080         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberOptionalNumber.
3081         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
3082         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3083         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3084         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3085         (WebCore::SVGAnimateElement::resetToBaseValue):
3086         (WebCore::SVGAnimateElement::applyResultsToTarget):
3087         (WebCore::SVGAnimateElement::calculateDistance):
3088         * svg/SVGAnimatedNumberOptionalNumber.cpp: Added. New animator for SVGAnimatedNumberOptionalNumber.
3089         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::SVGAnimatedNumberOptionalNumberAnimator):
3090         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
3091         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndToValues):
3092         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateFromAndByValues):
3093         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
3094         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateDistance):
3095         * svg/SVGAnimatedNumberOptionalNumber.h: Added.
3096         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::~SVGAnimatedNumberOptionalNumberAnimator):
3097         * svg/SVGAnimatedType.cpp: Added new type: pair<float, float>.
3098         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3099         (WebCore::SVGAnimatedType::createNumberOptionalNumber):
3100         (WebCore::SVGAnimatedType::numberOptionalNumber):
3101         (WebCore::SVGAnimatedType::valueAsString):
3102         (WebCore::SVGAnimatedType::setValueAsString):
3103         * svg/SVGAnimatedType.h:
3104         * svg/SVGAnimatorFactory.h: Add new animator to factory.
3105         (WebCore::SVGAnimatorFactory::create):
3106
3107 2011-06-25  Dimitri Glazkov  <dglazkov@chromium.org>
3108
3109         Reviewed by Adam Barth.
3110
3111         Crash in frameless document with media element.
3112         https://bugs.webkit.org/show_bug.cgi?id=63393
3113
3114         Since MediaControls::create can return 0 (and does for frameless documents), we must anticipate it
3115         in the calling code.
3116
3117         Test: fast/dom/shadow/frameless-media-element-crash.html
3118
3119         * html/HTMLMediaElement.cpp:
3120         (WebCore::HTMLMediaElement::attributeChanged): Changed to bail out if controls weren't successfully created.
3121         (WebCore::HTMLMediaElement::createMediaControls): Renamed to better reflect the purpose, changed to handle failure of creation.
3122         (WebCore::HTMLMediaElement::preDispatchEventHandler): Changed to bail out if controls weren't successfully created.
3123         * html/HTMLMediaElement.h: Adjusted def.
3124
3125 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3126
3127         Reviewed by Darin Adler.
3128
3129         Fix some minor style issues
3130         https://bugs.webkit.org/show_bug.cgi?id=63391
3131
3132         * inspector/DOMNodeHighlighter.cpp:
3133         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
3134         The explicit WebCore namespace usage can be dropped.
3135
3136         * rendering/RenderView.cpp:
3137         (WebCore::RenderView::mapLocalToContainer):
3138         Use ASSERT_UNUSED for a parameter that we want to ASSERT
3139         on for a debug build, but is UNUSED in a release build.
3140
3141 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3142
3143         Unreviewed build fix.
3144
3145         Use UNUSED_PARAM on the correct param!
3146
3147         * rendering/RenderView.cpp:
3148         (WebCore::RenderView::mapLocalToContainer):
3149
3150 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3151
3152         Reviewed by Simon Fraser.
3153
3154         Inspector highlight rect is wrong for contents of transformed iframes
3155         https://bugs.webkit.org/show_bug.cgi?id=53627
3156
3157         Part 2: Only adjust for the FrameView's scroll position when
3158         the localToAbsolute mapping did not end with fixed content.
3159         Content that is inside of a fixed position container is already
3160         adjusted for the FrameView's scrollPosition when RenderView
3161         maps local to container.
3162
3163         This patch uses a "wasFixed" out parameter to determine if
3164         the localToAbsolute transformation ended inside a fixed block,
3165         and if so does not apply the scroll position.
3166
3167         * page/FrameView.cpp:
3168         (WebCore::FrameView::convertFromRenderer):
3169         Respect wasFixed as described above.
3170
3171         * rendering/RenderBox.h:
3172         * rendering/RenderBox.cpp:
3173         (WebCore::RenderBox::mapLocalToContainer):
3174         This is the only time that "fixed" ever changed. So when
3175         fixed changes, update the optional wasFixed out parameter.
3176
3177         * rendering/RenderObject.cpp:
3178         (WebCore::RenderObject::localToAbsolute):
3179         (WebCore::RenderObject::mapLocalToContainer):
3180         (WebCore::RenderObject::localToContainerQuad):
3181         * rendering/RenderObject.h:
3182         (WebCore::RenderObject::localToAbsoluteQuad):
3183         Ignore wasFixed by default, but pipe it though where needed.
3184
3185         * rendering/RenderView.h:
3186         * rendering/RenderView.cpp:
3187         (WebCore::RenderView::mapLocalToContainer):
3188         This is the final recursive call, so wasFixed goes no
3189         further. We sanity check its value in debug builds.
3190
3191         * rendering/RenderBlock.cpp:
3192         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3193         * rendering/RenderInline.cpp:
3194         (WebCore::RenderInline::mapLocalToContainer):
3195         * rendering/RenderInline.h:
3196         * rendering/svg/RenderSVGForeignObject.cpp:
3197         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
3198         * rendering/svg/RenderSVGForeignObject.h:
3199         * rendering/svg/RenderSVGInline.cpp:
3200         (WebCore::RenderSVGInline::mapLocalToContainer):
3201         * rendering/svg/RenderSVGInline.h:
3202         * rendering/svg/RenderSVGModelObject.cpp:
3203         (WebCore::RenderSVGModelObject::mapLocalToContainer):
3204         * rendering/svg/RenderSVGModelObject.h:
3205         * rendering/svg/RenderSVGRoot.cpp:
3206         (WebCore::RenderSVGRoot::mapLocalToContainer):
3207         * rendering/svg/RenderSVGRoot.h:
3208         * rendering/svg/RenderSVGText.cpp:
3209         (WebCore::RenderSVGText::mapLocalToContainer):
3210         * rendering/svg/RenderSVGText.h:
3211         * rendering/svg/SVGRenderSupport.cpp:
3212         (WebCore::SVGRenderSupport::mapLocalToContainer):
3213         * rendering/svg/SVGRenderSupport.h:
3214         Pipe wasFixed through where needed.
3215
3216 2011-06-25  Joseph Pecoraro  <joepeck@webkit.org>
3217
3218         Reviewed by Simon Fraser.
3219
3220         Inspector highlight rect is wrong for contents of transformed iframes
3221         https://bugs.webkit.org/show_bug.cgi?id=53627
3222
3223         Part 1: Provide FloatQuad versions of convertFromRenderer,
3224         convertToContainingView, and convertChildToSelf, so that we
3225         can get the fully transformed quad of a renderer all the
3226         way up to the root widget.
3227
3228         * page/FrameView.cpp:
3229         (WebCore::FrameView::convertFromRenderer):
3230         (WebCore::FrameView::convertToContainingView):
3231         * page/FrameView.h:
3232         * platform/ScrollView.h:
3233         (WebCore::ScrollView::convertChildToSelf):
3234         * platform/Widget.h:
3235         * platform/Widget.cpp:
3236         (WebCore::Widget::convertToContainingView):
3237         Provide FloatQuad versions of these already existing functions.
3238
3239         (WebCore::Widget::convertToRootContainingView):
3240         Provide a helper conversion function to recursively
3241         convert a given FloatQuad up to the root widget.
3242
3243         * inspector/DOMNodeHighlighter.cpp:
3244         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
3245         Use the new methods to convert the FloatQuad for the highlighted
3246         node to the root container, without losing transformation
3247         information. Add a FIXME for SVG, which is still broken.
3248
3249         * WebCore.exp.in:
3250         Export the new Widget functions so WebKit can link properly.
3251
3252 2011-06-25  Dirk Schulze  <krit@webkit.org>
3253
3254         Unreviewed build fix.
3255
3256         SVGAnimatedType should support SVGNumberList animation
3257         https://bugs.webkit.org/show_bug.cgi?id=63387
3258
3259         * svg/SVGAnimatedNumberList.cpp:
3260         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3261
3262 2011-06-25  Dirk Schulze  <krit@webkit.org>
3263
3264         Reviewed by Nikolas Zimmermann.
3265
3266         SVGAnimatedType should support SVGNumberList animation
3267         https://bugs.webkit.org/show_bug.cgi?id=63387
3268         
3269         Follow up of "SVGAnimation should use direct unit animation for SVGLength": https://bugs.webkit.org/show_bug.cgi?id=61368
3270         This patch continues the conversion to the new concept of SVGAnimatorFactory with SVGNumberList.
3271         
3272         Animations of attributes with type SVGNumberList can be interpolated now.
3273
3274         Tests: svg/animations/svgnumberlist-animation-1.html
3275                svg/animations/svgnumberlist-animation-2.html
3276
3277         * CMakeLists.txt: Added new file to build system.
3278         * GNUmakefile.list.am: Ditto.
3279         * WebCore.gypi: Ditto.
3280         * WebCore.pro: Ditto.
3281         * WebCore.xcodeproj/project.pbxproj: Ditto.
3282         * svg/SVGAllInOne.cpp: Ditto.
3283         * svg/SVGAnimateElement.cpp: Make use of attribute type AnimatedNumberList.
3284         (WebCore::SVGAnimateElement::determineAnimatedAttributeType):
3285         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3286         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3287         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3288         (WebCore::SVGAnimateElement::resetToBaseValue):
3289         (WebCore::SVGAnimateElement::applyResultsToTarget):
3290         (WebCore::SVGAnimateElement::calculateDistance):
3291         * svg/SVGAnimatedNumber.cpp:
3292         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedNumber): Made method static for reuse in SVGAnimatedNumberList (and SVGAnimatedNumberOptionalNumber later).
3293         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): Use new static function.
3294         * svg/SVGAnimatedNumber.h:
3295         * svg/SVGAnimatedNumberList.cpp: Added. New animator for SVGNumberList.
3296         (WebCore::SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator):
3297         (WebCore::SVGAnimatedNumberListAnimator::constructFromString):
3298         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndToValues):
3299         (WebCore::SVGAnimatedNumberListAnimator::calculateFromAndByValues):
3300         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
3301         (WebCore::SVGAnimatedNumberListAnimator::calculateDistance):
3302         * svg/SVGAnimatedNumberList.h:
3303         (WebCore::SVGAnimatedNumberListAnimator::~SVGAnimatedNumberListAnimator):
3304         * svg/SVGAnimatedType.cpp: Use new Animator.
3305         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3306         (WebCore::SVGAnimatedType::createNumberList):
3307         (WebCore::SVGAnimatedType::numberList):
3308         (WebCore::SVGAnimatedType::valueAsString):
3309         (WebCore::SVGAnimatedType::setValueAsString):
3310         * svg/SVGAnimatedType.h:
3311         * svg/SVGAnimatorFactory.h:
3312         (WebCore::SVGAnimatorFactory::create):
3313
3314 2011-06-25  Nikolas Zimmermann  <nzimmermann@rim.com>
3315
3316         Reviewed by Dirk Schulze.
3317
3318         Convert SVGPath to SVGAnimatorFactory concept
3319         https://bugs.webkit.org/show_bug.cgi?id=63336
3320
3321         Convert <animate attributeName="d"> parsing to the new SVGAnimatorFactory concept, removing
3322         the last special data types from SVGAnimateElement: SVGPathByteStream m_fromPath/m_toPath/m_animatedPath.
3323         All existing non-string primitives have been converted to the new concept.
3324
3325         Doesn't change any functionality.
3326
3327         * CMakeLists.txt: Added SVGAnimatedPath.*.
3328         * GNUmakefile.list.am: Ditto.
3329         * WebCore.gypi: Ditto.
3330         * WebCore.pro: Ditto.
3331         * WebCore.vcproj/WebCore.vcproj: Ditto.
3332         * WebCore.xcodeproj/project.pbxproj: Ditto.
3333         * svg/SVGAllInOne.cpp: Ditto.
3334         * svg/SVGAnimateElement.cpp:
3335         (WebCore::SVGAnimateElement::SVGAnimateElement):
3336         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3337         (WebCore::SVGAnimateElement::calculateFromAndToValues):
3338         (WebCore::SVGAnimateElement::calculateFromAndByValues):
3339         (WebCore::SVGAnimateElement::resetToBaseValue):
3340         (WebCore::SVGAnimateElement::applyResultsToTarget):
3341         * svg/SVGAnimateElement.h:
3342         * svg/SVGAnimatedPath.cpp: Added.
3343         (WebCore::SVGAnimatedPathAnimator::SVGAnimatedPathAnimator):
3344         (WebCore::SVGAnimatedPathAnimator::constructFromString):
3345         (WebCore::SVGAnimatedPathAnimator::calculateFromAndToValues):
3346         (WebCore::SVGAnimatedPathAnimator::calculateFromAndByValues):
3347         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
3348         (WebCore::SVGAnimatedPathAnimator::calculateDistance):
3349         * svg/SVGAnimatedPath.h: Added.
3350         (WebCore::SVGAnimatedPathAnimator::~SVGAnimatedPathAnimator):
3351         * svg/SVGAnimatedType.cpp:
3352         (WebCore::SVGAnimatedType::~SVGAnimatedType):
3353         (WebCore::SVGAnimatedType::createPath):
3354         (WebCore::SVGAnimatedType::path):
3355         (WebCore::SVGAnimatedType::valueAsString):
3356         (WebCore::SVGAnimatedType::setValueAsString):
3357         * svg/SVGAnimatedType.h:
3358         * svg/SVGAnimatorFactory.h:
3359         (WebCore::SVGAnimatorFactory::create):
3360         * svg/SVGPathByteStream.h:
3361         (WebCore::SVGPathByteStream::initializeFrom):
3362         * svg/SVGPathParserFactory.cpp:
3363         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromSVGPathSegList):
3364         (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromString):
3365         (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream):
3366
3367 2011-06-25  Jer Noble  <jer.noble@apple.com>
3368
3369         Reviewed by Maciej Stachowiak.
3370
3371         SOFT_LINK_POINTER_OPTIONAL isn't optional.
3372         https://bugs.webkit.org/show_bug.cgi?id=63378
3373
3374         Continuation of r89718.  SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it.
3375
3376         * platform/mac/SoftLinking.h:
3377
3378 2011-06-25  Rob Buis  <rbuis@rim.com>
3379
3380         Reviewed by Nikolas Zimmermann.
3381
3382         SVG1.1SE test linking-uri-01-b.svg fails
3383         https://bugs.webkit.org/show_bug.cgi?id=63322
3384
3385         Allow navigating to internal <view> targets. When choosing Back ensure
3386         the <svg> current view is initialized correctly.
3387
3388         Tests: svg/W3C-SVG-1.1-SE/linking-uri-01-b.svg
3389                svg/custom/linking-uri-01-b.svg
3390
3391         * page/FrameView.cpp: Delegate to setupInitialView.
3392         (WebCore::FrameView::scrollToAnchor):
3393         * svg/SVGAElement.cpp: Allow navigating to internal <view> targets.
3394         (WebCore::SVGAElement::defaultEventHandler):
3395         * svg/SVGSVGElement.cpp:
3396         (WebCore::SVGSVGElement::setupInitialView): Initialize current view depending on fragment identifier.
3397         (WebCore::SVGSVGElement::inheritViewAttributes):
3398         * svg/SVGSVGElement.h:
3399
3400 2011-06-24  Dimitri Glazkov  <dglazkov@chromium.org>
3401
3402         Reviewed by Darin Adler.
3403
3404         REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors
3405         https://bugs.webkit.org/show_bug.cgi?id=63373
3406
3407         * css/CSSStyleSelector.cpp:
3408         (WebCore::CSSStyleSelector::pushParentStackFrame): Changed to use parentOrHostElement.
3409         (WebCore::CSSStyleSelector::pushParent): Ditto.
3410         * dom/Node.cpp:
3411         (WebCore::Node::parentOrHostElement): Added.
3412         * dom/Node.h:
3413
3414 2011-06-24  Dan Bernstein  <mitz@apple.com>
3415
3416         Reviewed by Anders Carlsson.
3417
3418         Add an option to enable legacy rounding hacks
3419         https://bugs.webkit.org/show_bug.cgi?id=63363
3420
3421         Restored most of text rounding hacks which were removed in r78846, with a global flag to control
3422         whether rounding hacks are allowed, which defaults to false.
3423
3424         Test: platform/mac/fast/text/rounding-hacks.html
3425
3426         * CMakeLists.txt: Added TextRun.cpp.
3427         * GNUmakefile.list.am: Ditto.
3428         * WebCore.exp.in: Export new TextRun function and global and updated StringTruncator functions.
3429         * WebCore.gypi: Added TextRun.cpp.
3430         * WebCore.pro: Ditto.
3431         * WebCore.vcproj/WebCore.vcproj: Ditto.
3432         * WebCore.xcodeproj/project.pbxproj: Ditto.
3433         * html/canvas/CanvasRenderingContext2D.cpp:
3434         (WebCore::CanvasRenderingContext2D::drawTextInternal): Disable rounding hacks in the one place
3435         they used to be disabled.
3436         * platform/graphics/Font.cpp: Re-added the rounding character table.
3437         * platform/graphics/Font.h:
3438         (WebCore::Font::isRoundingHackCharacter): Re-added.
3439         * platform/graphics/FontFastPath.cpp:
3440         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Account for final rounding width.
3441         * platform/graphics/SimpleFontData.cpp:
3442         (WebCore::SimpleFontData::platformGlyphInit): Initialize m_adjustedSpaceWidth.
3443         * platform/graphics/SimpleFontData.h:
3444         (WebCore::SimpleFontData::adjustedSpaceWidth): Re-added.
3445         * platform/graphics/StringTruncator.cpp:
3446         (WebCore::stringWidth): Re-added disableRoundingHacks parameter.
3447         (WebCore::truncateString): Ditto.
3448         (WebCore::StringTruncator::centerTruncate): Added EnableRoundingHacksOrNot parameter.
3449         (WebCore::StringTruncator::rightTruncate): Ditto.
3450         (WebCore::StringTruncator::width): Ditto.
3451         * platform/graphics/StringTruncator.h:
3452         * platform/graphics/TextRun.cpp: Added.
3453         (WebCore::TextRun::setAllowsRoundingHacks): Added.
3454         * platform/graphics/TextRun.h:
3455         (WebCore::TextRun::TextRun): Added RoundingHacks parameter to the constructors, used to initialize
3456         the m_applyRunRounding and m_applyWordRounding member variables, subject to rounding hacks being allowed.
3457         (WebCore::TextRun::applyRunRounding): Re-added this accessor.
3458         (WebCore::TextRun::applyWordRounding): Ditto.