Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=91931
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
2
3         https://bugs.webkit.org/show_bug.cgi?id=91931
4
5         Reviewed by Vsevolod Vlasov.
6
7         - Synthetic shorthand values are now only returned for source-less styles
8         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
9         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
10         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
11
12         Test: inspector/styles/styles-overriden-properties.html
13
14         * inspector/Inspector.json:
15         * inspector/InspectorCSSAgent.cpp:
16         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
17         * inspector/InspectorCSSAgent.h:
18         (InspectorCSSAgent):
19         * inspector/InspectorStyleSheet.cpp:
20         (WebCore::InspectorStyle::styleWithProperties):
21         * inspector/front-end/CSSCompletions.js:
22         (WebInspector.CSSCompletions):
23         (WebInspector.CSSCompletions.requestCSSNameCompletions):
24         (WebInspector.CSSCompletions.prototype._closest):
25         (WebInspector.CSSCompletions.prototype.longhands):
26         (WebInspector.CSSCompletions.prototype.shorthands):
27         * inspector/front-end/CSSStyleModel.js:
28         (WebInspector.CSSStyleDeclaration):
29         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
30         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
31         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
32         (WebInspector.CSSProperty):
33         (WebInspector.CSSProperty.parsePayload):
34         * inspector/front-end/SourceCSSTokenizer.js:
35         (WebInspector.SourceCSSTokenizer):
36         * inspector/front-end/SourceCSSTokenizer.re2js:
37         * inspector/front-end/StylesSidebarPane.js:
38         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
39         (WebInspector.StylePropertiesSection.prototype.update):
40         (WebInspector.StylePropertiesSection.prototype.onpopulate):
41         (WebInspector.StylePropertyTreeElement.prototype):
42
43 2012-07-25  Keishi Hattori  <keishi@webkit.org>
44
45         Implement ColorSuggestionPicker page popup
46         https://bugs.webkit.org/show_bug.cgi?id=92109
47
48         Reviewed by Kent Tamura.
49
50         Implements ColorSuggestionPicker page popup. This will be used in
51         certain ports as the datalist UI for <input type=color>.
52
53         No new tests because there is no way to open the popup yet.
54
55         * Resources/colorSuggestionPicker.css: Added.
56         (body):
57         (#main):
58         (.color-swatch):
59         (.color-swatch:hover):
60         (.color-swatch-container):
61         (.other-color):
62         * Resources/colorSuggestionPicker.js: Added.
63         (getScrollbarWidth):When there are more than 20 colors we need to
64         increase the window width to accommodate the scroll bar.
65         (createElement):
66         (handleMessage):
67         (initialize):
68         (handleArgumentsTimeout):
69         (validateArguments):
70         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
71         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
72         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
73         (ColorPicker):
74         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
75         grid.
76         (ColorPicker.prototype._handleSwatchClick):
77         * WebCore.gyp/WebCore.gyp:
78
79 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
80
81         Fix arithmetic composite filter for auto-vectorization
82         https://bugs.webkit.org/show_bug.cgi?id=92123
83
84         Reviewed by Nikolas Zimmermann.
85
86         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
87         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
88
89         * platform/graphics/filters/FEComposite.cpp:
90         (WebCore::computeArithmeticPixelsUnclamped):
91         (WebCore::arithmeticSoftware):
92
93 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
94
95         Fix blend filter for autovectorizing
96         https://bugs.webkit.org/show_bug.cgi?id=91398
97
98         Reviewed by Nikolas Zimmermann.
99
100         Get rid of wrapper classes, and use functions directly as template argument.
101
102         * platform/graphics/filters/FEBlend.cpp:
103         (WebCore::feBlendNormal):
104         (WebCore::feBlendMultiply):
105         (WebCore::feBlendScreen):
106         (WebCore::feBlendDarken):
107         (WebCore::feBlendLighten):
108         (WebCore::feBlendUnknown):
109         (WebCore::platformApply):
110         (WebCore::FEBlend::platformApplyGeneric):
111
112 2012-07-25  Keishi Hattori  <keishi@webkit.org>
113
114         Add methods to ColorChooserClient so the color chooser can show suggestions
115         https://bugs.webkit.org/show_bug.cgi?id=92114
116
117         Reviewed by Kent Tamura.
118
119         Added methods to ColorChooserClient so the color chooser can ask the
120         client for suggestions and current color.
121
122         No new tests. The methods are not used yet.
123
124         * html/ColorInputType.cpp:
125         (WebCore::ColorInputType::currentColor): Returns what color the color
126         chooser should display.
127         (WebCore):
128         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
129         suggestions should be shown.
130         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
131         suggested to the user.
132         * html/ColorInputType.h:
133         (ColorInputType):
134         * html/HTMLInputElement.h:
135         (HTMLInputElement): Made dataList() public.
136         * platform/ColorChooserClient.h:
137         (ColorChooserClient):
138
139 2012-07-25  Kentaro Hara  <haraken@chromium.org>
140
141         Replace int with long in test IDL files
142         https://bugs.webkit.org/show_bug.cgi?id=92181
143
144         Reviewed by Adam Barth.
145
146         int is not a valid type in WebIDL. It should be long.
147         We should replace int with long in bindings/scripts/test/*.idl.
148         This is a follow-up patch for r123550.
149
150         Test: bindings/scripts/test/TestObj.idl
151
152         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
153         (WebDOMTestObj::readOnlyLongAttr):
154         (WebDOMTestObj::Attr):
155         (WebDOMTestObj::setAttr):
156         (WebDOMTestObj::voidMethodWithArgs):
157         (WebDOMTestObj::Method):
158         (WebDOMTestObj::MethodWithArgs):
159         (WebDOMTestObj::objMethodWithArgs):
160         * bindings/scripts/test/CPP/WebDOMTestObj.h:
161         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
162         (webkit_dom_test_obj_set_property):
163         (webkit_dom_test_obj_get_property):
164         (webkit_dom_test_obj_class_init):
165         (webkit_dom_test_obj_void_method_with_args):
166         (webkit_dom_test_obj_method):
167         (webkit_dom_test_obj_method_with_args):
168         (webkit_dom_test_obj_obj_method_with_args):
169         (webkit_dom_test_obj_get_read_only_long_attr):
170         (webkit_dom_test_obj_get_attr):
171         (webkit_dom_test_obj_set_attr):
172         (webkit_dom_test_obj_get_strawberry):
173         (webkit_dom_test_obj_set_strawberry):
174         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
175         * bindings/scripts/test/JS/JSTestObj.cpp:
176         (WebCore):
177         (WebCore::jsTestObjReadOnlyLongAttr):
178         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
179         (WebCore::jsTestObjAttr):
180         (WebCore::setJSTestObjAttr):
181         (WebCore::setJSTestObjStrawberry):
182         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
183         (WebCore::jsTestObjPrototypeFunctionMethod):
184         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
185         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
186         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
187         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
188         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
189         * bindings/scripts/test/JS/JSTestObj.h:
190         (WebCore):
191         * bindings/scripts/test/ObjC/DOMTestObj.h:
192         * bindings/scripts/test/ObjC/DOMTestObj.mm:
193         (-[DOMTestObj readOnlyLongAttr]):
194         (-[DOMTestObj Attr]):
195         (-[DOMTestObj setAttr:]):
196         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
197         (-[DOMTestObj Method]):
198         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
199         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
200         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
201         * bindings/scripts/test/TestObj.idl:
202         * bindings/scripts/test/V8/V8TestObj.cpp:
203         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
204         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
205         (WebCore::TestObjV8Internal::AttrAttrGetter):
206         (WebCore::TestObjV8Internal::AttrAttrSetter):
207         (WebCore::TestObjV8Internal::strawberryAttrSetter):
208         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
209         (WebCore::TestObjV8Internal::MethodCallback):
210         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
211         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
212         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
213         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
214         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
215         (WebCore):
216         (WebCore::ConfigureV8TestObjTemplate):
217
218 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
219
220         A validation bubble should not be modifiable.
221         https://bugs.webkit.org/show_bug.cgi?id=92217
222
223         Reviewed by Kent Tamura.
224
225         A user can set -webkit-user-modify: read-write to validation message elements.
226         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
227
228         Test: fast/forms/validation-user-modify.html
229
230         * css/html.css:
231         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
232         changed by a user.
233         (::-webkit-validation-bubble):
234         (::-webkit-validation-bubble-message):
235         (::-webkit-validation-bubble-text-block):
236         (::-webkit-validation-bubble-heading):
237         (::-webkit-validation-bubble-arrow):
238         (::-webkit-validation-bubble-arrow-clipper):
239
240 2012-07-25  Zeno Albisser  <zeno@webkit.org>
241
242         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
243         https://bugs.webkit.org/show_bug.cgi?id=92159
244
245         Disable CopyToTexture feature for GraphicsSurface on Mac.
246         While this is actually working, it is currently used for Tiles
247         that are single buffered, and therefore requires a call to glFlush.
248         This call blocks the GPU for about 40ms which would make smooth animations impossible.
249
250         Reviewed by Noam Rosenthal.
251
252         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
253         (WebCore::GraphicsSurface::platformCreate):
254         (WebCore::GraphicsSurface::platformImport):
255
256 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
257
258         [Chromium] Fix up includes in HarfBuzzNGFace.h
259         https://bugs.webkit.org/show_bug.cgi?id=92127
260
261         Reviewed by Hajime Morita.
262
263         Move constructors of FontPlatformData from headers to corresponding cpp files
264         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
265         This way we can include hb.h in HarfBuzzNGFace.h.
266
267         No new tests. No changes in behavior.
268
269         * platform/graphics/FontPlatformData.cpp:
270         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
271         (WebCore):
272         * platform/graphics/FontPlatformData.h:
273         (WebCore):
274         (FontPlatformData): Moved to cpp file.
275         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
276         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
277         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
278         (WebCore):
279         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
280         (WebCore):
281         (FontPlatformData): Moved to cpp file.
282         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
283
284 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
285
286         QualifiedName's HashSet should be big enough to hold at least all the static names
287         https://bugs.webkit.org/show_bug.cgi?id=91891
288
289         Reviewed by Darin Adler.
290
291         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
292         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
293
294         The small base size forces us to grow and rehash the table several time on startup.
295
296         This patch solves the issue by defining the initial table size to the minimum size that
297         can hold all the static QualifiedName.
298
299         * dom/QualifiedName.cpp:
300         (QualifiedNameHashTraits):
301         * dom/make_names.pl:
302         (printNamesHeaderFile):
303
304 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
305
306         Remove anonymous namespace and make functions static.
307         https://bugs.webkit.org/show_bug.cgi?id=92214
308
309         Reviewed by Adam Barth.
310
311         Mark functions as static instead of enclosing them in anonymous namespaces.
312         One exception to this rule is when a function is passed as a template argument.
313         In this case, the function must have an external linkage.
314
315         No functional change. Covered by existing tests.
316
317         * html/parser/HTMLConstructionSite.cpp:
318         (WebCore::hasImpliedEndTag):
319         (WebCore::causesFosterParenting):
320         (WebCore::isAllWhitespace):
321         * html/parser/HTMLDocumentParser.cpp:
322         (WebCore):
323         (WebCore::tokenizerStateForContextElement):
324         * html/parser/HTMLElementStack.cpp:
325         (WebCore::isNumberedHeaderElement):
326         (WebCore::isRootNode):
327         (WebCore):
328         * html/parser/HTMLEntityParser.cpp:
329         (WebCore::isAlphaNumeric):
330         * html/parser/HTMLEntitySearch.cpp:
331         (WebCore::halfway):
332         * html/parser/HTMLPreloadScanner.cpp:
333         (WebCore):
334         * html/parser/HTMLTokenizer.cpp:
335         (WebCore::toLowerCase):
336         (WebCore::vectorEqualsString):
337         (WebCore::isEndTagBufferingState):
338         * html/parser/HTMLTreeBuilder.cpp:
339         (WebCore):
340         (WebCore::uninitializedPositionValue1):
341         (WebCore::isAllWhitespace):
342         (WebCore::isAllWhitespaceOrReplacementCharacters):
343         (WebCore::isNumberedHeaderTag):
344         (WebCore::isCaptionColOrColgroupTag):
345         (WebCore::isTableCellContextTag):
346         (WebCore::isTableBodyContextTag):
347         (WebCore::isSpecialNode):
348         (WebCore::isNonAnchorNonNobrFormattingTag):
349         (WebCore::isNonAnchorFormattingTag):
350         (WebCore::isFormattingTag):
351         (WebCore::closestFormAncestor):
352         (WebCore::mapLoweredLocalNameToName):
353         (WebCore::adjustSVGTagNameCase):
354         (WebCore::adjustAttributes):
355         (WebCore::adjustSVGAttributes):
356         (WebCore::adjustMathMLAttributes):
357         (WebCore::addNamesWithPrefix):
358         (WebCore::adjustForeignAttributes):
359
360 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
361
362         Unreviewed r123494 follow-up: fixed inspector undock icon.
363
364         * inspector/front-end/Images/statusbarButtonGlyphs.png:
365
366 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
367
368         Read tag names and attributes from the saved tokens where possible.
369         https://bugs.webkit.org/show_bug.cgi?id=92079
370
371         Reviewed by Adam Barth.
372
373         Read tag names and attributes from the saved tokens, not from the DOM.
374         Also added convenient methods such as hasLocalName, hasTagName, localName,
375         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
376
377         No new tests, covered by existing tests.
378
379         * html/parser/HTMLConstructionSite.cpp:
380         (WebCore::HTMLNames::hasImpliedEndTag):
381         (WebCore::HTMLNames::causesFosterParenting):
382         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
383         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
384         (WebCore::HTMLConstructionSite::shouldFosterParent):
385         * html/parser/HTMLConstructionSite.h:
386         (WebCore::HTMLConstructionSite::currentStackItem):
387         * html/parser/HTMLElementStack.cpp:
388         (WebCore::HTMLNames::isNumberedHeaderElement):
389         (WebCore::HTMLNames::isRootNode):
390         (WebCore::HTMLNames::isScopeMarker):
391         (WebCore::HTMLNames::isListItemScopeMarker):
392         (WebCore::HTMLNames::isTableScopeMarker):
393         (WebCore::HTMLNames::isTableBodyScopeMarker):
394         (WebCore::HTMLNames::isTableRowScopeMarker):
395         (WebCore::HTMLNames::isForeignContentScopeMarker):
396         (WebCore::HTMLNames::isButtonScopeMarker):
397         (WebCore::HTMLNames::isSelectScopeMarker):
398         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
399         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
400         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
401         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
402         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
403         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
404         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
405         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
406         (WebCore::HTMLElementStack::pushRootNode):
407         (WebCore::HTMLElementStack::oneBelowTop):
408         (WebCore::HTMLElementStack::topmost):
409         (WebCore):
410         (WebCore::inScopeCommon):
411         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
412         (WebCore::HTMLElementStack::inScope):
413         * html/parser/HTMLElementStack.h:
414         (WebCore::HTMLElementStack::topStackItem):
415         (HTMLElementStack):
416         (WebCore::isInHTMLNamespace):
417         * html/parser/HTMLStackItem.h:
418         (WebCore::HTMLStackItem::isDocumentFragmentNode):
419         (WebCore::HTMLStackItem::isElementNode):
420         (HTMLStackItem):
421         (WebCore::HTMLStackItem::hasLocalName):
422         (WebCore::HTMLStackItem::hasTagName):
423         (WebCore::HTMLStackItem::HTMLStackItem):
424         * html/parser/HTMLTreeBuilder.cpp:
425         (WebCore):
426         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
427         (WebCore::HTMLTreeBuilder::processFakeEndTag):
428         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
429         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
430         (WebCore::HTMLTreeBuilder::processStartTag):
431         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
432         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
433         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
434         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
435         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
436         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
437         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
438         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
439         (WebCore::HTMLTreeBuilder::processEndTag):
440         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
441         (WebCore::HTMLTreeBuilder::processEndOfFile):
442         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
443         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
444         * html/parser/HTMLTreeBuilder.h:
445
446 2012-07-24  Hironori Bono  <hbono@chromium.org>
447
448         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
449         https://bugs.webkit.org/show_bug.cgi?id=91756
450
451         Reviewed by Tony Chang.
452
453         My r123067 moves the top-left origin of an RTL element right when its vertical
454         scrollbar is shown at its left side. (That is, r123067 moves all child objects
455         in the RTL element right.) This change also increases RenderBox::clientLeft()
456         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
457         moves positioned objects in an RTL element right at the same time. This makes
458         WebKit move objects in an RTL element up to three times by the scrollbar width.
459         (Moving an absolute object right increases the scrollWidth value and it causes
460         this bug.) This change removes unnecessary code that moves objects right in my
461         r109512 and RenderBox::clientLeft().
462
463         Test: scrollbars/rtl/div-absolute.html
464               fast/block/float/026.html
465               fast/block/float/028.html
466               fast/overflow/unreachable-overflow-rtl-bug.html
467
468         * dom/Element.cpp:
469         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
470         * rendering/RenderBlock.cpp:
471         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
472         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
473         * rendering/RenderBox.h:
474         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
475
476 2012-07-24  Dan Bernstein  <mitz@apple.com>
477
478         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
479         https://bugs.webkit.org/show_bug.cgi?id=92202
480
481         Reviewed by Beth Dakin.
482
483         Test: fast/writing-mode/positionForPoint.html
484
485         * rendering/RenderBlock.cpp:
486         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
487         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
488         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
489         point’s horizontal component; and (2) changed to use logicalTopForChild and
490         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
491         and logicalBottom, which are based on the child’s writing mode.
492
493 2012-07-24  MORITA Hajime  <morrita@google.com>
494
495         https://bugs.webkit.org/show_bug.cgi?id=89179
496         Rendering LI having Shadow DOM seems weird
497
498         Reviewed by Dimitri Glazkov.
499
500         This incorrect rendering happend because HTMLLIElement::attach()
501         wasn't aware of composed shadow subtree. This change makes it
502         aware of that using ComposedShadowTreeParentWalker.
503
504         Test: fast/dom/shadow/shadow-and-list-elements.html
505
506         * html/HTMLLIElement.cpp:
507         (WebCore::HTMLLIElement::attach):
508
509 2012-07-24  Alec Flett  <alecflett@chromium.org>
510
511         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
512         https://bugs.webkit.org/show_bug.cgi?id=92167
513
514         Reviewed by Tony Chang.
515
516         Remove implicit dependencies due to using IDBRequest.h, and fix all
517         places that break as a result.
518
519         * Modules/indexeddb/IDBCallbacks.h:
520         (WebCore):
521         * Modules/indexeddb/IDBObjectStore.cpp:
522         * Modules/indexeddb/IDBRequest.h:
523         * inspector/InspectorIndexedDBAgent.cpp:
524
525 2012-07-24  Keishi Hattori  <keishi@webkit.org>
526
527         Move PagePopupClient helper functions so they can be shared
528         https://bugs.webkit.org/show_bug.cgi?id=92096
529
530         Reviewed by Kent Tamura.
531
532         Move PagePopupClient helper functions to a separate file,
533         so they can be shared with new PagePopupClients.
534
535         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
536
537         * WebCore.gypi: Added PagePopupClient.cpp
538         * html/shadow/CalendarPickerElement.cpp:
539         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
540         * page/PagePopupClient.cpp: Added.
541         (WebCore):
542         (WebCore::PagePopupClient::addJavaScriptString):
543         (WebCore::PagePopupClient::addProperty):
544         * page/PagePopupClient.h:
545         (WebCore::PagePopupClient::addString):
546
547 2012-07-24  Jer Noble  <jer.noble@apple.com>
548
549         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
550         https://bugs.webkit.org/show_bug.cgi?id=92035
551
552         Reviewed by Darin Adler.
553
554         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
555         current media controller.
556
557         Test: media/media-controller-playbackrate.html
558
559         * html/HTMLMediaElement.cpp:
560         (WebCore::HTMLMediaElement::updatePlaybackRate):
561
562 2012-07-24  Hayato Ito  <hayato@chromium.org>
563
564         Rename FocusScope to FocusNavigationScope.
565         https://bugs.webkit.org/show_bug.cgi?id=92062
566
567         Reviewed by Dimitri Glazkov.
568
569         FocusNavagationScope is better name than FocusScope since the
570         class is only used for controlling focus navigation.
571
572         No new tests - no functional changes.
573
574         * page/FocusController.cpp:
575         (WebCore::FocusNavigationScope::FocusNavigationScope):
576         (WebCore::FocusNavigationScope::rootNode):
577         (WebCore::FocusNavigationScope::owner):
578         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
579         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
580         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
581         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
582         (WebCore::FocusController::advanceFocusInDocumentOrder):
583         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
584         (WebCore::FocusController::findFocusableNodeRecursively):
585         (WebCore::FocusController::findFocusableNode):
586         (WebCore::FocusController::nextFocusableNode):
587         (WebCore::FocusController::previousFocusableNode):
588         * page/FocusController.h:
589         (FocusNavigationScope):
590         (FocusController):
591
592 2012-07-24  Michael Saboff  <msaboff@apple.com>
593
594         Convert HTML parser to handle 8-bit resources without converting to UChar*
595         https://bugs.webkit.org/show_bug.cgi?id=90321
596
597         Reviewed by Geoffrey Garen.
598
599         No new tests, no new functionality therefore covered by existing tests.
600
601         Changed the parsing of HTML to handle 8-bit strings without converting the 
602         whole string to 16-bits.  Primary change was to use the appropriate 
603         character pointer type (LChar* or UChar*) depending on the source string.
604         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
605         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
606         and advanceAndUpdateLineNumber() methods have been refactored into a
607         state machine managed pair of function pointers.  The possible functions
608         have not only the 8 and 16 bitness factored out, they also have the 
609         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
610         This provides a net speed-up even with the 8/16 bit testing.
611         Other changes involve using String methods to access and compare with the
612         source data.
613
614         * html/FTPDirectoryDocument.cpp:
615         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
616         instead of SegmentedString '*' operator.
617         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
618         SegmentedString '*' operator.
619         * html/parser/HTMLParserIdioms.cpp:
620         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
621         * html/parser/HTMLSourceTracker.cpp:
622         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
623         SegmentedString '*' operator.
624         * loader/cache/CachedScript.cpp:
625         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
626         * platform/text/SegmentedString.cpp:
627         (WebCore::SegmentedString::SegmentedString):
628         (WebCore::SegmentedString::operator=):
629         (WebCore::SegmentedString::clear):
630         (WebCore::SegmentedString::append):
631         (WebCore::SegmentedString::prepend):
632         (WebCore::SegmentedString::advanceSubstring):
633         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
634         advance function.
635         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
636         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
637         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
638         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
639         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
640         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
641         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
642         8 and 16 bit advance.
643         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
644         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
645         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
646         * platform/text/SegmentedString.h:
647         (WebCore::SegmentedSubstring::SegmentedSubstring):
648         (WebCore::SegmentedSubstring::clear):
649         (SegmentedSubstring):
650         (WebCore::SegmentedSubstring::is8Bit): New getter.
651         (WebCore::SegmentedSubstring::appendTo):
652         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
653         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
654         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
655         that pre-increments the 8 bit pointer and returns the next character.
656         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
657         that pre-increments the 16 bit pointer and returns the next character.
658         (WebCore::SegmentedSubstring::currentSubString):
659         (WebCore::SegmentedSubstring::getCurrentChar):
660         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
661         (WebCore::SegmentedString::SegmentedString):
662         (WebCore::SegmentedString::push):
663         (WebCore::SegmentedString::isEmpty):
664         (WebCore::SegmentedString::lookAhead):
665         (WebCore::SegmentedString::lookAheadIgnoringCase):
666         (WebCore::SegmentedString::advance):
667         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
668         (WebCore::SegmentedString::advanceAndASSERT):
669         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
670         (WebCore::SegmentedString::advancePastNonNewline):
671         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
672         (WebCore::SegmentedString::currentChar):
673         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
674         functions.
675         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
676         change to slow case functions when only one character left.
677         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
678         functions based on current substring.
679         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
680         (WebCore::SegmentedString::lookAheadSlowCase):
681         * xml/parser/CharacterReferenceParserInlineMethods.h:
682         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
683         SegmentedString '*' operator.
684         * xml/parser/MarkupTokenizerBase.h:
685         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
686         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
687         currentChar() instead of SegmentedString '*' operator.
688         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
689
690 2012-07-24  Kenneth Russell  <kbr@google.com>
691
692         [chromium] Hint garbage collector to run if page uses Canvas contexts
693         https://bugs.webkit.org/show_bug.cgi?id=76225
694
695         Reviewed by Kentaro Hara.
696
697         Upon creating a canvas context, set a hint in the current isolate
698         indicating that a full GC should be done upon the next page
699         navigation.
700
701         This improves Chrome's robustness on some WebGL stress tests which
702         simulate real-world behavior by repeatedly navigating among
703         several samples. More general measures are being investigated, but
704         this change makes V8 behave the same as JSC on these stress tests.
705         JSC doesn't currently use generational garbage collection, so it
706         has more opportunities to discover unreferenced canvas contexts.
707
708         Test: fast/canvas/webgl/context-creation-and-destruction.html
709
710         * bindings/v8/V8Binding.cpp:
711         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
712             Initialize per-isolate low memory hint.
713         * bindings/v8/V8Binding.h:
714         (V8BindingPerIsolateData):
715         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
716             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
717         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
718             Clear the previously set hint.
719         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
720             Get the previously set hint.
721         * bindings/v8/V8Proxy.cpp:
722         (WebCore::V8Proxy::hintForGCIfNecessary):
723             If necessary, send V8 a hint that it should GC.
724         (WebCore):
725         (WebCore::V8Proxy::clearForClose):
726         (WebCore::V8Proxy::clearForNavigation):
727             Call hintForGCIfNecessary.
728         * bindings/v8/V8Proxy.h:
729         (V8Proxy):
730         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
731         (WebCore::V8HTMLCanvasElement::getContextCallback):
732             Set a hint that we should GC upon the next page navigation.
733
734 2012-07-24  Dave Tu  <dtu@chromium.org>
735
736         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
737         https://bugs.webkit.org/show_bug.cgi?id=90019
738
739         Reviewed by Adrienne Walker.
740
741         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
742         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
743         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
744         (BitmapCanvasLayerTextureUpdater):
745         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
746         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
747         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
748         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
749         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
750         (Texture):
751         (BitmapSkPictureCanvasLayerTextureUpdater):
752         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
753         (WebCore::CanvasLayerTextureUpdater::paintContents):
754         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
755         (CanvasLayerTextureUpdater):
756         * platform/graphics/chromium/ContentLayerChromium.cpp:
757         (WebCore::ContentLayerChromium::update):
758         * platform/graphics/chromium/ContentLayerChromium.h:
759         (ContentLayerChromium):
760         * platform/graphics/chromium/ImageLayerChromium.cpp:
761         (WebCore::ImageLayerChromium::update):
762         * platform/graphics/chromium/ImageLayerChromium.h:
763         (ImageLayerChromium):
764         * platform/graphics/chromium/LayerChromium.h:
765         (WebCore):
766         (WebCore::LayerChromium::update):
767         * platform/graphics/chromium/LayerTextureUpdater.h:
768         (WebCore):
769         (WebCore::LayerTextureUpdater::Texture::prepareRect):
770         (WebCore::LayerTextureUpdater::prepareToUpdate):
771         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
772         (WebCore::ScrollbarLayerChromium::updatePart):
773         (WebCore::ScrollbarLayerChromium::update):
774         * platform/graphics/chromium/ScrollbarLayerChromium.h:
775         (ScrollbarLayerChromium):
776         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
777         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
778         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
779         (SkPictureCanvasLayerTextureUpdater):
780         * platform/graphics/chromium/TiledLayerChromium.cpp:
781         (WebCore::TiledLayerChromium::updateTiles):
782         (WebCore::TiledLayerChromium::updateContentRect):
783         * platform/graphics/chromium/TiledLayerChromium.h:
784         (TiledLayerChromium):
785         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
786         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
787         (WebCore::CCLayerTreeHost::updateAnimations):
788         (WebCore::CCLayerTreeHost::renderingStats):
789         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
790         (WebCore::CCLayerTreeHost::paintLayerContents):
791         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
792         (WebCore):
793         (CCLayerTreeHost):
794         * platform/graphics/chromium/cc/CCRenderingStats.h:
795         (CCRenderingStats):
796         (WebCore::CCRenderingStats::CCRenderingStats):
797
798 2012-07-24  Jian Li  <jianli@chromium.org>
799
800         [V8] Correct WebIDL type should be used in the testing IDL file 
801         https://bugs.webkit.org/show_bug.cgi?id=92168
802
803         Reviewed by Kentaro Hara.
804
805         Updated bindings test.
806
807         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
808         (webkit_dom_test_obj_strict_function):
809         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
810         * bindings/scripts/test/JS/JSTestObj.cpp:
811         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
812         * bindings/scripts/test/TestObj.idl:
813         * bindings/scripts/test/V8/V8TestObj.cpp:
814         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
815         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
816         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
817         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
818         (WebCore::TestObjV8Internal::strictFunctionCallback):
819
820 2012-07-24  Kent Tamura  <tkent@chromium.org>
821
822         Unreviewed, rolling out r123191.
823         http://trac.webkit.org/changeset/123191
824         https://bugs.webkit.org/show_bug.cgi?id=91804
825
826         It might cause another performance regression.
827         http://code.google.com/p/chromium/issues/detail?id=138410
828
829         * html/FormController.cpp:
830         (FormKeyGenerator):
831         (WebCore::createKey):
832         (WebCore::FormKeyGenerator::formKey):
833         (WebCore::FormKeyGenerator::willDeleteForm):
834
835 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
836
837         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
838         https://bugs.webkit.org/show_bug.cgi?id=90381
839
840         Reviewed by Kentaro Hara.
841
842         We can remove jsUnsignedLongArrayToVector() implementaion
843         merging it to current and toNativeArray() traits.
844
845         Tests: TestObj.idl
846         There should be no behavoiral changes as just refactoring.
847
848         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
849         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
850         * bindings/js/JSDOMBinding.h:
851         (WebCore::toJSSequence): Moved toJSSequence() to header file.
852         (WebCore::jsArray): Renamed Traits to JSValueTraits
853         (WebCore::toNativeArray): Using traits.
854         * bindings/js/JSDictionary.cpp:
855         (WebCore::JSDictionary::convertValue):
856         * bindings/js/JSMessagePortCustom.cpp:
857         (WebCore::fillMessagePortArray):
858         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
859         (AddIncludesForType):
860         (GenerateParametersCheckExpression):
861         (JSValueToNative):
862         (NativeToJSValue):
863         * bindings/scripts/CodeGeneratorV8.pm:
864         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
865         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
866         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
867         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
868         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
869         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
870         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
871         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
872         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
873         (TestObjV8Internal):
874         (WebCore::TestObjV8Internal::overloadedMethodCallback):
875
876 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
877
878         Remove an invalid assertion introduced in r123536. Unreviewed.
879
880         * xml/parser/MarkupTokenBase.h:
881         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
882
883 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
884
885         Unreviewed, rolling out r123504.
886         http://trac.webkit.org/changeset/123504
887         https://bugs.webkit.org/show_bug.cgi?id=92169
888
889         broke a bunch of text-related tests in chromium mac debug
890         (Requested by zhenyao on #webkit).
891
892         * platform/text/cf/StringCF.cpp:
893         (WTF::String::createCFString):
894         * platform/text/cf/StringImplCF.cpp:
895         (WTF::StringImpl::createCFString):
896
897 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
898
899         Ensure Noah's ark without reading the DOM tree.
900         https://bugs.webkit.org/show_bug.cgi?id=92065
901
902         Reviewed by Adam Barth.
903
904         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
905         the attributes values, we could get a slightly wrong output here.
906
907         Read attributes from tokens saved in the active formatting element list.
908
909         No new tests, covered by existing tests.
910
911         * html/parser/HTMLFormattingElementList.cpp:
912         (WebCore::attributeCount):
913         (WebCore::HTMLFormattingElementList::append):
914         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
915         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
916         * html/parser/HTMLFormattingElementList.h:
917         (HTMLFormattingElementList):
918         * html/parser/HTMLStackItem.h:
919         (WebCore::HTMLStackItem::localName):
920         (HTMLStackItem):
921
922 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
923
924         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
925         https://bugs.webkit.org/show_bug.cgi?id=92056
926
927         Reviewed by Adam Barth.
928
929         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
930         characters for performance. Clear the external characters pointer before the raw token
931         is cleared to make sure that we won't have a dangling pointer.
932
933         No new tests - no functional changes.
934
935         * html/parser/HTMLTreeBuilder.cpp:
936         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
937         * xml/parser/MarkupTokenBase.h:
938         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
939         (AtomicMarkupTokenBase):
940
941 2012-07-24  Jian Li  <jianli@chromium.org>
942
943         Add per-context setting for html notifications
944         https://bugs.webkit.org/show_bug.cgi?id=91295
945
946         Reviewed by Adam Barth.
947
948         Added a new per-context setting to control the enabling of html notifications.
949         For chromium port, we're going to disable html notifications for web
950         pages, but still keep it enabled for extensions.
951
952         Also enhance V8 code generator to support V8EnabledPerContext attribute
953         for methods.
954
955         Updated the binding tests.
956
957         * Modules/notifications/NotificationCenter.cpp:
958         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
959         (WebCore):
960         * Modules/notifications/NotificationCenter.h:
961         (NotificationCenter):
962         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
963         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
964         (GenerateHeader):
965         (IsStandardFunction):
966         (GenerateNonStandardFunction):
967         (GenerateImplementation):
968         (GenerateToV8Converters):
969         (GetContextEnableFunction):
970         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
971         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
972         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
973         (TestObjV8Internal):
974         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
975         (WebCore::V8TestObj::installPerContextProperties):
976         (WebCore::V8TestObj::wrapSlow):
977         * dom/ContextFeatures.cpp: Add a new per-context feature.
978         (WebCore::ContextFeatures::htmlNotificationsEnabled):
979         (WebCore):
980         * dom/ContextFeatures.h: Add a new per-context feature.
981
982 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
983
984         Unreviewed, rolling out r123499.
985         http://trac.webkit.org/changeset/123499
986         https://bugs.webkit.org/show_bug.cgi?id=92161
987
988         Android fails to compile (Requested by zhenyao on #webkit).
989
990         * GNUmakefile.list.am:
991         * Modules/mediastream/MediaStream.cpp:
992         (WebCore::MediaStream::MediaStream):
993         (WebCore::MediaStream::addTrack):
994         * Modules/mediastream/MediaStreamTrack.cpp:
995         (WebCore::MediaStreamTrack::create):
996         (WebCore::MediaStreamTrack::MediaStreamTrack):
997         (WebCore::MediaStreamTrack::~MediaStreamTrack):
998         (WebCore::MediaStreamTrack::setEnabled):
999         * Modules/mediastream/MediaStreamTrack.h:
1000         (MediaStreamTrack):
1001         * Modules/mediastream/MediaStreamTrack.idl:
1002         * WebCore.gypi:
1003         * dom/EventNames.h:
1004         (WebCore):
1005         * dom/EventTargetFactory.in:
1006         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1007         (WebKit):
1008         (WebKit::WebMediaStreamDescriptor::sources):
1009         * platform/chromium/support/WebMediaStreamSource.cpp:
1010         * platform/mediastream/MediaStreamSource.cpp: Removed.
1011         * platform/mediastream/MediaStreamSource.h:
1012         (WebCore::MediaStreamSource::create):
1013         (WebCore::MediaStreamSource::muted):
1014         (WebCore::MediaStreamSource::setMuted):
1015         (WebCore::MediaStreamSource::MediaStreamSource):
1016         (MediaStreamSource):
1017         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1018         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1019         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1020
1021 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
1022
1023         Crash in RenderTableSection::layoutRows
1024         https://bugs.webkit.org/show_bug.cgi?id=92145
1025
1026         Reviewed by Abhishek Arya.
1027
1028         The crash came from the insertChildNode logic being confused and choosing the wrong
1029         renderer for insertion. This is because after r123159, table anonymous wrappers can
1030         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
1031
1032         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
1033
1034         Test: fast/table/crash-table-section-layoutRows.html
1035
1036         * rendering/RenderObjectChildList.cpp:
1037         (WebCore::RenderObjectChildList::insertChildNode):
1038         Changed the code to always get the right child. There is no justification to not
1039         walking up to the |owner|'s direct child in all cases.
1040
1041 2012-07-24  Tony Chang  <tony@chromium.org>
1042
1043         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
1044         https://bugs.webkit.org/show_bug.cgi?id=92042
1045
1046         Reviewed by Ojan Vafai.
1047
1048         The flexbox spec says that the order property should change the paint order of flex children.
1049         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
1050
1051         No new tests, this is just a refactoring.
1052
1053         * rendering/RenderBlock.cpp:
1054         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
1055         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
1056         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
1057         * rendering/RenderBlock.h:
1058         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
1059
1060 2012-07-24  Anna Cavender  <annacc@chromium.org>
1061
1062         Create SourceBuffer and SourceBufferList objects
1063         https://bugs.webkit.org/show_bug.cgi?id=91771
1064
1065         Reviewed by Eric Carlson.
1066
1067         SourceBuffer and SourceBufferList objects are needed in order to
1068         implement the new object-oriented MediaSource API:
1069         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
1070
1071         No new tests - will be able to test after landing BUGWK91775
1072
1073         Adding new files to build files:
1074         * CMakeLists.txt:
1075         * DerivedSources.cpp:
1076         * DerivedSources.make:
1077         * DerivedSources.pri:
1078         * GNUmakefile.am:
1079         * GNUmakefile.list.am:
1080         * Target.pri:
1081         * WebCore.gyp/WebCore.gyp:
1082         * WebCore.gypi:
1083         * WebCore.vcproj/WebCore.vcproj:
1084         * WebCore.vcproj/WebCoreCommon.vsprops:
1085         * WebCore.vcproj/copyForwardingHeaders.cmd:
1086         * WebCore.xcodeproj/project.pbxproj:
1087
1088         New objects:
1089         * Modules/mediasource/SourceBuffer.cpp: Added.
1090         * Modules/mediasource/SourceBuffer.h: Added.
1091         * Modules/mediasource/SourceBuffer.idl: Added.
1092         * Modules/mediasource/SourceBufferList.cpp: Added.
1093         * Modules/mediasource/SourceBufferList.h: Added.
1094         * Modules/mediasource/SourceBufferList.idl: Added.
1095
1096         New events:
1097         * dom/EventNames.h:
1098         (WebCore):
1099         * dom/EventTarget.h:
1100         (WebCore):
1101         * dom/EventTargetFactory.in:
1102
1103         Object constructors:
1104         * page/DOMWindow.idl:
1105
1106 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
1107
1108         Store the full year in GregorianDateTime
1109         https://bugs.webkit.org/show_bug.cgi?id=92067
1110
1111         Reviewed by Geoffrey Garen.
1112
1113         Use the full year instead of the offset from year 1900 
1114         for the year member variable of GregorianDateTime.
1115
1116         * bridge/qt/qt_runtime.cpp:
1117         (JSC::Bindings::convertValueToQVariant):
1118         (JSC::Bindings::convertQVariantToValue):
1119         * bridge/qt/qt_runtime_qt4.cpp:
1120         (JSC::Bindings::convertValueToQVariant):
1121         (JSC::Bindings::convertQVariantToValue):
1122
1123 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
1124
1125         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
1126         https://bugs.webkit.org/show_bug.cgi?id=90720
1127
1128         Reviewed by Geoffrey Garen.
1129
1130         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
1131         a relatively cheap conversion from WTF::String to CFString.
1132
1133         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
1134         to String::characters().
1135
1136         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
1137
1138         This is covered by existing tests.
1139
1140         * platform/text/cf/StringCF.cpp:
1141         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
1142         * platform/text/cf/StringImplCF.cpp:
1143         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
1144         The allocator creation is now closer to where it is useful.
1145
1146 2012-07-24  Kentaro Hara  <haraken@chromium.org>
1147
1148         [V8] String wrappers should be marked Independent
1149         https://bugs.webkit.org/show_bug.cgi?id=91251
1150
1151         Reviewed by Adam Barth.
1152
1153         Currently V8 String wrappers are not marked Independent.
1154         By marking them Independent, they can be reclaimed by the scavenger GC.
1155         Although I couldn't find a case where this change reduces memory usage,
1156         this change would be important for upcoming changes in string conversion
1157         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
1158
1159         'm_lastStringImpl = 0' in StringCache::remove() is important.
1160         Look at the following code:
1161
1162             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
1163             {
1164                 ...;
1165                 stringCache()->remove(stringImpl);
1166                 wrapper.Dispose();
1167             }
1168
1169             void StringCache::remove(StringImpl* stringImpl)
1170             {
1171                 ...
1172                 if (m_lastStringImpl.get() == stringImpl)
1173                     m_lastStringImpl = 0;
1174             }
1175
1176             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
1177             {
1178                 if (m_lastStringImpl.get() == stringImpl) {
1179                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
1180                 }
1181                 return v8ExternalStringSlow(stringImpl, isolate);
1182             }
1183
1184         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
1185         in v8ExternalString(). This was a cause of the crashes of r122614.
1186
1187         Tests: At the initial commit of this patch (r122614),
1188                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
1189                fast/workers/worker-location.html
1190                Dromaeo/cssquery-jquery.html
1191                Dromaeo/jslib-event-jquery.html
1192                Dromaeo/jslib-style-jquery.html
1193                Dromaeo/jslib-style-prototype.html
1194
1195         * bindings/v8/V8Binding.cpp:
1196         (WebCore::StringCache::remove):
1197         (WebCore::StringCache::v8ExternalStringSlow):
1198
1199 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
1200
1201         MediaStream API: Update MediaStreamTrack to match the specification
1202         https://bugs.webkit.org/show_bug.cgi?id=90180
1203
1204         Reviewed by Adam Barth.
1205
1206         MediaStreamTracks are now required to show the status of the underlying source,
1207         and trigger events when that status changes.
1208
1209         Test: fast/mediastream/MediaStreamTrack.html
1210
1211         * GNUmakefile.list.am:
1212         * Modules/mediastream/MediaStream.cpp:
1213         (WebCore::MediaStream::MediaStream):
1214         (WebCore::MediaStream::addTrack):
1215         * Modules/mediastream/MediaStreamTrack.cpp:
1216         (WebCore::MediaStreamTrack::create):
1217         (WebCore::MediaStreamTrack::MediaStreamTrack):
1218         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1219         (WebCore::MediaStreamTrack::setEnabled):
1220         (WebCore::MediaStreamTrack::readyState):
1221         (WebCore):
1222         (WebCore::MediaStreamTrack::sourceChangedState):
1223         (WebCore::MediaStreamTrack::stop):
1224         (WebCore::MediaStreamTrack::interfaceName):
1225         (WebCore::MediaStreamTrack::scriptExecutionContext):
1226         (WebCore::MediaStreamTrack::eventTargetData):
1227         (WebCore::MediaStreamTrack::ensureEventTargetData):
1228         * Modules/mediastream/MediaStreamTrack.h:
1229         * Modules/mediastream/MediaStreamTrack.idl:
1230         * WebCore.gypi:
1231         * dom/EventNames.h:
1232         (WebCore):
1233         * dom/EventTargetFactory.in:
1234         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1235         * platform/chromium/support/WebMediaStreamSource.cpp:
1236         (WebKit::WebMediaStreamSource::setReadyState):
1237         (WebKit):
1238         (WebKit::WebMediaStreamSource::readyState):
1239         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
1240         (WebCore):
1241         (WebCore::MediaStreamSource::create):
1242         (WebCore::MediaStreamSource::MediaStreamSource):
1243         (WebCore::MediaStreamSource::setReadyState):
1244         (WebCore::MediaStreamSource::addObserver):
1245         (WebCore::MediaStreamSource::removeObserver):
1246         * platform/mediastream/MediaStreamSource.h:
1247         (Observer):
1248         (WebCore::MediaStreamSource::Observer::~Observer):
1249         (MediaStreamSource):
1250         (WebCore::MediaStreamSource::readyState):
1251         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1252         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1253         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1254
1255 2012-07-24  Scott Graham  <scottmg@chromium.org>
1256
1257         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
1258         https://bugs.webkit.org/show_bug.cgi?id=91667
1259
1260         Reviewed by Tony Chang.
1261
1262         Using native tools instead of cygwin version improves build time
1263         performance by roughly 50% (on top of previous cl-instead-of-gcc
1264         change).
1265
1266         Also, use - instead of / for cl flags, otherwise preprocessing fails
1267         very slowly (due to retry loop). And, replace \ with / in gperf
1268         command line. Without this, gperf emits the filename literally in
1269         #line directives which causes VS to error with "unescaped \ in
1270         string". Bizarrely, building ColorData.cpp with those \ in place
1271         causes the IDE to exit with no error message, which was the cause of
1272         the previous canary failures.
1273
1274         No new tests.
1275
1276         * WebCore.gyp/WebCore.gyp:
1277         * WebCore.gyp/scripts/rule_bison.py:
1278         * bindings/scripts/preprocessor.pm:
1279         (applyPreprocessor):
1280         * make-hash-tools.pl:
1281
1282 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
1283
1284         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
1285         https://bugs.webkit.org/show_bug.cgi?id=91702
1286
1287         Reviewed by Jian Li.
1288
1289         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
1290         pages from being able to detect what applications a user has installed indirectly through
1291         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
1292         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
1293         from an user action.
1294
1295         * fileapi/File.cpp:
1296         (WebCore::getContentTypeFromFileName):
1297         (WebCore::createBlobDataForFile):
1298         (WebCore::createBlobDataForFileWithName):
1299         (WebCore::createBlobDataForFileWithMetadata):
1300         (WebCore::File::createWithRelativePath):
1301         (WebCore::File::File):
1302         * fileapi/File.h:
1303         (File):
1304         (WebCore::File::create):
1305         (WebCore::File::createWithName):
1306         * html/FileInputType.cpp:
1307         (WebCore::FileInputType::createFileList):
1308         * platform/chromium/ChromiumDataObject.cpp:
1309         (WebCore::ChromiumDataObject::addFilename):
1310         * platform/gtk/ClipboardGtk.cpp:
1311         (WebCore::ClipboardGtk::files):
1312         * platform/mac/ClipboardMac.mm:
1313         (WebCore::ClipboardMac::files):
1314         * platform/qt/ClipboardQt.cpp:
1315         (WebCore::ClipboardQt::files):
1316         * platform/win/ClipboardWin.cpp:
1317         (WebCore::ClipboardWin::files):
1318
1319 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1320
1321         Web Inspector: Snippets UI polish
1322         https://bugs.webkit.org/show_bug.cgi?id=92142
1323
1324         Reviewed by Pavel Feldman.
1325
1326         Changed snippets context menu items.
1327         Added run snippet status bar button.
1328         Removed unused edit source button.
1329
1330         * English.lproj/localizedStrings.js:
1331         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1332         * inspector/front-end/ScriptSnippetModel.js:
1333         (WebInspector.SnippetJavaScriptSourceFrame):
1334         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
1335         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
1336         * inspector/front-end/ScriptsNavigator.js:
1337         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
1338         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
1339         * inspector/front-end/ScriptsPanel.js:
1340         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
1341         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1342         * inspector/front-end/SourceFrame.js:
1343         (WebInspector.SourceFrame.prototype.statusBarItems):
1344         * inspector/front-end/inspector.css:
1345         * inspector/front-end/scriptsPanel.css:
1346         (.evaluate-snippet-status-bar-item .glyph):
1347         (.evaluate-snippet-status-bar-item.toggled .glyph):
1348
1349 2012-07-24  Nico Weber  <thakis@chromium.org>
1350
1351         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
1352         https://bugs.webkit.org/show_bug.cgi?id=92129
1353
1354         Reviewed by Adam Barth.
1355
1356         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
1357         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
1358         but this block was forgotten. Since it just confused me for a bit, remove it.
1359
1360         * WebCore.gyp/WebCore.gyp:
1361
1362 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
1363
1364         inline-table wrapper should be generated for display: inline element only
1365         https://bugs.webkit.org/show_bug.cgi?id=92054
1366
1367         Reviewed by Abhishek Arya.
1368
1369         CSS 2.1 only takes into account the display when determining if we should generate
1370         an inline-table. My misreading of the spec would make us generate an inline-table
1371         wrapper for any inline formatting context.
1372
1373         Test: fast/table/inline-block-generates-table-wrapper.html
1374
1375         * rendering/RenderTable.cpp:
1376         (WebCore::RenderTable::createAnonymousWithParentRenderer):
1377         Changed to use display instead of isInline to properly match the spec.
1378
1379 2012-07-24  Alec Flett  <alecflett@chromium.org>
1380
1381         IndexedDB: Temporarily continue generating backend keys for empty key lists
1382         https://bugs.webkit.org/show_bug.cgi?id=92012
1383
1384         Reviewed by Tony Chang.
1385
1386         Temporarily change key behavior to allow chromium in_process_webkit
1387         to call putWithIndexKeys without inadvertently preventing index
1388         key generation. Note this is temporary until frontend key generation
1389         patch lands.
1390
1391         No new tests, this is part of a refactor that doesn't change behavior.
1392
1393         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1394         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1395
1396 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
1397
1398         Web Inspector: introduce UISourceCodeFrame.
1399         https://bugs.webkit.org/show_bug.cgi?id=92124
1400
1401         Reviewed by Vsevolod Vlasov.
1402
1403         Generic implementation of SourceFrame over UISourceCode added.
1404
1405         * WebCore.gypi:
1406         * WebCore.vcproj/WebCore.vcproj:
1407         * inspector/compile-front-end.py:
1408         * inspector/front-end/ScriptsPanel.js:
1409         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1410         * inspector/front-end/StylesPanel.js:
1411         * inspector/front-end/UISourceCodeFrame.js: Added.
1412         (WebInspector.UISourceCodeFrame):
1413         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
1414         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
1415         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
1416         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
1417         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
1418         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
1419         * inspector/front-end/WebKit.qrc:
1420         * inspector/front-end/inspector.html:
1421
1422 2012-07-24  Dan Bernstein  <mitz@apple.com>
1423
1424         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
1425         https://bugs.webkit.org/show_bug.cgi?id=92115
1426
1427         Reviewed by Mark Rowe.
1428
1429         * platform/Scrollbar.cpp:
1430         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
1431
1432 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
1433
1434         Another prospective build fix for Chromium. Unreviewed.
1435
1436         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
1437
1438 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
1439
1440         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
1441
1442         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
1443
1444 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
1445
1446         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
1447         https://bugs.webkit.org/show_bug.cgi?id=92103
1448
1449         Reviewed by Philippe Normand.
1450
1451         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
1452         here since the forward declarations are conflicting with the harfbuzz version
1453         we will use for EFL.
1454
1455         No new tests, no change in behavior.
1456
1457         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
1458
1459 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1460
1461         Fix blend filter for autovectorizing
1462         https://bugs.webkit.org/show_bug.cgi?id=91398
1463
1464         Reviewed by Nikolas Zimmermann.
1465
1466         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
1467         did not do boundary-checks in the inner loop. Finally the integer division by 255
1468         was optimized not use integer division intrinsics.
1469
1470         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
1471
1472         * platform/graphics/filters/FEBlend.cpp:
1473         (WebCore::fastDivideBy255):
1474         (BlendNormal):
1475         (WebCore::BlendNormal::apply):
1476         (BlendMultiply):
1477         (WebCore::BlendMultiply::apply):
1478         (BlendScreen):
1479         (WebCore::BlendScreen::apply):
1480         (BlendDarken):
1481         (WebCore::BlendDarken::apply):
1482         (BlendLighten):
1483         (WebCore::BlendLighten::apply):
1484         (BlendUnknown):
1485         (WebCore::BlendUnknown::apply):
1486         (WebCore::platformApply):
1487         (WebCore::FEBlend::platformApplyGeneric):
1488         (WebCore::FEBlend::platformApplySoftware):
1489         * platform/graphics/filters/FEBlend.h:
1490         (FEBlend):
1491
1492 2012-07-23  Hans Wennborg  <hans@chromium.org>
1493
1494         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
1495         https://bugs.webkit.org/show_bug.cgi?id=91743
1496
1497         Reviewed by Adam Barth.
1498
1499         Implement the 'emma' attribute as described in the spec draft at
1500         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
1501
1502         Test: fast/speech/scripted/emma.html
1503
1504         * Modules/speech/SpeechRecognitionResult.cpp:
1505         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
1506         (WebCore):
1507         (WebCore::SpeechRecognitionResult::emma):
1508         * Modules/speech/SpeechRecognitionResult.h:
1509         (WebCore):
1510         (SpeechRecognitionResult):
1511         * Modules/speech/SpeechRecognitionResult.idl:
1512         * WebCore.gypi:
1513         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
1514         (WebCore):
1515         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
1516           We need to add an implicit reference from the result object to the
1517           emma object to keep the latters DOM tree alive across
1518           garbage-collection.
1519
1520 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
1521
1522         Web Inspector: Protocol Extension: add getFlowByName command
1523         https://bugs.webkit.org/show_bug.cgi?id=91855
1524
1525         Reviewed by Pavel Feldman.
1526
1527         The "getFlowByName" command should return a NamedFlow for a given document and name.
1528
1529         Test: inspector/styles/protocol-css-regions-commands.html
1530
1531         * inspector/Inspector.json:
1532         * inspector/InspectorCSSAgent.cpp:
1533         (WebCore::InspectorCSSAgent::getFlowByName):
1534         (WebCore):
1535         * inspector/InspectorCSSAgent.h:
1536         (InspectorCSSAgent):
1537         * inspector/front-end/CSSStyleModel.js:
1538         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
1539         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
1540         (WebInspector.NamedFlow):
1541         (WebInspector.NamedFlow.parsePayload):
1542
1543 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
1544
1545         [Qt] Fix compilation against namespaced Qt
1546
1547         Reviewed by Simon Hausmann.
1548
1549         * platform/graphics/Font.h:
1550         * platform/network/ResourceHandleInternal.h:
1551         * platform/qt/ThirdPartyCookiesQt.h:
1552
1553 2012-07-24  Anthony Scian  <ascian@rim.com>
1554
1555         Web Inspector [JSC]: Enable initiator column in network panel.
1556         https://bugs.webkit.org/show_bug.cgi?id=65533
1557
1558         Reviewed by Vsevolod Vlasov.
1559
1560         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
1561         Removed references to it since the optionality is no longer required.
1562
1563         Test: http/tests/inspector/network/network-initiator.html
1564
1565         * inspector/front-end/NetworkPanel.js:
1566         (WebInspector.NetworkLogView.prototype._createTable):
1567         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
1568         (WebInspector.NetworkLogView.prototype.switchToBriefView):
1569         (WebInspector.NetworkDataGridNode.prototype.createCells):
1570         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
1571         * inspector/front-end/Settings.js:
1572
1573 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1574
1575         Missing *explicit* keyword in dom and page.
1576         https://bugs.webkit.org/show_bug.cgi?id=92074
1577
1578         Reviewed by Kentaro Hara.
1579
1580         Some constructors missed to use *explicit* keyword. They need to be added
1581         *explicit* keyword to contructor which has a parameter in order to avoid
1582         implicit type conversion.
1583
1584         Some files in dom directory can't use explicit keyword because of build breaks.
1585
1586         No new tests. Covered by existing tests.
1587
1588         * dom/BeforeLoadEvent.h:
1589         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
1590         * dom/BeforeTextInsertedEvent.h:
1591         (BeforeTextInsertedEvent):
1592         * dom/ChildListMutationScope.h:
1593         (WebCore::ChildListMutationScope::ChildListMutationScope):
1594         * dom/ChildNodeList.h:
1595         (ChildNodeList):
1596         * dom/ClientRect.h:
1597         (ClientRect):
1598         * dom/ClientRectList.h:
1599         (ClientRectList):
1600         * dom/ComposedShadowTreeWalker.h:
1601         (ComposedShadowTreeParentWalker):
1602         * dom/DOMCoreException.h:
1603         (WebCore::DOMCoreException::DOMCoreException):
1604         * dom/DOMImplementation.h:
1605         (DOMImplementation):
1606         * dom/DatasetDOMStringMap.h:
1607         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
1608         * dom/DeviceMotionController.h:
1609         (DeviceMotionController):
1610         * dom/DeviceOrientationController.h:
1611         (DeviceOrientationController):
1612         * dom/DocumentParser.h:
1613         (DocumentParser):
1614         * dom/EventException.h:
1615         (WebCore::EventException::EventException):
1616         * dom/EventListener.h:
1617         (WebCore::EventListener::EventListener):
1618         * dom/ExceptionBase.h:
1619         (ExceptionBase):
1620         * dom/GenericEventQueue.h:
1621         (GenericEventQueue):
1622         * dom/KeyboardEvent.h:
1623         (WebCore::KeypressCommand::KeypressCommand):
1624         * dom/MemoryInstrumentation.h:
1625         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
1626         * dom/MessageChannel.h:
1627         (MessageChannel):
1628         * dom/MessagePort.h:
1629         (MessagePort):
1630         * dom/MessagePortChannel.h:
1631         (MessagePortChannel):
1632         * dom/MutationObserver.h:
1633         * dom/NamedNodeMap.h:
1634         (WebCore::NamedNodeMap::NamedNodeMap):
1635         * dom/NodeFilter.h:
1636         (WebCore::NodeFilter::NodeFilter):
1637         * dom/NodeWithIndex.h:
1638         (WebCore::NodeWithIndex::NodeWithIndex):
1639         * dom/Range.h:
1640         * dom/RangeException.h:
1641         (WebCore::RangeException::RangeException):
1642         * dom/RawDataDocumentParser.h:
1643         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
1644         * dom/ScriptRunner.h:
1645         (ScriptRunner):
1646         * dom/SelectorQuery.h:
1647         (SelectorQuery):
1648         * dom/ShadowRoot.h:
1649         (ShadowRoot):
1650         * dom/SpaceSplitString.h:
1651         (SpaceSplitStringData):
1652         * dom/StaticHashSetNodeList.h:
1653         (StaticHashSetNodeList):
1654         * dom/StaticNodeList.h:
1655         (WebCore::StaticNodeList::StaticNodeList):
1656         * dom/TransformSource.h:
1657         (TransformSource):
1658         * dom/TreeScope.h:
1659         (TreeScope):
1660         * dom/WebKitNamedFlowCollection.h:
1661         (WebKitNamedFlowCollection):
1662         * page/EventHandler.h:
1663         (EventHandler):
1664         * page/FocusController.h:
1665         (FocusController):
1666         * page/FrameView.h:
1667         (FrameView):
1668         * page/MemoryInfo.h:
1669         (MemoryInfo):
1670         * page/Page.h:
1671         (Page):
1672         * page/PageGroup.h:
1673         (PageGroup):
1674         * page/PrintContext.h:
1675         (PrintContext):
1676         * page/Settings.h:
1677         (Settings):
1678         * page/SpeechInput.h:
1679         (SpeechInput):
1680         * page/SpeechInputResultList.h:
1681         (SpeechInputResultList):
1682         * page/WebKitAnimation.h:
1683         * page/WindowFeatures.h:
1684         (WindowFeatures):
1685         * page/WorkerNavigator.h:
1686         (WorkerNavigator):
1687
1688 2012-07-24  Kent Tamura  <tkent@chromium.org>
1689
1690         Replace some callsites of shadowAncestorNode() with shadowHost()
1691         https://bugs.webkit.org/show_bug.cgi?id=92060
1692
1693         Reviewed by Hajime Morita.
1694
1695         shadowAncestorNode() is deprecated.
1696
1697         No new tests. This shouldn't change behaviors.
1698
1699         * html/shadow/MediaControlElements.cpp:
1700         (WebCore::toParentMediaElement):
1701         * html/shadow/TextControlInnerElements.h:
1702         (WebCore::SpinButtonElement::isEnabledFormControl):
1703         (WebCore::SpinButtonElement::isReadOnlyFormControl):
1704         * platform/efl/RenderThemeEfl.cpp:
1705         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
1706         (WebCore::RenderThemeEfl::paintMediaMuteButton):
1707         * platform/gtk/RenderThemeGtk.cpp:
1708         (WebCore::getMediaElementFromRenderObject):
1709         (WebCore::centerRectVerticallyInParentInputElement):
1710         * platform/qt/RenderThemeQt.cpp:
1711         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1712         (WebCore::RenderThemeQt::paintMediaSliderThumb):
1713         Removed an ASSERT() because nullness of o->node() is already asserted.
1714         * rendering/RenderInputSpeech.cpp:
1715         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
1716         * rendering/RenderMediaControlsChromium.cpp:
1717         (WebCore::paintMediaSliderThumb):
1718         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
1719         (WebCore::paintMediaVolumeSliderThumb): ditto.
1720         * rendering/RenderThemeChromiumSkia.cpp:
1721         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
1722         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
1723         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
1724         * rendering/RenderThemeMac.mm:
1725         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1726         Remove an ASSERT(input) because input never be null unless o->node() is
1727         null. If o->node() is null, this function crashes.
1728         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
1729         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1730         (WebCore::RenderThemeMac::paintMediaMuteButton):
1731         It's ok to ignore "node is a media element" case because this function
1732         works only if node->isMediaControlElement().
1733         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
1734         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
1735         * rendering/RenderThemeSafari.cpp:
1736         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
1737         Remove an ASSERT(input) because input never be null unless o->node() is
1738         null. If o->node() is null, this function crashes.
1739         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
1740         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
1741         * rendering/RenderThemeWinCE.cpp:
1742         (WebCore::mediaElementParent):
1743
1744 2012-07-24  Peter Beverloo  <peter@chromium.org>
1745
1746         [Chromium] Build fix for Android after r123424
1747         https://bugs.webkit.org/show_bug.cgi?id=92082
1748
1749         Unreviewed build fix.
1750
1751         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
1752         in r123424, while there still are two references left to another method and a
1753         constant. Re-add the include directive.
1754
1755         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
1756
1757 2012-07-24  Kentaro Hara  <haraken@chromium.org>
1758
1759         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
1760         for static attributes in supplemental IDL files
1761         https://bugs.webkit.org/show_bug.cgi?id=91925
1762
1763         Reviewed by Adam Barth.
1764
1765         r122912 implemented static attributes in CodeGeneratorJS.pm.
1766         However, it generates wrong code for static attributes in supplemental
1767         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
1768         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
1769
1770         Test: bindings/scripts/test/TestSupplemental.idl
1771
1772         * bindings/scripts/CodeGeneratorJS.pm:
1773         (GenerateImplementation):
1774         * bindings/scripts/test/JS/JSTestInterface.cpp:
1775         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
1776         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
1777         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1778
1779 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1780
1781         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
1782         https://bugs.webkit.org/show_bug.cgi?id=92064
1783
1784         Reviewed by Kentaro Hara.
1785
1786         Some constructors missed to use *explicit* keyword. They need to be added
1787         *explicit* keyword to contructor which has a parameter in order to avoid
1788         implicit type conversion.
1789
1790         No new tests. Covered by existing tests.
1791
1792         * bridge/IdentifierRep.h:
1793         (WebCore::IdentifierRep::IdentifierRep):
1794         * history/BackForwardListImpl.h:
1795         (BackForwardListImpl):
1796         * history/CachedFrame.h:
1797         (CachedFrame):
1798         * history/HistoryItem.h:
1799         (HistoryItem):
1800         * loader/DocumentWriter.h:
1801         (DocumentWriter):
1802         * loader/FrameNetworkingContext.h:
1803         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
1804         * loader/HistoryController.h:
1805         * loader/ImageLoader.h:
1806         (ImageLoader):
1807         * loader/LinkLoader.h:
1808         (LinkLoader):
1809         * loader/MainResourceLoader.h:
1810         (MainResourceLoader):
1811         * loader/NavigationAction.h:
1812         (NavigationAction):
1813         * loader/NavigationScheduler.h:
1814         (NavigationScheduler):
1815         * loader/PolicyChecker.h:
1816         (PolicyChecker):
1817         * loader/SubframeLoader.h:
1818         (SubframeLoader):
1819         * loader/ThreadableLoaderClientWrapper.h:
1820         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
1821         * plugins/PluginData.h:
1822         (PluginData):
1823         * plugins/PluginViewBase.h:
1824         (WebCore::PluginViewBase::PluginViewBase):
1825
1826 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
1827
1828         [Qt] Fix conversion from GregorianDateTime to QTime
1829         https://bugs.webkit.org/show_bug.cgi?id=92068
1830
1831         Reviewed by Simon Hausmann.
1832
1833         * bridge/qt/qt_runtime.cpp:
1834         (JSC::Bindings::convertValueToQVariant):
1835         * bridge/qt/qt_runtime_qt4.cpp:
1836         (JSC::Bindings::convertValueToQVariant):
1837
1838 2012-07-24  Arko Saha  <arko@motorola.com>
1839
1840         Microdata: Implement PropertyNodeList interface.
1841         https://bugs.webkit.org/show_bug.cgi?id=80269
1842
1843         Reviewed by Ryosuke Niwa.
1844
1845         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
1846         returns NodeList object. Made changes so that it will return PropertyNodeList object.
1847
1848         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
1849         values are obtained from the "itemValue" DOM property of each of the elements represented by
1850         the object, in tree order.
1851
1852         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
1853
1854         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
1855                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
1856                fast/dom/MicroData/propertynodelist-getvalues-test.html
1857                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
1858
1859         * CMakeLists.txt:
1860         * DerivedSources.cpp:
1861         * DerivedSources.make:
1862         * DerivedSources.pri:
1863         * GNUmakefile.list.am:
1864         * Target.pri:
1865         * UseJSC.cmake:
1866         * UseV8.cmake:
1867         * WebCore.gypi:
1868         * WebCore.vcproj/WebCore.vcproj:
1869         * WebCore.xcodeproj/project.pbxproj:
1870         * bindings/gobject/GNUmakefile.am:
1871         * bindings/js/JSBindingsAllInOne.cpp:
1872         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
1873         (WebCore):
1874         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
1875         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
1876         (WebCore):
1877         (WebCore::toV8): Added toV8 custom code.
1878         * dom/DynamicNodeList.cpp:
1879         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
1880         (WebCore):
1881         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
1882         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
1883         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1884         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
1885         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
1886         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
1887         is valid.
1888         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1889         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
1890         (DynamicNodeListCacheBase):
1891         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
1892         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
1893         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
1894         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
1895         attribute change.
1896         * dom/Node.cpp:
1897         (WebCore::Node::propertyNodeList):
1898         * dom/Node.h:
1899         (WebCore):
1900         (Node):
1901         * dom/PropertyNodeList.cpp: Added.
1902         (WebCore):
1903         (WebCore::PropertyNodeList::PropertyNodeList):
1904         (WebCore::PropertyNodeList::~PropertyNodeList):
1905         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
1906         item.
1907         (WebCore::PropertyNodeList::updateRefElements):
1908         (WebCore::PropertyNodeList::nodeMatches):
1909         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
1910         itemValue DOM property of each of the elements represented by the object, in tree order.
1911         * dom/PropertyNodeList.h: Added.
1912         (WebCore):
1913         (PropertyNodeList):
1914         (WebCore::PropertyNodeList::create):
1915         * dom/PropertyNodeList.idl: Added.
1916         * html/HTMLCollection.cpp:
1917         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
1918         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
1919         * html/HTMLElement.cpp:
1920         (WebCore::HTMLElement::properties):
1921         (WebCore):
1922         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
1923         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
1924         * html/HTMLElement.h:
1925         (HTMLElement):
1926         * html/HTMLPropertiesCollection.cpp:
1927         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1928         (WebCore::HTMLPropertiesCollection::updateRefElements):
1929         (WebCore::HTMLPropertiesCollection::updateNameCache):
1930         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
1931         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
1932         name in the properties collection.
1933         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
1934         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
1935         hasNameCache() and setHasNameCache().
1936         (WebCore):
1937         (HTMLPropertiesCollection):
1938         (WebCore::HTMLPropertiesCollection::invalidateCache):
1939         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
1940         * html/HTMLPropertiesCollection.idl:
1941         * html/MicroDataItemValue.idl: Added.
1942         * page/DOMWindow.idl:
1943
1944 2012-07-24  Kentaro Hara  <haraken@chromium.org>
1945
1946         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
1947         implicitly assume ScriptExecutionContext for static attributes
1948         https://bugs.webkit.org/show_bug.cgi?id=91924
1949
1950         Reviewed by Adam Barth.
1951
1952         r122912 implemented static attributes in CodeGeneratorJS.pm.
1953         However, the generated code assumes that static attributes
1954         always require ScriptExecutionContext, which is wrong.
1955         If we need a ScriptExecutionContext, we should specify
1956         [CallWith=ScriptExecutionContext].
1957
1958         This patch fixes CodeGeneratorJS.pm so that static attributes
1959         do not assume ScriptExecutionContext. This fix aligns with
1960         the fix in CodeGeneratorV8.pm in r123308.
1961
1962         Test: bindings/scripts/test/TestObj.idl
1963
1964         * bindings/scripts/CodeGeneratorJS.pm:
1965         (GenerateImplementation):
1966         * bindings/scripts/test/JS/JSTestInterface.cpp:
1967         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
1968         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
1969         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1970         * bindings/scripts/test/JS/JSTestObj.cpp:
1971         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
1972         (WebCore::jsTestObjConstructorStaticStringAttr):
1973         (WebCore::setJSTestObjConstructorStaticStringAttr):
1974
1975 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1976
1977         Missing *explicit* keyword in editing.
1978         https://bugs.webkit.org/show_bug.cgi?id=92055
1979
1980         Reviewed by Ryosuke Niwa.
1981
1982         Some constructors missed to use *explicit* keyword. They need to be added
1983         *explicit* keyword to contructor which has a parameter in order to avoid
1984         implicit type conversion.
1985
1986         No new tests. Covered by existing tests.
1987
1988         * editing/AlternativeTextController.h:
1989         (WebCore::AlternativeTextController::UNLESS_ENABLED):
1990         * editing/BreakBlockquoteCommand.h:
1991         (BreakBlockquoteCommand):
1992         * editing/DeleteButton.h:
1993         (DeleteButton):
1994         * editing/DeleteButtonController.h:
1995         (DeleteButtonController):
1996         * editing/EditCommand.h:
1997         (EditCommand):
1998         (WebCore::SimpleEditCommand::SimpleEditCommand):
1999         * editing/EditingBehavior.h:
2000         (WebCore::EditingBehavior::EditingBehavior):
2001         * editing/EditingStyle.h:
2002         (EditingStyle):
2003         * editing/Editor.h:
2004         (Editor):
2005         * editing/FrameSelection.h:
2006         (FrameSelection):
2007         * editing/InsertLineBreakCommand.h:
2008         (InsertLineBreakCommand):
2009         * editing/ModifySelectionListLevel.h:
2010         (ModifySelectionListLevelCommand):
2011         (DecreaseSelectionListLevelCommand):
2012         * editing/RemoveFormatCommand.h:
2013         (RemoveFormatCommand):
2014         * editing/RemoveNodeCommand.h:
2015         (RemoveNodeCommand):
2016         * editing/RemoveNodePreservingChildrenCommand.h:
2017         (RemoveNodePreservingChildrenCommand):
2018         * editing/ReplaceNodeWithSpanCommand.h:
2019         (ReplaceNodeWithSpanCommand):
2020         * editing/TextInsertionBaseCommand.h:
2021         (TextInsertionBaseCommand):
2022         * editing/UndoManager.h:
2023         (UndoManager):
2024         * editing/UnlinkCommand.h:
2025         (UnlinkCommand):
2026         * editing/WrapContentsInDummySpanCommand.h:
2027         (WrapContentsInDummySpanCommand):
2028
2029 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
2030
2031         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
2032         https://bugs.webkit.org/show_bug.cgi?id=87899
2033
2034         Reviewed by Chris Fleizach.
2035
2036         Refactors AccessibilityRenderObject so that it inherits from a new class,
2037         AccessibilityNodeObject, that can be constructed from a Node without a
2038         renderer. Modifies AXObjectCache so that it automatically creates an
2039         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
2040         A new layout test verifies that this correctly exposes an accessibility
2041         tree with appropriate roles for elements in a canvas subtree.
2042
2043         This patch does not try to complete the implementation of
2044         AccessibilityNodeObject. Most AX methods are still unimplemented and need
2045         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
2046         in a future patch.
2047         
2048         This patch also doesn't change anything outside of WebCore/accessibility, so
2049         the rest of WebCore only calls AXObjectCache when there are changes to a
2050         RenderObject, not to a Node. Accessible notifications on nodes without
2051         renderers need to be implemented in a future patch.
2052
2053         Test: accessibility/canvas-accessibilitynodeobject.html
2054
2055         * CMakeLists.txt:
2056         * GNUmakefile.list.am:
2057         * Target.pri:
2058         * WebCore.gypi:
2059         * accessibility/AXObjectCache.cpp:
2060         (WebCore::AXObjectCache::get):
2061         (WebCore):
2062         (WebCore::createFromNode):
2063         (WebCore::AXObjectCache::getOrCreate):
2064         (WebCore::AXObjectCache::remove):
2065         * accessibility/AXObjectCache.h:
2066         (AXObjectCache):
2067         (WebCore::AXObjectCache::get):
2068         (WebCore::AXObjectCache::getOrCreate):
2069         (WebCore::AXObjectCache::remove):
2070         * accessibility/AccessibilityARIAGrid.cpp:
2071         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
2072         (WebCore):
2073         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
2074         (WebCore::AccessibilityARIAGrid::init):
2075         (WebCore::AccessibilityARIAGrid::create):
2076         * accessibility/AccessibilityARIAGrid.h:
2077         (AccessibilityARIAGrid):
2078         * accessibility/AccessibilityARIAGridCell.cpp:
2079         (WebCore::AccessibilityARIAGridCell::create):
2080         * accessibility/AccessibilityARIAGridRow.cpp:
2081         (WebCore::AccessibilityARIAGridRow::create):
2082         * accessibility/AccessibilityAllInOne.cpp:
2083         * accessibility/AccessibilityList.cpp:
2084         (WebCore::AccessibilityList::create):
2085         * accessibility/AccessibilityListBox.cpp:
2086         (WebCore::AccessibilityListBox::create):
2087         * accessibility/AccessibilityMediaControls.cpp:
2088         (WebCore::AccessibilityMediaControl::create):
2089         (WebCore::AccessibilityMediaControlsContainer::create):
2090         (WebCore::AccessibilityMediaTimeline::create):
2091         (WebCore::AccessibilityMediaTimeDisplay::create):
2092         * accessibility/AccessibilityMenuList.cpp:
2093         (WebCore::AccessibilityMenuList::create):
2094         (WebCore):
2095         * accessibility/AccessibilityMenuList.h:
2096         (AccessibilityMenuList):
2097         * accessibility/AccessibilityNodeObject.cpp: Added.
2098         (WebCore):
2099         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
2100         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
2101         (WebCore::AccessibilityNodeObject::init):
2102         (WebCore::AccessibilityNodeObject::create):
2103         (WebCore::AccessibilityNodeObject::detach):
2104         (WebCore::AccessibilityNodeObject::childrenChanged):
2105         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
2106         (WebCore::AccessibilityNodeObject::firstChild):
2107         (WebCore::AccessibilityNodeObject::lastChild):
2108         (WebCore::AccessibilityNodeObject::previousSibling):
2109         (WebCore::AccessibilityNodeObject::nextSibling):
2110         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
2111         (WebCore::AccessibilityNodeObject::parentObject):
2112         (WebCore::AccessibilityNodeObject::elementRect):
2113         (WebCore::AccessibilityNodeObject::setNode):
2114         (WebCore::AccessibilityNodeObject::document):
2115         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2116         (WebCore::AccessibilityNodeObject::addChildren):
2117         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
2118         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2119         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
2120         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
2121         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
2122         * accessibility/AccessibilityNodeObject.h: Added.
2123         (WebCore):
2124         (AccessibilityNodeObject):
2125         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
2126         (WebCore::AccessibilityNodeObject::node):
2127         (WebCore::AccessibilityNodeObject::isDetached):
2128         (WebCore::toAccessibilityNodeObject):
2129         * accessibility/AccessibilityObject.h:
2130         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
2131         * accessibility/AccessibilityProgressIndicator.cpp:
2132         (WebCore::AccessibilityProgressIndicator::create):
2133         * accessibility/AccessibilityRenderObject.cpp:
2134         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2135         (WebCore::AccessibilityRenderObject::init):
2136         (WebCore):
2137         (WebCore::AccessibilityRenderObject::create):
2138         (WebCore::AccessibilityRenderObject::detach):
2139         (WebCore::AccessibilityRenderObject::setRenderer):
2140         (WebCore::AccessibilityRenderObject::canHaveChildren):
2141         (WebCore::AccessibilityRenderObject::addCanvasChildren):
2142         (WebCore::AccessibilityRenderObject::addChildren):
2143         * accessibility/AccessibilityRenderObject.h:
2144         (AccessibilityRenderObject):
2145         * accessibility/AccessibilitySlider.cpp:
2146         (WebCore::AccessibilitySlider::create):
2147         * accessibility/AccessibilityTable.cpp:
2148         (WebCore::AccessibilityTable::AccessibilityTable):
2149         (WebCore):
2150         (WebCore::AccessibilityTable::~AccessibilityTable):
2151         (WebCore::AccessibilityTable::init):
2152         (WebCore::AccessibilityTable::create):
2153         * accessibility/AccessibilityTable.h:
2154         (AccessibilityTable):
2155         * accessibility/AccessibilityTableCell.cpp:
2156         (WebCore::AccessibilityTableCell::create):
2157         * accessibility/AccessibilityTableRow.cpp:
2158         (WebCore::AccessibilityTableRow::create):
2159
2160 2012-07-23  David Barr  <davidbarr@chromium.org>
2161
2162         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
2163         https://bugs.webkit.org/show_bug.cgi?id=91961
2164
2165         Reviewed by Tony Chang.
2166
2167         https://bugs.webkit.org/show_bug.cgi?id=89055
2168         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
2169
2170         https://bugs.webkit.org/show_bug.cgi?id=90046
2171         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
2172
2173         No new tests; build configuration fix.
2174
2175         * Configurations/FeatureDefines.xcconfig:
2176
2177 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
2178
2179         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
2180         https://bugs.webkit.org/show_bug.cgi?id=89148
2181
2182         Reviewed by Simon Fraser.
2183
2184         CSSGradientValue attempted to resolve colors during paint, this crashed
2185         when a derived color like -webkit-activelink was encountered because the
2186         corresponding element was no longer available in the StyleResolver.
2187         Instead, by adding a field to CSSGradientColorStop we can resolve and
2188         then cache the resolved colors at the correct time. To avoid sharing
2189         cached derived colors between elements we clone the gradient values when
2190         needed.
2191
2192         Test: fast/css/crash-on-gradient-with-derived-color.html
2193
2194         * css/CSSGradientValue.cpp:
2195         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
2196         resolved colors, clone if colors are derived from the element.
2197         (WebCore):
2198         (WebCore::CSSGradientValue::addStops):
2199         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
2200         StyleResolver.
2201         * css/CSSGradientValue.h:
2202         (CSSGradientColorStop): Added cache of resolved color.
2203         (CSSGradientValue):
2204         (CSSLinearGradientValue):
2205         (CSSRadialGradientValue):
2206         * css/CSSImageGeneratorValue.h:
2207         (WebCore):
2208         * css/CSSValue.h:
2209         (WebCore::CSSValue::isGradientValue):
2210         * css/StyleResolver.cpp:
2211         (WebCore::StyleResolver::collectMatchingRulesForList):
2212         * css/StyleResolver.h:
2213         (StyleResolver):
2214         * rendering/style/StyleGeneratedImage.cpp:
2215         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
2216         is no longer necessary as the gradient colors are now resolved at a
2217         time when the style is set on StyleResolver.
2218
2219 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
2220
2221         Move GregorianDateTime from JSC to WTF namespace
2222         https://bugs.webkit.org/show_bug.cgi?id=91948
2223
2224         Reviewed by Geoffrey Garen.
2225
2226         Moving GregorianDateTime into the WTF namespace allows us to us to
2227         use it in WebCore too. The new class has the same behaviour as the
2228         old struct. Only the unused timeZone member has been removed.
2229
2230         * bridge/qt/qt_runtime.cpp:
2231         (JSC::Bindings::convertValueToQVariant):
2232         (JSC::Bindings::convertQVariantToValue):
2233         * bridge/qt/qt_runtime_qt4.cpp:
2234         (JSC::Bindings::convertValueToQVariant):
2235         (JSC::Bindings::convertQVariantToValue):
2236
2237 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
2238
2239         [Chromium] Move layoutTestMode to WebCore
2240         https://bugs.webkit.org/show_bug.cgi?id=92010
2241
2242         Reviewed by Adam Barth.
2243
2244         Part of a refactoring series. See tracking bug 82948.
2245
2246         * CMakeLists.txt:
2247         * GNUmakefile.list.am:
2248         * Target.pri:
2249         * WebCore.gypi:
2250         * WebCore.vcproj/WebCore.vcproj:
2251         * WebCore.xcodeproj/project.pbxproj:
2252         * bindings/generic/RuntimeEnabledFeatures.h:
2253         (RuntimeEnabledFeatures):
2254         * platform/LayoutTestSupport.cpp: Added.
2255         (WebCore):
2256         (WebCore::isRunningLayoutTest):
2257         (WebCore::setIsRunningLayoutTest):
2258         * platform/LayoutTestSupport.h: Added.
2259         (WebCore):
2260         * platform/chromium/PlatformSupport.h:
2261         (PlatformSupport):
2262         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2263         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
2264         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
2265         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2266         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
2267         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
2268         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2269         (WebCore):
2270         (WebCore::LookupAltName):
2271         (WebCore::fontContainsCharacter):
2272         (WebCore::FillLogFont):
2273         (WebCore::FontCache::getFontDataForCharacters):
2274         (WebCore::FontCache::createFontPlatformData):
2275         * platform/graphics/skia/FontCustomPlatformData.cpp:
2276         (WebCore::FontCustomPlatformData::fontPlatformData):
2277         * platform/graphics/skia/FontSkia.cpp:
2278         (WebCore::Font::drawGlyphs):
2279         * rendering/RenderThemeChromiumAndroid.cpp:
2280         (WebCore::RenderThemeChromiumAndroid::systemColor):
2281         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
2282         * rendering/RenderThemeChromiumMac.mm:
2283         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
2284         * rendering/RenderThemeChromiumSkia.cpp:
2285         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2286         * rendering/RenderThemeChromiumWin.cpp:
2287         (WebCore):
2288         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
2289         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
2290         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
2291         (WebCore::RenderThemeChromiumWin::systemColor):
2292         (WebCore::menuListButtonWidth):
2293         (WebCore::RenderThemeChromiumWin::determineClassicState):
2294
2295 2012-07-23  Dave Tu  <dtu@chromium.org>
2296
2297         [chromium] Add droppedFrameCount to renderingStats.
2298         https://bugs.webkit.org/show_bug.cgi?id=91694
2299
2300         Reviewed by Adrienne Walker.
2301
2302         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
2303         (WebCore):
2304         (WebCore::CCFrameRateCounter::frameInterval):
2305         (WebCore::CCFrameRateCounter::frameIndex):
2306         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
2307         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
2308         (WebCore::CCFrameRateCounter::isBadFrame):
2309         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
2310         (WebCore::CCFrameRateCounter::droppedFrameCount):
2311         (CCFrameRateCounter):
2312         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2313         (WebCore::CCLayerTreeHost::renderingStats):
2314         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2315         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2316         (WebCore::CCLayerTreeHostImpl::drawLayers):
2317         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2318         (CCLayerTreeHostImpl):
2319         * platform/graphics/chromium/cc/CCRenderingStats.h:
2320         (CCRenderingStats):
2321         (WebCore::CCRenderingStats::CCRenderingStats):
2322         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2323         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
2324         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2325         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
2326
2327 2012-07-23  Dan Bernstein  <mitz@apple.com>
2328
2329         Fixed the build after r123418.
2330
2331         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
2332
2333 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
2334
2335         CSS3 calc: optimise blending expression
2336         https://bugs.webkit.org/show_bug.cgi?id=90037
2337
2338         Reviewed by Tony Chang.
2339
2340         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
2341         this blends them together when evaluated.
2342
2343         An alternative and more general approach of being able to blend two CalcExpressionNodes was
2344         tested, but involves more memory allocations, was measurably slower, and nothing currently
2345         would make use of the generality. 
2346
2347         No functional change. Covered by existing tests.
2348
2349         * platform/CalculationValue.h:
2350         (CalcExpressionBlendLength):
2351         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
2352         (WebCore::CalcExpressionBlendLength::operator==):
2353         (WebCore::CalcExpressionBlendLength::evaluate):
2354         (WebCore):
2355         * platform/Length.cpp:
2356         (WebCore::Length::blendCalculation):
2357
2358 2012-07-23  Nico Weber  <thakis@chromium.org>
2359
2360         [chromium] Show search tickmarks on css-styled scrollbars
2361         https://bugs.webkit.org/show_bug.cgi?id=91949
2362
2363         Reviewed by Adrienne Walker.
2364
2365         This is done by letting RenderScrollbarTheme::paintTickmarks()
2366         delegate to the native ScrollbarTheme. To make this possible,
2367         move paintTickmarks() from ScrollbarThemeComposite to the
2368         superclass ScrollbarTheme.
2369
2370         For testing, add internals.addTextMatchMarker() and add a pixel test.
2371
2372         * platform/ScrollbarTheme.h:
2373         (WebCore::ScrollbarTheme::paintTickmarks):
2374         Moved paintTickmarks() from ScrollbarThemeComposite to here.
2375         * platform/ScrollbarThemeComposite.h:
2376         Remove paintTickmarks().
2377         * platform/chromium/ScrollbarThemeChromium.cpp:
2378         (WebCore::ScrollbarThemeChromium::paintTickmarks):
2379         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
2380         * platform/chromium/ScrollbarThemeChromiumMac.h:
2381         (ScrollbarThemeChromiumMac):
2382         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
2383         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2384         (WebCore::ScrollbarThemeChromiumMac::paint):
2385         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
2386         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
2387         * rendering/RenderScrollbarTheme.cpp:
2388         (WebCore::RenderScrollbarTheme::paintTickmarks):
2389         Delegate to the native ScrollbarTheme for tickmark drawing.
2390         (WebCore):
2391         * rendering/RenderScrollbarTheme.h:
2392         (RenderScrollbarTheme):
2393         Override paintTickmarks().
2394
2395 2012-07-23  Brian Anderson  <brianderson@chromium.org>
2396
2397         [chromium] Use shallow flushes that don't glFlush
2398         https://bugs.webkit.org/show_bug.cgi?id=90325
2399
2400         Reviewed by Kenneth Russell.
2401
2402         Adds plumbing for the shallowFlushCHROMIUM extension and uses
2403         shallow flushes instead of normal flushes when uploading textures.
2404         Shallow flushes allow us to initiate command buffer flushes to
2405         the GPU thread/process without the overhead of a true glFlush.
2406
2407         CCTextureUpdaterTest updated to recognize shallow flushes.
2408
2409         * platform/chromium/support/Extensions3DChromium.cpp:
2410         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
2411         (WebCore):
2412         * platform/graphics/chromium/Extensions3DChromium.h:
2413         (Extensions3DChromium):
2414         * platform/graphics/chromium/cc/CCGraphicsContext.h:
2415         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
2416         (WebCore::CCResourceProvider::shallowFlushIfSupported):
2417         (WebCore):
2418         (WebCore::CCResourceProvider::CCResourceProvider):
2419         (WebCore::CCResourceProvider::initialize):
2420         * platform/graphics/chromium/cc/CCResourceProvider.h:
2421         (CCResourceProvider):
2422         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
2423         (WebCore::CCTextureUpdater::update):
2424
2425 2012-07-23  Hanyee Kim  <choco@company100.net>
2426
2427         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
2428         https://bugs.webkit.org/show_bug.cgi?id=91322
2429
2430         Reviewed by Noam Rosenthal.
2431
2432         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
2433         the property values defined in the last executing keyframe after the final iteration of animation.
2434
2435         This patch does not return right after the end of animation, but it keeps applying
2436         the property values defined in the last executing keyframe.
2437         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
2438         last executing keyframe.
2439
2440         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
2441
2442         Test: animations/fill-mode-forwards2.html
2443
2444         * platform/graphics/GraphicsLayerAnimation.cpp:
2445         (WebCore::normalizedAnimationValueForFillsForwards):
2446         (WebCore):
2447         (WebCore::GraphicsLayerAnimation::apply):
2448
2449 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2450
2451         Unreviewed, rolling out r123184, r123195, and r123197.
2452         http://trac.webkit.org/changeset/123184
2453         http://trac.webkit.org/changeset/123195
2454         http://trac.webkit.org/changeset/123197
2455         https://bugs.webkit.org/show_bug.cgi?id=92049
2456
2457         pagecycler regression (Requested by morrita on #webkit).
2458
2459         * WebCore.exp.in:
2460         * dom/Document.cpp:
2461         (WebCore::Document::Document):
2462         (WebCore::Document::~Document):
2463         (WebCore::Document::suggestedMIMEType):
2464         * dom/Document.h:
2465         (WebCore):
2466         (WebCore::Node::isDocumentNode):
2467         (WebCore::Node::Node):
2468         * dom/Node.cpp:
2469         (WebCore::Node::~Node):
2470         (WebCore::Node::setDocument):
2471         (WebCore):
2472         (WebCore::Node::setTreeScope):
2473         (WebCore::Node::treeScope):
2474         (WebCore::Node::isInShadowTree):
2475         (WebCore::Node::reportMemoryUsage):
2476         * dom/Node.h:
2477         (Node):
2478         (WebCore::Node::document):
2479         (WebCore::Node::inDocument):
2480         * dom/NodeRareData.h:
2481         (WebCore::NodeRareData::NodeRareData):
2482         (WebCore::NodeRareData::treeScope):
2483         (WebCore::NodeRareData::setTreeScope):
2484         (NodeRareData):
2485         * dom/ShadowRoot.cpp:
2486         (WebCore::ShadowRoot::ShadowRoot):
2487         * dom/TreeScope.cpp:
2488         (WebCore::TreeScope::TreeScope):
2489         (WebCore::TreeScope::setParentTreeScope):
2490         * dom/TreeScope.h:
2491         (WebCore):
2492         (WebCore::TreeScope::idTargetObserverRegistry):
2493         (TreeScope):
2494         * dom/TreeScopeAdopter.cpp:
2495         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2496         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2497         * editing/MoveSelectionCommand.cpp:
2498         * editing/RemoveNodeCommand.cpp:
2499         * editing/RemoveNodePreservingChildrenCommand.cpp:
2500         * inspector/PageConsoleAgent.cpp:
2501
2502 2012-07-23  Roger Fong  <roger_fong@apple.com>
2503
2504         On Windows, if select element is off screen horizontally, 
2505         menu is either inappropriately resized or positioned offscreen.
2506         https://bugs.webkit.org/show_bug.cgi?id=91913
2507         <rdar://problem/7611229>
2508
2509         Reviewed by Tim Horton.
2510
2511         If the select element is positioned off the edge of the screen to the left, 
2512         the menu is resized. It should not be resized, just shifted to remain on the screen.
2513         If the select element is positioned off the edge of the screen to the right, 
2514         the menu goes off screen instead of being shifted over to appear on screen.
2515         This problem only occurs on Windows.
2516         
2517         Test: ManualTests/win/select-menu-off-screen.html
2518
2519         * platform/win/PopupMenuWin.cpp:
2520         (WebCore::PopupMenuWin::calculatePositionAndSize):
2521         Modified final horizontal position calculation code to position
2522         popup menu on screen if it would otherwise go off.
2523         
2524 2012-07-23  David Dorwin  <ddorwin@chromium.org>
2525
2526         Fixed crash in webkitAddKey() when key parameter is null.
2527         https://bugs.webkit.org/show_bug.cgi?id=85444
2528
2529         Reviewed by Kentaro Hara.
2530
2531         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
2532
2533         Tests: media/encrypted-media/encrypted-media-syntax.html 
2534
2535         * html/HTMLMediaElement.cpp:
2536         (WebCore::HTMLMediaElement::webkitAddKey):
2537
2538 2012-07-23  Hayato Ito  <hayato@chromium.org>
2539
2540         A FocusScope for a distributed node should not be its TreeScope.
2541         https://bugs.webkit.org/show_bug.cgi?id=91829
2542
2543         Reviewed by Dimitri Glazkov.
2544
2545         Current implementation of FocusScope::focusScopeOf(Node*) returns
2546         the given node's treeScope().  That does not apply if the node is
2547         a distributed node.  We should calculate a FocusScope for a
2548         distributed node by traversing ancestor nodes in Composed Shadow
2549         Tree.
2550
2551         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
2552
2553         * page/FocusController.cpp:
2554         (WebCore::FocusScope::focusScopeOf):
2555
2556 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
2557
2558         Null-pointer crash when parsing border-image
2559         https://bugs.webkit.org/show_bug.cgi?id=91963
2560
2561         Reviewed by Darin Adler.
2562
2563         Test: fast/css/border-image-fill-crash.html
2564
2565         * css/CSSParser.cpp:
2566         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
2567         parseBorderImageRepeat is called when the value list is empty.
2568
2569 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
2570
2571         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
2572         https://bugs.webkit.org/show_bug.cgi?id=91761
2573
2574         Reviewed by Andreas Kling.
2575
2576         CSS exclusion shapes that are specified with negative radiuses or
2577         height/width are now considered invalid and ignored.
2578
2579         Tests added to
2580         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
2581
2582         * css/CSSParser.cpp:
2583         (WebCore::CSSParser::parseExclusionShapeRectangle):
2584         (WebCore::CSSParser::parseExclusionShapeCircle):
2585         (WebCore::CSSParser::parseExclusionShapeEllipse):
2586
2587 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
2588
2589         [chromium] Implement scrollbar theme for Android
2590         https://bugs.webkit.org/show_bug.cgi?id=91674
2591
2592         Reviewed by Adam Barth.
2593
2594         Previously the scrollbar for Android was implemented as an extra
2595         drawing pass in the compositor. Now we switch to use the standard
2596         ScrollbarTheme mechanism.
2597
2598         No new tests. We use mock scrollbars during layout test to share
2599         pixel results with Linux.
2600
2601         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2602         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
2603         (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
2604         (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
2605         (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
2606         (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
2607         (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
2608         (WebCore):
2609         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
2610         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
2611         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
2612         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
2613         (ScrollbarThemeChromiumAndroid):
2614         (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
2615         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
2616
2617 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2618
2619         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
2620         https://bugs.webkit.org/show_bug.cgi?id=91703
2621
2622         Reviewed by Adam Barth.
2623
2624         The current WebKit HTML5 parser implementation does not hold the original token
2625         in the stack of open elements and the active formatting elements. This is
2626         problematic because the original token is used to create an element in
2627         "reconstruct the active formatting elements" and "call the adoption agency".
2628
2629         As a workaround, WebKit uses the saved element instead of the original token
2630         to create an element. But this causes us to fail examples like this:
2631         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
2632         reconstructTheActiveFormattingElements calls this method to open a second <b>
2633         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
2634         should be "1".
2635
2636         Created a ref-counted container class, HTMLStackItem to hold the original token
2637         and the namespace URI as well as the element. Changed HTMLElementStack and
2638         HTMLFormattingElementList to use HTMLStackItem.
2639         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
2640         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
2641         instead of the saved element.
2642
2643         Updated test expectation for html5lib/runner-expected.txt
2644         because now resources/scripted/adoption01.dat passes.
2645
2646         * html/parser/HTMLConstructionSite.cpp:
2647         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
2648         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
2649         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
2650         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2651         (WebCore::HTMLConstructionSite::insertHTMLElement):
2652         (WebCore::HTMLConstructionSite::insertFormattingElement):
2653         (WebCore::HTMLConstructionSite::insertScriptElement):
2654         (WebCore::HTMLConstructionSite::insertForeignElement):
2655         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
2656         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
2657         * html/parser/HTMLConstructionSite.h:
2658         (HTMLConstructionSite):
2659         (WebCore::HTMLConstructionSite::currentElementRecord):
2660         * html/parser/HTMLElementStack.cpp:
2661         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
2662         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
2663         (WebCore::HTMLElementStack::pushRootNode):
2664         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
2665         (WebCore::HTMLElementStack::pushRootNodeCommon):
2666         (WebCore::HTMLElementStack::pushHTMLHeadElement):
2667         (WebCore::HTMLElementStack::pushHTMLBodyElement):
2668         (WebCore::HTMLElementStack::push):
2669         (WebCore::HTMLElementStack::insertAbove):
2670         (WebCore::HTMLElementStack::pushCommon):
2671         * html/parser/HTMLElementStack.h:
2672         (WebCore::HTMLElementStack::ElementRecord::element):
2673         (WebCore::HTMLElementStack::ElementRecord::node):
2674         (WebCore::HTMLElementStack::ElementRecord::stackItem):
2675         (ElementRecord):
2676         (HTMLElementStack):
2677         * html/parser/HTMLFormattingElementList.cpp:
2678         (WebCore::HTMLFormattingElementList::swapTo):
2679         (WebCore::HTMLFormattingElementList::append):
2680         * html/parser/HTMLFormattingElementList.h:
2681         (WebCore::HTMLFormattingElementList::Entry::Entry):
2682         (WebCore::HTMLFormattingElementList::Entry::isMarker):
2683         (WebCore::HTMLFormattingElementList::Entry::stackItem):
2684         (WebCore::HTMLFormattingElementList::Entry::element):
2685         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
2686         (WebCore::HTMLFormattingElementList::Entry::operator==):
2687         (WebCore::HTMLFormattingElementList::Entry::operator!=):
2688         (Entry):
2689         (HTMLFormattingElementList):
2690         * html/parser/HTMLStackItem.h: Added.
2691         (WebCore):
2692         (HTMLStackItem):
2693         (WebCore::HTMLStackItem::create):
2694         (WebCore::HTMLStackItem::element):
2695         (WebCore::HTMLStackItem::node):
2696         (WebCore::HTMLStackItem::token):
2697         (WebCore::HTMLStackItem::namespaceURI):
2698         (WebCore::HTMLStackItem::HTMLStackItem):
2699         * html/parser/HTMLTreeBuilder.cpp:
2700         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2701         (WebCore::HTMLTreeBuilder::processStartTag):
2702         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2703
2704 2012-07-23  Andreas Kling  <kling@webkit.org>
2705
2706         Report the extra memory used by immutable StylePropertySet objects.
2707         <http://webkit.org/b/92032>
2708
2709         Reviewed by Anders Carlsson.
2710
2711         Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
2712         size on top of sizeof(T).
2713
2714         Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
2715         tacked onto the end of the object when m_isMutable == false.
2716
2717         * css/StylePropertySet.h:
2718         (WebCore::StylePropertySet::reportMemoryUsage):
2719         * dom/MemoryInstrumentation.h:
2720         (WebCore::MemoryObjectInfo::reportObjectInfo):
2721         (WebCore::MemoryClassInfo::MemoryClassInfo):
2722
2723 2012-07-23  Gregg Tavares  <gman@google.com>
2724
2725         Fix WebGL texSubImage2D for cube maps
2726         https://bugs.webkit.org/show_bug.cgi?id=91927
2727
2728         Reviewed by Kenneth Russell.
2729
2730         Fixes texSubImage2D so any size rectangle can be passed in
2731         for cube maps.
2732
2733         Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
2734
2735         * html/canvas/WebGLRenderingContext.cpp:
2736         (WebCore):
2737         (WebCore::WebGLRenderingContext::copyTexImage2D):
2738         (WebCore::WebGLRenderingContext::texImage2DBase):
2739         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2740         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2741         * html/canvas/WebGLRenderingContext.h:
2742         (WebGLRenderingContext):
2743
2744 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2745
2746         Unreviewed, rolling out r123387.
2747         http://trac.webkit.org/changeset/123387
2748         https://bugs.webkit.org/show_bug.cgi?id=92036
2749
2750         Broke chromium win build (Requested by tony^work on #webkit).
2751
2752         * WebCore.gyp/WebCore.gyp:
2753         * WebCore.gyp/scripts/rule_bison.py:
2754         * bindings/scripts/preprocessor.pm:
2755         (applyPreprocessor):
2756         * make-hash-tools.pl:
2757
2758 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
2759
2760         Ref-count AtomicHTMLToken
2761         https://bugs.webkit.org/show_bug.cgi?id=91981
2762
2763         Reviewed by Adam Barth.
2764
2765         Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
2766
2767         No new tests - no functional changes.
2768
2769         * html/parser/HTMLConstructionSite.cpp:
2770         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
2771         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2772         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
2773         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
2774         (WebCore::HTMLConstructionSite::insertDoctype):
2775         (WebCore::HTMLConstructionSite::insertComment):
2776         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
2777         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
2778         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
2779         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
2780         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2781         (WebCore::HTMLConstructionSite::insertHTMLElement):
2782         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2783         (WebCore::HTMLConstructionSite::insertFormattingElement):
2784         (WebCore::HTMLConstructionSite::insertScriptElement):
2785         (WebCore::HTMLConstructionSite::insertForeignElement):
2786         (WebCore::HTMLConstructionSite::createElement):
2787         (WebCore::HTMLConstructionSite::createHTMLElement):
2788         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2789         * html/parser/HTMLConstructionSite.h:
2790         (HTMLConstructionSite):
2791         * html/parser/HTMLToken.h:
2792         (WebCore::AtomicHTMLToken::create):
2793         (AtomicHTMLToken):
2794         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2795         * html/parser/HTMLTreeBuilder.cpp:
2796         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
2797         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
2798         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
2799         (WebCore::HTMLTreeBuilder::processToken):
2800         (WebCore::HTMLTreeBuilder::processDoctypeToken):
2801         (WebCore::HTMLTreeBuilder::processFakeStartTag):
2802         (WebCore::HTMLTreeBuilder::processFakeEndTag):
2803         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
2804         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
2805         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
2806         (WebCore):
2807         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
2808         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2809         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
2810         (WebCore::HTMLTreeBuilder::processStartTag):
2811         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
2812         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
2813         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
2814         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2815         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
2816         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
2817         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
2818         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
2819         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
2820         (WebCore::HTMLTreeBuilder::processEndTag):
2821         (WebCore::HTMLTreeBuilder::processComment):
2822         (WebCore::HTMLTreeBuilder::processCharacter):
2823         (WebCore::HTMLTreeBuilder::processEndOfFile):
2824         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
2825         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
2826         (WebCore::HTMLTreeBuilder::defaultForInHead):
2827         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
2828         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
2829         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
2830         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
2831         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
2832         (WebCore::HTMLTreeBuilder::processScriptStartTag):
2833         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
2834         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2835         (WebCore::HTMLTreeBuilder::parseError):
2836         * html/parser/HTMLTreeBuilder.h:
2837         (HTMLTreeBuilder):
2838         * html/parser/TextDocumentParser.cpp:
2839         (WebCore::TextDocumentParser::insertFakePreElement):
2840
2841 2012-07-23  Scott Graham  <scottmg@google.com>
2842
2843         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2844         https://bugs.webkit.org/show_bug.cgi?id=91667
2845
2846         Reviewed by Tony Chang.
2847
2848         Using native tools instead of cygwin version improves build time
2849         performance by roughly 50% (on top of previous cl-instead-of-gcc
2850         change).
2851
2852         Also, use - instead of / for cl flags because a layer of project
2853         generator converts them to \ otherwise, which causes the preprocessing
2854         to fail (very slowly because of the cygwin-loop with a sleep 1).
2855
2856         No new tests.
2857
2858         * WebCore.gyp/WebCore.gyp:
2859         * WebCore.gyp/scripts/rule_bison.py:
2860         * bindings/scripts/preprocessor.pm:
2861         (applyPreprocessor):
2862         * make-hash-tools.pl:
2863
2864 2012-06-12  Jer Noble  <jer.noble@apple.com>
2865
2866         MediaController.currentTime should be kept stable during script execution.
2867         https://bugs.webkit.org/show_bug.cgi?id=88555
2868
2869         Reviewed by Eric Carlson.
2870
2871         Test: media/media-controller-time-constant.html
2872
2873         To keep MediaController.currentTime stable, add a new m_position variable and 
2874         a new m_clearPositionTimer timer.  Both must be mutable variables as they will
2875         be updated from within const functions.  Calls to currentTime() will result in
2876         stable values until the next runloop iteration.
2877
2878         * html/MediaController.cpp:
2879         (MediaController::MediaController):
2880         (MediaController::currentTime):
2881         (MediaController::setCurrentTime):
2882         (MediaController::clearPositionTimerFired):
2883         * html/MediaController.h:
2884
2885 2012-07-23  Huang Dongsung  <luxtella@company100.net>
2886
2887         Destroy CSS decoded data more eagerly once they become dead caches.
2888         https://bugs.webkit.org/show_bug.cgi?id=91733
2889
2890         Reviewed by Geoffrey Garen.
2891
2892         Internal review by Kwang Yul Seo.
2893
2894         There are three CachedResources with decoded data: CachedImage, CachedScript
2895         and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we
2896         eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved().
2897         We must apply the same policy here in CachedCSSStyleSheet because priority
2898         inversion can occur. For example, we can't destroy the decoded data of CachedImages
2899         when they are referenced by CachedCSSStyleSheet as background, mask or border
2900         images.
2901
2902         No new tests - no new testable functionality.
2903
2904         * loader/cache/CachedCSSStyleSheet.cpp:
2905         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
2906         (WebCore::CachedCSSStyleSheet::didAddClient):
2907         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
2908         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2909         (WebCore):
2910         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
2911         * loader/cache/CachedCSSStyleSheet.h:
2912         (CachedCSSStyleSheet):
2913
2914 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
2915
2916         Part 2 of: Implement sticky positioning
2917         https://bugs.webkit.org/show_bug.cgi?id=90046
2918
2919         Reviewed by Ojan Vafai.
2920
2921         Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky'
2922         value for position, returning it from getComputedStyle(), and storing it in RenderStyle.
2923
2924         Test: fast/css/sticky/parsing-position-sticky.html
2925
2926         * Configurations/FeatureDefines.xcconfig:
2927         * css/CSSComputedStyleDeclaration.cpp:
2928         (WebCore::getPositionOffsetValue):
2929         * css/CSSParser.cpp:
2930         (WebCore::isValidKeywordPropertyAndValue):
2931         * css/CSSPrimitiveValueMappings.h:
2932         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2933         (WebCore::CSSPrimitiveValue::operator EPosition):
2934         * css/CSSValueKeywords.in:
2935         * rendering/style/RenderStyle.h:
2936         * rendering/style/RenderStyleConstants.h:
2937
2938 2012-07-23  Stephen Chenney  <schenney@chromium.org>
2939
2940         Crash when setting empty class name on a new element
2941         https://bugs.webkit.org/show_bug.cgi?id=92024
2942
2943         Reviewed by Andreas Kling.
2944
2945         Add a check for null attributeData() when setting the className to an
2946         empty string on a newly created element. New SVG elements have null
2947         attributeData() on baseVal upon creation.
2948
2949         Test: svg/custom/empty-className-baseVal-crash.html
2950
2951         * dom/StyledElement.cpp:
2952         (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
2953
2954 2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
2955
2956         [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
2957         https://bugs.webkit.org/show_bug.cgi?id=80622
2958
2959         Reviewed by Adrienne Walker.
2960
2961         clipRect(), usesLayerClipping(), and drawableContentRect() have been
2962         very confusing in CCLayerTreeHostCommon for a while. This patch
2963         refactors it so that (1) clipping is only done locally in
2964         calcDrawTransforms, and (2) the layer's drawableContentRect value
2965         is now meaningful value outside of calcDrawTransforms.
2966         Additionally, the layer is now always clipped to the root
2967         surface's contentBounds (which are set to the viewport bounds).
2968         This refactor not only makes calcDrawTransforms far more readable and intuitive, but
2969         this patch enables more upcoming beneficial refactors, including
2970         the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953.
2971
2972         Tests are also significantly updated to keep up with this refactoring change.
2973
2974         * platform/graphics/chromium/LayerChromium.cpp:
2975         (WebCore::LayerChromium::LayerChromium):
2976         * platform/graphics/chromium/LayerChromium.h:
2977         (LayerChromium):
2978         Removed m_usesLayerClipping and m_clipRect and associated accessors.
2979
2980         * platform/graphics/chromium/RenderSurfaceChromium.h:
2981         (RenderSurfaceChromium):
2982         Updated comment
2983
2984         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2985         (WebCore::CCLayerImpl::CCLayerImpl):
2986         * platform/graphics/chromium/cc/CCLayerImpl.h:
2987         (CCLayerImpl):
2988         Removed m_usesLayerClipping and m_clipRect and associated accessors.
2989
2990         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2991         (WebCore::CCLayerTreeHost::updateLayers):
2992         removed setClipRect code that no longer applies
2993
2994         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2995         (WebCore::calculateLayerScissorRect):
2996         scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect.
2997
2998         (WebCore::calculateSurfaceScissorRect):
2999         scissor rect is now a little bit tighter, except when filters are involved.
3000
3001         (WebCore::layerClipsSubtree):
3002         new helper function
3003
3004         (WebCore):
3005         (WebCore::calculateVisibleContentRect):
3006         (WebCore::subtreeShouldRenderToSeparateSurface):
3007         (WebCore::calculateDrawTransformsInternal):
3008            - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns,
3009            - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping.
3010            - removed the boolean return value, which was redundant with drawableContentRectOfSubtree.
3011            - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic.
3012            - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space.
3013
3014         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
3015         (WebCore::pointIsClippedBySurfaceOrClipRect):
3016         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3017         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
3018         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3019         (WebCore::::layerScissorRectInTargetSurface):
3020         Updated this accessor.  It could be removed in the future, but not appropriate for this patch.
3021
3022         * platform/graphics/chromium/cc/CCRenderSurface.h:
3023
3024 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3025
3026         [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system.
3027
3028         * CMakeLists.txt:
3029
3030 2012-07-23  Ryosuke Niwa  <rniwa@webkit.org>
3031
3032         REGRESSION(r123281): childNodes sometimes returns wrong nodes
3033         https://bugs.webkit.org/show_bug.cgi?id=92014
3034
3035         Reviewed by Anders Carlsson.
3036
3037         The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as
3038         firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()),
3039         NOT firstNode(forward, rootNode(), previous)
3040         as evident from the argument list of the function.
3041
3042         Test: fast/dom/NodeList/childNodes-reverse-iteration.html
3043
3044         * html/HTMLCollection.cpp:
3045         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
3046
3047 2012-07-23  Steve VanDeBogart  <vandebo@chromium.org>
3048
3049         Chrome/Skia: PDF print output does not have clickable links.
3050         https://bugs.webkit.org/show_bug.cgi?id=91171
3051
3052         Reviewed by Stephen White.
3053
3054         Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
3055
3056         Printing is not generally testable.
3057
3058         * platform/graphics/skia/GraphicsContextSkia.cpp:
3059         (WebCore::GraphicsContext::setURLForRect):
3060
3061 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
3062
3063         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
3064         https://bugs.webkit.org/show_bug.cgi?id=91006
3065
3066         Reviewed by Ryosuke Niwa.
3067
3068         The rationale here is that the client doesn't need to know about the touch
3069         event handler count. needTouchEvents was already used for that purpose.
3070
3071         Test: fast/events/touch/touch-handler-count.html
3072
3073         * dom/Document.cpp:
3074         (WebCore::Document::Document):
3075         (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed.
3076         (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER
3077         flag for the document if we reach a count of zero. The rationale being that
3078         hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for
3079         the same purpose.
3080         * dom/Document.h:
3081         (Document):
3082         (WebCore::Document::touchEventHandlerCount):
3083         * loader/EmptyClients.h:
3084         * page/ChromeClient.h:
3085         (ChromeClient):
3086         * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged.
3087         (WebCore::Frame::setDocument): call needsTouchEvents directly.
3088         * page/Frame.h: Ditto.
3089         (Frame):
3090         * testing/Internals.cpp:
3091         (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly
3092         for additional testing.
3093         (WebCore):
3094         * testing/Internals.h:
3095         (Internals):
3096         * testing/Internals.idl:
3097
3098 2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3099
3100         [Qt] RenderThemeQtMobile highlight colors are not being used
3101         https://bugs.webkit.org/show_bug.cgi?id=92004
3102
3103         Reviewed by Noam Rosenthal.
3104
3105         The issue here is that setPaletteFromPageClientIfExists() is being used as a
3106         virtual function, but it isn't, so when platformActiveSelectionBackgroundColor()
3107         runs, it doesn't pick the right palette.
3108
3109         Besides fixing this virtual behavior, the patch changes the structure a bit,
3110         because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme
3111         to set the palette, which isn't exactly what the function name says.
3112
3113         * platform/qt/RenderThemeQt.cpp:
3114         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
3115         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
3116         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
3117         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
3118         (WebCore::RenderThemeQt::platformFocusRingColor):
3119         (WebCore::RenderThemeQt::systemColor):
3120         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
3121         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
3122         Use the virtual colorPalette() to get the palette.
3123
3124         (WebCore::RenderThemeQt::colorPalette):
3125         (WebCore): Removed the code for getting the page client from here since it is
3126         used only by the QStyle variant.
3127
3128         * platform/qt/RenderThemeQt.h:
3129         (RenderThemeQt):
3130         * platform/qt/RenderThemeQtMobile.cpp:
3131         (WebCore::RenderThemeQtMobile::colorPalette):
3132         (WebCore):
3133         * platform/qt/RenderThemeQtMobile.h:
3134         (RenderThemeQtMobile):
3135
3136 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
3137
3138         Part 1 of: Implement sticky positioning
3139         https://bugs.webkit.org/show_bug.cgi?id=90046
3140
3141         Reviewed by Ojan Vafai.
3142
3143         Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
3144         
3145         Sort the ENABLE_CSS lines in the file. Make sure all the flags
3146         are in FEATURE_DEFINES.
3147
3148         * Configurations/FeatureDefines.xcconfig:
3149
3150 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3151
3152         Unreviewed, rolling out r123339.
3153         http://trac.webkit.org/changeset/123339
3154         https://bugs.webkit.org/show_bug.cgi?id=92006
3155
3156         massive media tests failure (Requested by philn on #webkit).
3157
3158         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3159         (WTF::adoptGRef):
3160         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
3161         (setGstElementClassMetadata):
3162         * platform/graphics/gstreamer/GStreamerVersioning.h:
3163
3164 2012-07-21  Vincent Scheib  <scheib@chromium.org>
3165
3166         webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
3167         https://bugs.webkit.org/show_bug.cgi?id=91892
3168
3169         Reviewed by Adam Barth.
3170
3171         PointerLockElement only returned when requested from the document that owns it.
3172
3173         Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
3174                http/tests/fullscreen/fullscreenelement-same-origin.html
3175                http/tests/pointer-lock/pointerlockelement-different-origin.html
3176                http/tests/pointer-lock/pointerlockelement-same-origin.html
3177
3178         * dom/Document.cpp:
3179         (WebCore::Document::webkitPointerLockElement):
3180
3181 2012-07-23  Philippe Normand  <pnormand@igalia.com>
3182
3183         [GTK][jhbuild] Switch to GStreamer 0.11 build
3184         https://bugs.webkit.org/show_bug.cgi?id=91727
3185
3186         Reviewed by Gustavo Noronha Silva.
3187
3188         Add a new function to encapsulate the GStreamer API removal of
3189         GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this
3190         macro can now be replaced by calling the g_object_is_floating
3191         function.
3192
3193         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3194         (WTF::adoptGRef):
3195         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
3196         (gstObjectIsFloating):
3197         * platform/graphics/gstreamer/GStreamerVersioning.h:
3198
3199 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
3200
3201         [EFL] media/controls-styling.html is failing
3202         https://bugs.webkit.org/show_bug.cgi?id=91984
3203
3204         Reviewed by Eric Carlson.
3205
3206         Make sure that the CSS properties letter-spacing, word-spacing,
3207         line-height, text-transform, text-indent, text-shadow,
3208         text-decoration and color do not affect the media element controls,
3209         that display text.
3210
3211         No new tests. Already tested by media/controls-styling.html and
3212         media/controls-styling-strict.html
3213
3214         * css/mediaControlsEfl.css:
3215         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
3216
3217 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3218
3219         Unreviewed. Fix make distcheck.
3220
3221         * GNUmakefile.list.am: Add missing header files.
3222
3223 2012-07-23  Kent Tamura  <tkent@chromium.org>
3224
3225         Replace some instances of shadowAncestorNode() with shadowHost()
3226         https://bugs.webkit.org/show_bug.cgi?id=91966
3227
3228         Reviewed by Hajime Morita.
3229
3230         shadowAncestorNode() is deprecated. We should use shadowHost().
3231         No new tests. This doesn't change any behavior.
3232
3233         * css/SelectorChecker.cpp:
3234         (WebCore::SelectorChecker::checkSelector):
3235         * dom/TreeScope.cpp:
3236         (WebCore::listTreeScopes):
3237         * html/HTMLSummaryElement.cpp:
3238         (WebCore::isClickableControl):
3239         * html/shadow/DetailsMarkerControl.cpp:
3240         (WebCore::DetailsMarkerControl::summaryElement):
3241         * html/shadow/MeterShadowElement.cpp:
3242         (WebCore::MeterShadowElement::meterElement):
3243         * html/shadow/ProgressShadowElement.cpp:
3244         (WebCore::ProgressShadowElement::progressElement):
3245         * html/shadow/SliderThumbElement.cpp:
3246         (WebCore::RenderSliderThumb::layout):
3247         (WebCore::RenderSliderContainer::layout):
3248         (WebCore::SliderThumbElement::hostInput):
3249         (WebCore::TrackLimiterElement::shadowPseudoId):
3250         (WebCore::SliderContainerElement::shadowPseudoId):
3251         * html/shadow/TextControlInnerElements.cpp:
3252         (WebCore::TextControlInnerElement::customStyleForRenderer):
3253         (WebCore::TextControlInnerTextElement::defaultEventHandler):
3254         (WebCore::TextControlInnerTextElement::createRenderer):
3255         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
3256         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId):
3257         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3258         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
3259         (WebCore::SpinButtonElement::defaultEventHandler):
3260         (WebCore::SpinButtonElement::step):
3261         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
3262         (WebCore::InputFieldSpeechButtonElement::setState):
3263         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
3264         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
3265         * rendering/RenderTextControlSingleLine.cpp:
3266         (WebCore::RenderTextControlInnerBlock::positionForPoint):
3267
3268 2012-07-23  Pavel Feldman  <pfeldman@chromium.org>
3269
3270         [WK2] REGRESSION r122966: Crash when closing tab with Web Inspector open in WebKit::PageOverlay
3271         https://bugs.webkit.org/show_bug.cgi?id=91782
3272
3273         Reviewed by Yury Semikhatsky.
3274
3275         hideHighlight was never called once user hovered over a node.
3276
3277         * inspector/DOMNodeHighlighter.cpp:
3278         (WebCore::InspectorOverlay::update):
3279
3280 2012-07-23  Peter Beverloo  <peter@chromium.org>
3281
3282         [Chromium] Build fix for the Windows builder following r123311
3283         https://bugs.webkit.org/show_bug.cgi?id=91979
3284
3285         Unreviewed build fix.
3286
3287         Changeset r123311 moved the TextCodecWinCE.{cpp,h} files to the Windows
3288         directory. Update Chromium's references to these files to fix the build.
3289
3290         * WebCore.gypi:
3291
3292 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3293
3294         [WIN] Remove ICU dependencies from UniscribeController
3295         https://bugs.webkit.org/show_bug.cgi?id=91921
3296
3297         Reviewed by Ryosuke Niwa.
3298
3299         Replace ICU specific functions and macros with the corresponding code from WTF::Unicode.
3300         This allows us to use UniscribeController with an other Unicode implementation too.
3301
3302         * platform/graphics/win/UniscribeController.cpp:
3303         (WebCore::UniscribeController::advance):
3304
3305 2012-07-23  Christophe Dumez  <christophe.dumez@intel.com>
3306
3307         [EFL] media/controls-styling-strict.html is failing
3308         https://bugs.webkit.org/show_bug.cgi?id=91960
3309
3310         Reviewed by Kenneth Rohde Christiansen.
3311
3312         Use "display: -webkit-box;" instead of inline-block
3313         for current-time control. This is needed because
3314         inline-block behaves differently in strict mode.
3315
3316         No new test, already tested by media/controls-styling-strict.html
3317
3318         * css/mediaControlsEfl.css:
3319         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
3320
3321 2012-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
3322
3323         Unreviewed. Fix GTK+ build with ENABLE_DATALIST_ELEMENT.
3324
3325         Add an implementation for virtual pure methods sliderTickSize()
3326         and sliderTickOffsetFromTrackCenter() when HTML5 datalist element
3327         is enabled.
3328
3329         * platform/gtk/RenderThemeGtk.cpp:
3330         (WebCore):
3331         (WebCore::RenderThemeGtk::sliderTickSize):
3332         (WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
3333         * platform/gtk/RenderThemeGtk.h:
3334
3335 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3336
3337         Replace getCurrentLocalTime() with GetLocalTime() in LocaleWin.cpp
3338         https://bugs.webkit.org/show_bug.cgi?id=91937
3339
3340         Reviewed by Ryosuke Niwa.
3341
3342         The windows function returns the required year directly and
3343         removes one additonal dependecy on getCurrentLocalTime().
3344
3345         * platform/text/LocaleWin.cpp:
3346         (WebCore::LocaleWin::LocaleWin):
3347
3348 2012-07-23  Vsevolod Vlasov  <vsevik@chromium.org>
3349
3350         Web Inspector: Drag and drop should not be started on right mouse click.
3351         https://bugs.webkit.org/show_bug.cgi?id=91728
3352
3353         Reviewed by Pavel Feldman.
3354
3355         Introduced WebInspector.installDragHandle method to control drag and drop support, checking whichg mouse button is pressed.
3356         Simplified WebInspector._elementDragStart, removed "element" parameter.
3357         Simplified tab moving support in TabbedPane, removed "mousemove" handler.
3358         Removed while loop determining which element was dragged in TimelineOverviewPane, each drag support is now installed independently.
3359         Drive-by: fixed TimelineOverviewPane window moving on resources-dividers-label-bar drang-and-drop.
3360         Drive-by: fixed CSSStyleModel compilation.
3361
3362         * inspector/front-end/CSSStyleModel.js:
3363         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
3364         * inspector/front-end/DataGrid.js:
3365         (WebInspector.DataGrid.prototype._positionResizers):
3366         (WebInspector.DataGrid.prototype._startResizerDragging):
3367         (WebInspector.DataGrid.prototype._endResizerDragging):
3368         * inspector/front-end/Drawer.js:
3369         (WebInspector.Drawer):
3370         (WebInspector.Drawer.prototype._animationDuration):
3371         (WebInspector.Drawer.prototype._startStatusBarDragging):
3372         (WebInspector.Drawer.prototype._endStatusBarDragging):
3373         * inspector/front-end/HeapSnapshotView.js:
3374         (WebInspector.HeapSnapshotView.prototype._startRetainersHeaderDragging):
3375         (WebInspector.HeapSnapshotView.prototype._endRetainersHeaderDragging):
3376         * inspector/front-end/SidebarOverlay.js:
3377         (WebInspector.SidebarOverlay.prototype.set _startResizerDragging):
3378         (WebInspector.SidebarOverlay.prototype._endResizerDragging):
3379         (WebInspector.SidebarOverlay.prototype._installResizer):
3380         * inspector/front-end/Spectrum.js:
3381         * inspector/front-end/SplitView.js:
3382         (WebInspector.SplitView.prototype._startResizerDragging):
3383         (WebInspector.SplitView.prototype._endResizerDragging):
3384         (WebInspector.SplitView.prototype.installResizer):
3385         * inspector/front-end/TabbedPane.js:
3386         (WebInspector.TabbedPaneTab.prototype._createTabElement):
3387         (WebInspector.TabbedPaneTab.prototype._tabMouseDown):
3388         (WebInspector.TabbedPaneTab.prototype._startTabDragging):
3389         (WebInspector.TabbedPaneTab.prototype._endTabDragging):
3390         * inspector/front-end/TimelineOverviewPane.js:
3391         (WebInspector.TimelineOverviewPane):
3392         (WebInspector.TimelineOverviewWindow):
3393         (WebInspector.TimelineOverviewWindow.prototype._leftResizeElementDragging):
3394         (WebInspector.TimelineOverviewWindow.prototype._rightResizeElementDragging):
3395         (WebInspector.TimelineOverviewWindow.prototype._startWindowSelectorDragging):
3396         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
3397         (WebInspector.TimelineOverviewWindow.prototype._startWindowDragging):
3398         (WebInspector.TimelineOverviewWindow.prototype._windowDragging):
3399         (WebInspector.TimelineOverviewWindow.prototype._endWindowDragging):
3400         (WebInspector.TimelineOverviewWindow.prototype._moveWindow):
3401         (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel):
3402         * inspector/front-end/TimelinePanel.js:
3403         (WebInspector.TimelinePanel):
3404         (WebInspector.TimelinePanel.prototype._startSplitterDragging):
3405         (WebInspector.TimelinePanel.prototype._endSplitterDragging):
3406         * inspector/front-end/Toolbar.js:
3407         (WebInspector.Toolbar):
3408         (WebInspector.Toolbar.prototype._toolbarDragStart):
3409         (WebInspector.Toolbar.prototype._toolbarDragEnd):
3410         * inspector/front-end/UIUtils.js:
3411         (WebInspector.installDragHandle):
3412         (WebInspector._elementDragStart):
3413         (WebInspector._elementDragEnd):
3414         * inspector/front-end/timelinePanel.css:
3415         (#timeline-overview-grid .resources-dividers-label-bar):
3416
3417 2012-07-23  Hayato Ito  <hayato@chromium.org>
3418
3419         ComposedShadowTreeWalker should skip an empty insertion points.
3420         https://bugs.webkit.org/show_bug.cgi?id=91826
3421
3422         Reviewed by Hajime Morita.
3423
3424         ComposedShadowTreeWalker wrongly returns 'null' if it encounters
3425         an insertion point into where no nodes are distributed.  We should
3426         skip such an insertion point and continue walking using the next
3427         possible node, which might be a next sibling or a next distributed
3428         node, and resolve the next node recursively.
3429
3430         Test: fast/dom/shadow/composed-shadow-tree-walker.html
3431
3432         * dom/ComposedShadowTreeWalker.cpp:
3433         (WebCore::ComposedShadowTreeWalker::traverseLightChildren):
3434         (WebCore):
3435         (WebCore::ComposedShadowTreeWalker::traverseSiblings):
3436         (WebCore::ComposedShadowTreeWalker::traverseNode):
3437         (WebCore::ComposedShadowTreeWalker::traverseDistributedeNodes):
3438         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
3439         (WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
3440         (WebCore::ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot):
3441         * dom/ComposedShadowTreeWalker.h:
3442         (ComposedShadowTreeWalker):
3443
3444 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3445
3446         Rename TextCodecWinCE to TextCodecWin
3447         https://bugs.webkit.org/show_bug.cgi?id=91947
3448
3449         Reviewed by Ryosuke Niwa.
3450
3451         Since TextCodecWinCE is used by other (non-upstreamed) windows ports too,
3452         TextCodecWin is a better name for the implementation.
3453         Also remove the dependency on WinCE FontCache to make it more usable.
3454
3455         * PlatformWinCE.cmake:
3456         * platform/text/TextEncodingRegistry.cpp:
3457         (WebCore::extendTextCodecMaps):
3458         * platform/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.cpp.
3459         * platform/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/wince/TextCodecWinCE.h.
3460
3461 2012-07-22  Kentaro Hara  <haraken@chromium.org>
3462
3463         [V8] CodeGeneratorV8.pm should support static attributes
3464         https://bugs.webkit.org/show_bug.cgi?id=91764
3465
3466         Reviewed by Adam Barth.
3467
3468         CodeGeneratorJS.pm already supports static attributes.
3469         CodeGeneratorV8.pm should also support them.
3470
3471         Tests: bindings/scripts/test/TestObj.idl
3472                bindings/scripts/test/TestSupplemental.idl
3473
3474         * bindings/scripts/CodeGeneratorV8.pm:
3475         (GenerateNormalAttrGetter):
3476         (GenerateNormalAttrSetter):
3477
3478         * bindings/scripts/test/TestObj.idl: Added defined(TESTING_V8).
3479         * bindings/scripts/test/TestSupplemental.idl: Added test cases for static attributes in supplemental IDL files.
3480
3481         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests results.
3482         (WebCore):
3483         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
3484         The generated code is wrong since CodeGeneratorJS.pm does not support static attributes for
3485         supplemental IDL files. I will fix it in a follow-up patch.
3486         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
3487         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3488         * bindings/scripts/test/JS/JSTestInterface.h:
3489         (WebCore):
3490         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
3491         (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetter):
3492         (TestInterfaceV8Internal):
3493         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetter):
3494         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
3495         (WebCore):
3496         * bindings/scripts/test/V8/V8TestObj.cpp:
3497         (WebCore::TestObjV8Internal::staticReadOnlyIntAttrAttrGetter):
3498         (TestObjV8Internal):
3499         (WebCore::TestObjV8Internal::staticStringAttrAttrGetter):
3500         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
3501         (WebCore):
3502
3503 2012-07-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3504
3505         Missing *explicit* keyword in storage and workers.
3506         https://bugs.webkit.org/show_bug.cgi?id=91934
3507
3508         Reviewed by Kentaro Hara.
3509
3510         Some constructors missed to use *explicit* keyword. They need to be added
3511         *explicit* keyword to contructor which has a parameter in order to avoid
3512         implicit type conversion.
3513
3514         No new tests. Convered by existing tests.
3515
3516         * storage/StorageAreaImpl.h:
3517         (StorageAreaImpl):
3518         * storage/StorageMap.h:
3519         (StorageMap):
3520         * storage/StorageSyncManager.h:
3521         (StorageSyncManager):
3522         * storage/StorageTask.h:
3523         (StorageTask):
3524         * storage/StorageTracker.h:
3525         (StorageTracker):
3526         * workers/SharedWorker.h:
3527         (SharedWorker):
3528         * workers/Worker.h:
3529         (Worker):
3530         * workers/WorkerLocation.h:
3531         (WebCore::WorkerLocation::WorkerLocation):
3532         * workers/WorkerMessagingProxy.h:
3533         (WorkerMessagingProxy):
3534
3535 2012-07-23  Kent Tamura  <tkent@chromium.org>
3536
3537         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively
3538         https://bugs.webkit.org/show_bug.cgi?id=91941
3539
3540         Reviewed by Kentaro Hara.
3541
3542         A flag name for an elmement should be ENABLE_*_ELEMENT.
3543
3544         * Configurations/FeatureDefines.xcconfig:
3545         * DerivedSources.make:
3546         * GNUmakefile.am:
3547         * accessibility/AXObjectCache.cpp:
3548         (WebCore::createFromRenderer):
3549         * accessibility/AccessibilityProgressIndicator.cpp:
3550         * accessibility/AccessibilityProgressIndicator.h:
3551         * css/CSSPrimitiveValueMappings.h:
3552         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3553         * css/SelectorChecker.cpp:
3554         (WebCore::SelectorChecker::checkOneSelector):
3555         * css/StyleResolver.cpp:
3556         (WebCore::StyleResolver::collectMatchingRulesForList):
3557         * css/html.css:
3558         * html/HTMLMeterElement.cpp:
3559         * html/HTMLMeterElement.h:
3560         * html/HTMLMeterElement.idl:
3561         * html/HTMLProgressElement.cpp:
3562         * html/HTMLProgressElement.h:
3563         * html/HTMLProgressElement.idl:
3564         * html/HTMLTagNames.in:
3565         * html/shadow/MeterShadowElement.cpp:
3566         * html/shadow/MeterShadowElement.h: Wrap with #if ENABLE(METER_ELEMENT).
3567         * html/shadow/ProgressShadowElement.cpp:
3568         * html/shadow/ProgressShadowElement.h: Wrap with #if ENABLE(PROGRESS_ELEMENT).
3569         * page/DOMWindow.idl:
3570         * platform/efl/RenderThemeEfl.cpp:
3571         (WebCore::RenderThemeEfl::paintThemePart):
3572         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
3573         (WebCore):
3574         * platform/efl/RenderThemeEfl.h:
3575         (RenderThemeEfl):
3576         * platform/gtk/RenderThemeGtk.cpp:
3577         (WebCore):
3578         * platform/gtk/RenderThemeGtk.h:
3579         (RenderThemeGtk):
3580         * platform/gtk/RenderThemeGtk2.cpp:
3581         (WebCore):
3582         * platform/gtk/RenderThemeGtk3.cpp:
3583         (WebCore):
3584         * platform/qt/RenderThemeQt.cpp:
3585         (WebCore):
3586         * platform/qt/RenderThemeQt.h:
3587         (WebCore):
3588         (RenderThemeQt):
3589         * platform/qt/RenderThemeQtMobile.cpp:
3590         (WebCore):
3591         * platform/qt/RenderThemeQtMobile.h:
3592         (RenderThemeQtMobile):
3593         * rendering/RenderMeter.cpp:
3594         * rendering/RenderMeter.h:
3595         * rendering/RenderObject.h:
3596         (RenderObject):
3597         * rendering/RenderProgress.cpp:
3598         * rendering/RenderProgress.h:
3599         * rendering/RenderTheme.cpp:
3600         (WebCore::RenderTheme::adjustStyle):
3601         (WebCore::RenderTheme::paint):
3602         (WebCore::RenderTheme::paintBorderOnly):
3603         (WebCore::RenderTheme::paintDecorations):
3604         (WebCore):
3605         * rendering/RenderTheme.h:
3606         (WebCore):
3607         (RenderTheme):
3608         * rendering/RenderThemeChromiumLinux.cpp:
3609         (WebCore):
3610         * rendering/RenderThemeChromiumLinux.h:
3611         * rendering/RenderThemeChromiumSkia.cpp:
3612         (WebCore):
3613         * rendering/RenderThemeChromiumSkia.h:
3614         (RenderThemeChromiumSkia):
3615         * rendering/RenderThemeChromiumWin.cpp:
3616         (WebCore):
3617         * rendering/RenderThemeChromiumWin.h:
3618         (RenderThemeChromiumWin):
3619         * rendering/RenderThemeMac.h:
3620         (RenderThemeMac):
3621         * rendering/RenderThemeMac.mm:
3622         (WebCore):
3623
3624 2012-07-22  Kent Tamura  <tkent@chromium.org>
3625
3626         Rename ENABLE_DETAILS to ENABLE_DETAILS_ELEMENT
3627         https://bugs.webkit.org/show_bug.cgi?id=91928
3628
3629         Reviewed by Kentaro Hara.
3630
3631         A flag name for an elmement should be ENABLE_*_ELEMENT.
3632
3633         * Configurations/FeatureDefines.xcconfig:
3634         * DerivedSources.make:
3635         * GNUmakefile.am:
3636         * html/HTMLDetailsElement.cpp:
3637         * html/HTMLDetailsElement.idl:
3638         * html/HTMLSummaryElement.cpp:
3639         * html/HTMLTagNames.in:
3640         * html/shadow/DetailsMarkerControl.cpp:
3641         * rendering/RenderDetailsMarker.cpp:
3642         * rendering/RenderDetailsMarker.h:
3643         * rendering/RenderObject.h:
3644         (RenderObject):
3645         * rendering/RenderTreeAsText.cpp:
3646         (WebCore::RenderTreeAsText::writeRenderObject):
3647
3648 2012-07-21  Dan Bernstein  <mitz@apple.com>
3649
3650         <rdar://problem/11928576> SVG-as-image (constrained) intrinsic size calculation is wrong in vertical writing modes
3651         https://bugs.webkit.org/show_bug.cgi?id=91918
3652
3653         Reviewed by Anders Carlsson.
3654
3655         Test: svg/as-image/svg-intrinsic-size-rectangular-vertical.html
3656
3657         * rendering/RenderReplaced.cpp:
3658         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): When there is a content
3659         renderer, it returns a physical intrinsic size and aspect ratio. The code was already
3660         accounting for this by taking the reciprocal of the aspect ratio in the vertical case. Made
3661         it also transpose the size itself, turning it from physical to logical. Moved this code
3662         after setting m_intrinsicSize, since that member variable is always physical.
3663
3664 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
3665
3666         Cleanup TextEncoding USE(XXX_UNICODE) macros
3667         https://bugs.webkit.org/show_bug.cgi?id=91923
3668
3669         Reviewed by Andreas Kling.
3670
3671         Replace PLATFORM(QT) with USE(QT4_UNICODE) and OS(WINCE) with USE(WINCE_UNICODE).
3672         This gives us more flexibility in choosing the unicode backend for a port.
3673
3674         * platform/text/TextEncoding.cpp:
3675         (WebCore::TextEncoding::encode):
3676         * platform/text/TextEncodingRegistry.cpp:
3677         (WebCore::extendTextCodecMaps):
3678
3679 2012-07-21  Patrick Gansterer  <paroga@webkit.org>
3680
3681         Remove unnecessary ICU header includes from SimpleFontDataWin.cpp
3682         https://bugs.webkit.org/show_bug.cgi?id=91922
3683
3684         Reviewed by Kentaro Hara.
3685
3686         This allows us to use SimpleFontDataWin with an other Unicode implementation too.
3687
3688         * platform/graphics/win/SimpleFontDataWin.cpp:
3689
3690 2012-07-21  Kwang Yul Seo  <skyul@company100.net>
3691
3692         A start tag whose tag name is "html" in the "in body" insertion mode is a parse error
3693         https://bugs.webkit.org/show_bug.cgi?id=91916
3694
3695         Reviewed by Eric Seidel.
3696
3697         According to the HTML5 spec, a start tag whose tag name is "html" in the "in body"
3698         insertion mode is a parse error.
3699
3700         Added HTMLTreeBuilder::processHtmlStartTagForInBody(AtomicHTMLToken&) to call parseError(token).
3701         Removed "FIXME: parse error" from HTMLConstructionSite::insertHTMLHtmlStartTagInBody and
3702         HTMLConstructionSite::insertHTMLBodyStartTagInBody because we already marked the call sites
3703         of these two methods with parseError(token).
3704
3705         No behavior change because parseError(token) is just a marker.
3706
3707         * html/parser/HTMLConstructionSite.cpp:
3708         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
3709         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
3710         * html/parser/HTMLTreeBuilder.cpp:
3711         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3712         (WebCore::HTMLTreeBuilder::processStartTag):
3713         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
3714         (WebCore):
3715         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3716         * html/parser/HTMLTreeBuilder.h:
3717
3718 2012-07-20  Czene Tamás  <tczene@inf.u-szeged.hu>
3719
3720         double data type shoud be changed to float in ColorMatrix
3721         https://bugs.webkit.org/show_bug.cgi?id=91499
3722
3723         Reviewed by Nikolas Zimmermann.
3724
3725         * platform/graphics/filters/FEColorMatrix.cpp:
3726         (WebCore::matrix):
3727         (WebCore::saturate):
3728         (WebCore::huerotate):
3729         (WebCore::luminance):
3730         (WebCore::effectType):
3731
3732 2012-07-20  Stephen White  <senorblanco@chromium.org>
3733
3734         [chromium] Take current transformation matrix into account when
3735         deciding on resize algorithm for drawPattern.
3736         https://bugs.webkit.org/show_bug.cgi?id=90624
3737
3738         Reviewed by Adrienne Walker.
3739
3740         Since the pattern shader uses both the current transformation matrix
3741         and the pattern matrix when transforming pixels, we need to
3742         do the same when computing the resampling mode.  Also removed the
3743         resampling hint code, added in r60658, since it appears to be dead
3744         (caller was removed in r76379).
3745
3746         Covered by existing tests, such as
3747         fast/borders/border-image-scale-transform.html.
3748
3749         * platform/graphics/skia/ImageSkia.cpp:
3750         (WebCore::computeResamplingMode):
3751         Pass in the matrix to be used for computing the destination width and
3752         height (for awesome resampling).  Remove the image resampling hint code.
3753         (WebCore::paintSkBitmap):
3754         Pass in the CTM to computeResamplingMode().
3755         (WebCore::Image::drawPattern):
3756         Concatenate the CTM and the pattern matrix, and pass that to 
3757         computeResamplingMode() and TransformDimensions().  Invert the
3758         CTM's scale and apply it to the pattern transform, so their
3759         concatenation gives identity scale.
3760         * platform/graphics/skia/PlatformContextSkia.cpp:
3761         * platform/graphics/skia/PlatformContextSkia.h:
3762         Remove the image resampling hint (dead code).
3763
3764 2012-07-20  Kwang Yul Seo  <skyul@company100.net>
3765
3766         Anything else in the "in table" insertion mode is a parse error
3767         https://bugs.webkit.org/show_bug.cgi?id=91915
3768
3769         Reviewed by Adam Barth.
3770
3771         According to the HTML5 spec, anything else in the "in table" insertion mode is a parse error.
3772
3773         No behavior change because parseError(token) is just a marker.
3774
3775         * html/parser/HTMLTreeBuilder.cpp:
3776         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
3777
3778 2012-07-20  Kent Tamura  <tkent@chromium.org>
3779
3780         Rename ENABLE_DATALIST to ENABLE_DATALIST_ELEMENT
3781         https://bugs.webkit.org/show_bug.cgi?id=91846
3782
3783         Reviewed by Kentaro Hara.
3784
3785         A flag name for an elmement should be ENABLE_*_ELEMENT.
3786
3787         * Configurations/FeatureDefines.xcconfig:
3788         * DerivedSources.make:
3789         * GNUmakefile.am:
3790         * css/html.css:
3791         * html/HTMLDataListElement.cpp:
3792         * html/HTMLDataListElement.h:
3793         * html/HTMLDataListElement.idl:
3794         * html/HTMLInputElement.cpp:
3795         (WebCore):
3796         (WebCore::HTMLInputElement::parseAttribute):
3797         (WebCore::HTMLInputElement::insertedInto):
3798         (WebCore::HTMLInputElement::removedFrom):
3799         * html/HTMLInputElement.h:
3800         (HTMLInputElement):
3801         * html/HTMLInputElement.idl:
3802         * html/HTMLOptionElement.cpp:
3803         (WebCore::HTMLOptionElement::parseAttribute):
3804         (WebCore::HTMLOptionElement::childrenChanged):
3805         (WebCore):
3806         * html/HTMLOptionElement.h:
3807         (HTMLOptionElement):
3808         * html/HTMLTagNames.in:
3809         * html/InputType.cpp:
3810         (WebCore):
3811         * html/InputType.h:
3812         (InputType):
3813         * html/RangeInputType.cpp:
3814         (WebCore):
3815         * html/RangeInputType.h:
3816         (RangeInputType):
3817         * html/shadow/SliderThumbElement.cpp:
3818         (WebCore::RenderSliderContainer::layout):
3819         * page/DOMWindow.idl:
3820         * platform/efl/RenderThemeEfl.cpp:
3821         (WebCore):
3822         * platform/efl/RenderThemeEfl.h:
3823         (RenderThemeEfl):
3824         * platform/qt/RenderThemeQt.cpp:
3825         (WebCore):
3826         * platform/qt/RenderThemeQt.h:
3827         (RenderThemeQt):
3828         * rendering/RenderTheme.cpp:
3829         (WebCore):
3830         * rendering/RenderTheme.h:
3831         (RenderTheme):
3832         * rendering/RenderThemeChromiumLinux.cpp:
3833         (WebCore):
3834         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
3835         * rendering/RenderThemeChromiumLinux.h:
3836         (RenderThemeChromiumLinux):
3837         * rendering/RenderThemeChromiumWin.cpp:
3838         (WebCore):
3839         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
3840         * rendering/RenderThemeChromiumWin.h:
3841         (RenderThemeChromiumWin):
3842         * rendering/RenderThemeMac.h:
3843         (RenderThemeMac):
3844         * rendering/RenderThemeMac.mm:
3845         (WebCore::RenderThemeMac::paintSliderTrack):
3846         (WebCore):
3847
3848 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
3849
3850         Unify HTMLCollection and DynamicNodeList
3851         https://bugs.webkit.org/show_bug.cgi?id=91335
3852
3853         Reviewed by Anders Carlsson.
3854
3855         This is the grand unification of HTMLCollection and DynamicNodeList.
3856
3857         It merges implementations of item() and length() in ChildNodeList, DynamicNodeList,
3858         and HTMLCollection. The unified implementation is based on the one used for HTMLCollection,
3859         that has been improved over the last few days; see r122660 and r122672 for examples.
3860
3861         There are five key changes:
3862         1. Made itemBeforeOrAfter aware of DynamicNodeList.
3863         2. itemBeforeOrAfter and related functions take and return Node* to support ChildNodeList.
3864         3. Renamed InvalidCollectionType to NodeListCollectionType since DynamicNodeLists need to be
3865         identified itemBeforeOrAfter.
3866         4. Renamed itemAfter to virtualItemAfter in subclasses of HTMLCollection, and devirtualized
3867         itemAfter used in common cases to avoid performance regressions. To make this intent clear,
3868         SupportItemBefore and DoNotSupportItemBefore have been renamed to DoesNotOverrideItemAfter
3869         and OverridesItemAfter. This change also help us detect a subclass of HTMLCollection that
3870         passes in a wrong value to ItemBeforeSupportType by making forward iterations fail (hit an
3871         assertion or doesn't iterate at all) as well as backward iterations.
3872         5. Restricted the use of elementsArrayOffset to subclasses that provide virtualItemAfter.
3873
3874         This patch completes my effort to share code between HTMLCollection and DynamicNodeList.
3875
3876         * dom/ChildNodeList.cpp:
3877         (WebCore::ChildNodeList::ChildNodeList):
3878         (WebCore): Removed length() and item().
3879         (WebCore::ChildNodeList::nodeMatches):
3880         * dom/ChildNodeList.h:
3881         (ChildNodeList):
3882         * dom/ClassNodeList.cpp:
3883         (WebCore::ClassNodeList::ClassNodeList):
3884         * dom/Document.cpp:
3885         (WebCore::Document::registerNodeListCache):
3886         (WebCore::Document::unregisterNodeListCache):
3887         * dom/DynamicNodeList.cpp:
3888         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3889         (WebCore::DynamicNodeList::length):
3890         (WebCore::DynamicNodeList::item):
3891         * dom/DynamicNodeList.h:
3892         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes new boolean argument
3893         shouldOnlyIncludeDirectChildren indicating whether the non-child descendents should be
3894         included or not. This is necessary to identify ChildNodeList in itemBeforeOrAfter.
3895         (WebCore::DynamicNodeListCacheBase::ownerNode): Moved from DynamicNodeListCacheBase and
3896         HTMLCollectionCacheBase.
3897         (WebCore::DynamicNodeListCacheBase::document): Moved from DynamicNodeListCacheBase.
3898         (WebCore::DynamicNodeListCacheBase::rootNode): Ditto.
3899         (WebCore::DynamicNodeListCacheBase::overridesItemAfter): Renamed from supportsItemBefore
3900         and the return value has been negated.
3901         (WebCore::DynamicNodeListCacheBase::shouldOnlyIncludeDirectChildren): Added.
3902         (WebCore::DynamicNodeListCacheBase):
3903         (WebCore::DynamicNodeList::DynamicNodeList): Takes NodeListType to determine the value of
3904         shouldOnlyIncludeDirectChildren.
3905         (DynamicNodeList):
3906         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
3907         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
3908         * dom/MicroDataItemList.cpp:
3909         (WebCore::MicroDataItemList::MicroDataItemList):
3910         * dom/NameNodeList.cpp:
3911         (WebCore::NameNodeList::NameNodeList):
3912         * dom/TagNodeList.cpp:
3913         (WebCore::TagNodeList::TagNodeList):
3914         * html/CollectionType.h:
3915         * html/HTMLAllCollection.cpp:
3916         (WebCore::HTMLAllCollection::HTMLAllCollection):
3917         * html/HTMLCollection.cpp:
3918         (WebCore::shouldOnlyIncludeDirectChildren):
3919         (WebCore::rootTypeFromCollectionType):
3920         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3921         (WebCore::HTMLCollection::HTMLCollection):
3922         (WebCore::HTMLCollection::create):
3923         (WebCore::HTMLCollection::~HTMLCollection):
3924         (WebCore::isAcceptableElement):
3925         (WebCore::firstNode): Extracted from itemBeforeOrAfter.
3926         (WebCore::DynamicNodeListCacheBase::iterateForNextNode): Ditto.
3927         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter): Takes and returns Node*.
3928         Special case ChildNodeList since there is no need to skip any node. When "this" is a
3929         node list, call nodeMatches instead of isAcceptableElement.
3930         (WebCore::DynamicNodeListCacheBase::itemBefore): No longer takes offsetInArray since
3931         the use of elementsArrayOffset has been restricted to HTMLCollections that provides
3932         virtualItemAfter.
3933         (WebCore::DynamicNodeListCacheBase::itemAfter): Calls virtualItemAfter if necessary.
3934         Otherwise assert offsetInArray is zero since we should never be using this variable
3935         when virtualItemAfter is not provided.
3936         (WebCore::DynamicNodeListCacheBase::isLastItemCloserThanLastOrCachedItem):
3937         (WebCore::DynamicNodeListCacheBase::isFirstItemCloserThanCachedItem):
3938         (WebCore::DynamicNodeListCacheBase::setItemCache): Updates m_cachedElementsArrayOffset
3939         in HTMLCollection if and only if virtualItemAfter is provided. This is safe because
3940         node lists never provide virtualItemAfter.
3941         (WebCore::DynamicNodeListCacheBase::cachedElementsArrayOffset): Similarly, returns
3942         m_cachedElementsArrayOffset if virtualItemAfter is provided.
3943         (WebCore::DynamicNodeListCacheBase::lengthCommon):
3944         (WebCore::DynamicNodeListCacheBase::itemCommon): Note that supportsItemBefore() is
3945         equivalent to !overridesItemAfter() here.
3946         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Uses Node* through
3947         out the function. Since itemBefore never uses offsetInArray, always sets 0 for that.
3948         Note that we never call itemBefore and virtualItemAfter on the same object.
3949         (WebCore::HTMLCollection::virtualItemAfter): Added only to make the class "concrete".
3950         (WebCore::HTMLCollection::namedItem):
3951         (WebCore::HTMLCollection::updateNameCache):
3952         (WebCore::HTMLCollection::tags):
3953         * html/HTMLCollection.h:
3954         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
3955         (HTMLCollectionCacheBase):
3956         (WebCore::HTMLCollection::length):
3957         (WebCore::HTMLCollection::item):
3958         (WebCore::HTMLCollection::base):
3959         (HTMLCollection):
3960         * html/HTMLFormCollection.cpp:
3961         (WebCore::HTMLFormCollection::HTMLFormCollection):
3962         (WebCore::HTMLFormCollection::virtualItemAfter):
3963         * html/HTMLFormCollection.h:
3964         (HTMLFormCollection):
3965         * html/HTMLNameCollection.cpp:
3966         (WebCore::HTMLNameCollection::HTMLNameCollection):
3967         (WebCore::HTMLNameCollection::virtualItemAfter):
3968         * html/HTMLNameCollection.h:
3969         (HTMLNameCollection):
3970         * html/HTMLOptionsCollection.cpp:
3971         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
3972         * html/HTMLPropertiesCollection.cpp:
3973         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3974         (WebCore::HTMLPropertiesCollection::virtualItemAfter):
3975         (WebCore::HTMLPropertiesCollection::updateNameCache):
3976         * html/HTMLPropertiesCollection.h:
3977         (HTMLPropertiesCollection):
3978         * html/HTMLTableRowsCollection.cpp:
3979         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
3980         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
3981         * html/HTMLTableRowsCollection.h:
3982         (HTMLTableRowsCollection):
3983         * html/LabelsNodeList.cpp:
3984         (WebCore::LabelsNodeList::LabelsNodeList):
3985         * html/RadioNodeList.cpp:
3986         (WebCore::RadioNodeList::RadioNodeList):
3987
3988 2012-07-20  Joshua Bell  <jsbell@chromium.org>
3989
3990         IndexedDB: Simplify backend interface classes
3991         https://bugs.webkit.org/show_bug.cgi?id=91901
3992
3993         Reviewed by Tony Chang.
3994
3995         The IDBTransactionBackendInterface included several methods only used by the
3996         real implementation objects, not via the interfaces. Expose a static Impl::from(Interface)
3997         method for transaction, and migrate all of the backend-internal uses from Interface to Impl.
3998
3999         No new tests - no functional changes.
4000
4001         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
4002         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
4003         * Modules/indexeddb/IDBCursorBackendImpl.h:
4004         (WebCore):
4005         (WebCore::IDBCursorBackendImpl::create):
4006         (IDBCursorBackendImpl):
4007         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
4008         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
4009         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
4010         (WebCore::IDBDatabaseBackendImpl::objectStore):
4011         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
4012         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
4013         (WebCore::IDBDatabaseBackendImpl::setVersion):
4014         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
4015         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
4016         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
4017         (WebCore::IDBDatabaseBackendImpl::transaction):
4018         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
4019         (WebCore):
4020         (IDBDatabaseBackendImpl):
4021         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
4022         (WebCore::IDBIndexBackendImpl::openCursorInternal):
4023         (WebCore::IDBIndexBackendImpl::openCursor):
4024         (WebCore::IDBIndexBackendImpl::openKeyCursor):
4025         (WebCore::IDBIndexBackendImpl::countInternal): Drop unused transaction argument.
4026         (WebCore::IDBIndexBackendImpl::count):
4027         (WebCore::IDBIndexBackendImpl::get):
4028         (WebCore::IDBIndexBackendImpl::getKey):
4029         * Modules/indexeddb/IDBIndexBackendImpl.h:
4030         (IDBIndexBackendImpl):
4031         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
4032         (WebCore::IDBObjectStoreBackendImpl::get):
4033         (WebCore::IDBObjectStoreBackendImpl::put):
4034         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
4035         (WebCore):
4036         (WebCore::IDBObjectStoreBackendImpl::putInternal):
4037         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):