diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llui/llaccordionctrl.cpp | 7 | ||||
| -rw-r--r-- | indra/llui/lltextbase.cpp | 30 | ||||
| -rw-r--r-- | indra/llui/lltextbase.h | 2 | ||||
| -rw-r--r-- | indra/newview/llfloatermarketplace.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llfloatersearch.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_marketplace.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_search.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_move.xml | 2 |
9 files changed, 46 insertions, 18 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 1a64c2699d..2cd394476e 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -303,11 +303,8 @@ void LLAccordionCtrl::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top, S3 return; LLRect panel_rect = panel->getRect(); panel_rect.setLeftTopAndSize( left, top, width, height); - if (panel->getRect() != panel_rect) - { - panel->reshape( width, height, 1); - panel->setRect(panel_rect); - } + panel->reshape( width, height, 1); + panel->setRect(panel_rect); } void LLAccordionCtrl::ctrlShiftVertical(LLView* panel, S32 delta) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1de12896eb..44151a4355 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1038,8 +1038,37 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s { LLStyleSP emoji_style; LLEmojiDictionary* ed = LLEmojiDictionary::instanceExists() ? LLEmojiDictionary::getInstance() : NULL; + LLTextSegment* segmentp = nullptr; + segment_vec_t::iterator seg_iter; + if (segments && segments->size() > 0) + { + seg_iter = segments->begin(); + segmentp = *seg_iter; + } for (S32 text_kitty = 0, text_len = static_cast<S32>(wstr.size()); text_kitty < text_len; text_kitty++) { + if (segmentp) + { + if (segmentp->getEnd() <= pos + text_kitty) + { + seg_iter++; + if (seg_iter != segments->end()) + { + segmentp = *seg_iter; + } + else + { + segmentp = nullptr; + } + } + if (segmentp && !segmentp->getPermitsEmoji()) + { + // Some segments, like LLInlineViewSegment do not permit splitting + // and should not be interrupted by emoji segments + continue; + } + } + llwchar code = wstr[text_kitty]; bool isEmoji = ed ? ed->isEmoji(code) : LLStringOps::isEmoji(code); if (isEmoji) @@ -3448,6 +3477,7 @@ S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offs void LLTextSegment::updateLayout(const LLTextBase& editor) {} F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; } bool LLTextSegment::canEdit() const { return false; } +bool LLTextSegment::getPermitsEmoji() const { return true; } void LLTextSegment::unlinkFromDocument(LLTextBase*) {} void LLTextSegment::linkToDocument(LLTextBase*) {} const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 07cd9a1ee5..50767a35b3 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -87,6 +87,7 @@ public: virtual void updateLayout(const class LLTextBase& editor); virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); virtual bool canEdit() const; + virtual bool getPermitsEmoji() const; virtual void unlinkFromDocument(class LLTextBase* editor); virtual void linkToDocument(class LLTextBase* editor); @@ -255,6 +256,7 @@ public: /*virtual*/ void updateLayout(const class LLTextBase& editor); /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ bool canEdit() const { return false; } + /*virtual*/ bool getPermitsEmoji() const { return false; } /*virtual*/ void unlinkFromDocument(class LLTextBase* editor); /*virtual*/ void linkToDocument(class LLTextBase* editor); diff --git a/indra/newview/llfloatermarketplace.cpp b/indra/newview/llfloatermarketplace.cpp index d626786591..7316d7617d 100644 --- a/indra/newview/llfloatermarketplace.cpp +++ b/indra/newview/llfloatermarketplace.cpp @@ -46,9 +46,9 @@ void LLFloaterMarketplace::onClose(bool app_quitting) bool LLFloaterMarketplace::postBuild() { - LLFloaterWebContent::postBuild(); - mWebBrowser = getChild<LLMediaCtrl>("marketplace_contents"); - mWebBrowser->addObserver(this); + if (!LLFloaterWebContent::postBuild()) + return false; + mWebBrowser->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); std::string url = gSavedSettings.getString("MarketplaceURL"); mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index ec9af865cf..9b7a4e5134 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -161,15 +161,14 @@ void LLFloaterSearch::initiateSearch(const LLSD& tokens) // Naviation to the calculated URL - we know it's HTML so we can // tell the media system not to bother with the MIME type check. - LLMediaCtrl* search_browser = findChild<LLMediaCtrl>("search_contents"); - search_browser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } bool LLFloaterSearch::postBuild() { - LLFloaterWebContent::postBuild(); - mWebBrowser = getChild<LLMediaCtrl>("search_contents"); - mWebBrowser->addObserver(this); + if (!LLFloaterWebContent::postBuild()) + return false; + mWebBrowser->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); // If cookie is there, will set it now, Otherwise will have to wait for login completion diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index acf584616c..77ec31fd9d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1364,8 +1364,8 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url) std::string browser_name; }; struct MediaCookieInstance media_cookie_instances[] = { - {"search", "search_contents" }, - {"marketplace", "marketplace_contents" }, + {"search", "webbrowser" }, + {"marketplace", "webbrowser" }, {"destinations", "destination_guide_contents" }, }; for (MediaCookieInstance mci : media_cookie_instances) diff --git a/indra/newview/skins/default/xui/en/floater_marketplace.xml b/indra/newview/skins/default/xui/en/floater_marketplace.xml index 99fb3a1ad8..40bf674d2d 100644 --- a/indra/newview/skins/default/xui/en/floater_marketplace.xml +++ b/indra/newview/skins/default/xui/en/floater_marketplace.xml @@ -169,7 +169,7 @@ follows="all" layout="topleft" left="0" - name="marketplace_contents" + name="webbrowser" top="0"/> </layout_panel> <layout_panel name="status_bar" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 43c4aa1b9d..8891ebcd87 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -170,7 +170,7 @@ layout="topleft" left="0" trusted_content="true" - name="search_contents" + name="webbrowser" top="0"/> </layout_panel> <layout_panel name="status_bar" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index 1de660078f..eee55bd7bc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -214,7 +214,7 @@ left_pad="10" top_delta="-6" name="mouse_warp_combo" - tooltip="Controls warping of the mouse to the center of the screen during alt-zoom and mouse look." + tool_tip="Controls warping of the mouse to the center of the screen during alt-zoom and mouse look." width="200"> <combo_box.item label="Automatic" |
